warning:C++ exception, flags=0x1
-
Hi everyone,
when I run my program generates a strange warning:warning: Exception at 0x74e9dae8, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance)
This warning is generated after the program performs a custom Throw:
if(!m_TcpSocket->waitForConnected(TIMEOUT_CONNECTION)) { QString strTimeout = m_TcpSocket->errorString(); throw ApplicationException(strTimeout); }
I've been looking around, but I have not found anything that could explain the problem.
My program runs on Linux and Window. Linux is a 32-bit Ubuntu 14.04 and not cause any problems while on windows 10 64 bits yes.
Also initially used QT 5.7.0 on Windows 10 64-bit and it was fine, it appeared when I switched to QT 5.7.0 32bit. But I need to use the 32bit on Windows. -
Hi everyone,
when I run my program generates a strange warning:warning: Exception at 0x74e9dae8, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance)
This warning is generated after the program performs a custom Throw:
if(!m_TcpSocket->waitForConnected(TIMEOUT_CONNECTION)) { QString strTimeout = m_TcpSocket->errorString(); throw ApplicationException(strTimeout); }
I've been looking around, but I have not found anything that could explain the problem.
My program runs on Linux and Window. Linux is a 32-bit Ubuntu 14.04 and not cause any problems while on windows 10 64 bits yes.
Also initially used QT 5.7.0 on Windows 10 64-bit and it was fine, it appeared when I switched to QT 5.7.0 32bit. But I need to use the 32bit on Windows.@Gianluca86 Well, I guess nobody catches that exception? An exception which is not handled leads to program termination. You should catch this exception.
-
AFAIR it's a MSVC "feature" and should only occure in debug mode (nomatter if you catch the exception or not).
You can ignore this warning of you catch and handle the exception.
Or does this message also appear when you compile your code in release mode and run the application outside of any (debugger connected) IDE? -
The problem is probably because you are using a 32bit program on a 64bit OS. Windows can't unwind the stack through a 64/32 bit transition. You have probably thrown an exception in code called from a windows callback (eg a Win Proc), but any exception handler is further up the stack than the windows callback.
-
Note: This function may fail randomly on Windows. Consider using the event loop and the connected() signal if your software will run on Windows.