0

My qt project works fine in release mode, but when I want to start it in debug mode it crashes immediately.

I've tried to put break points to find the failure, but the debugger didn't reach the main function, so I have no idea what the problem is.

The Error Message says:

ERROR: UNEXPECTED STATE: EngineSetupRequested  WANTED: InferiorShutdownRequested IN C:\work\build\qt-creator\src\plugins\debugger\qml\qmlcppengine.cpp:589
eyllanesc
  • 235,170
  • 19
  • 170
  • 241
tscheppe
  • 588
  • 5
  • 18
  • If it crashes in debug mode it should be easy. Just run it from Qt Creator and when it crashes find window "Call Stack" and inspect it. Qt creator should jump right to the point where problem is. Review also application logs. Most probably some assertion is failing (they are removed in release mode). – Marek R Jul 30 '18 at 08:42
  • Do you use any kind of global variables? They can be initialized before `main`. – Marek R Jul 30 '18 at 08:45
  • Unfortunately my call stack view doesn't show anything. It's empty. Yes I have global variables but the debugger also crashed before reaching them. @MarekR – tscheppe Jul 30 '18 at 08:54
  • Thats bad that debugger is crashing, this is [known bug](https://bugreports.qt.io/browse/QTCREATORBUG-17779). Consider disabling this plugin. What compiler do you use? msvs or mingw? – Marek R Jul 30 '18 at 09:38
  • i am using msvc compiler. how can i disable a plugin and which plugin do you mean? @MarekR – tscheppe Jul 30 '18 at 09:54
  • In debug mode, MSVC applies patterns to new/free/unowned memory regions (see https://stackoverflow.com/q/370195/2311167). This does not happen in release mode. So, if your program works in release mode but not in debug mode, you are probably having uninitialized variables somewhere. – Adrian W Jul 30 '18 at 10:23
  • You link to external libraries? you are linking to right libs in release and debug mode...? – Phiber Jul 30 '18 at 15:29

0 Answers0