"This application has requested the Runtime to terminate it in an unusual way."
My Qt program (g++ 4.4.0) is giving me the Microsoft Visual C++ Runtime Library error "This application has requested the Runtime to terminate it in an unusual way" when I close it. But when I run it in the debugger, I don't get the error message. Does anybody know a way to get some information about the crash? The message box just has an OK button.
Edited to add: Following Wimmel's advice, I attached to the debugger. There are two threads left alive, with ThreadID 1 and 3. The stacks look like this:
Level Function File Line Address
0 VTagOutput C:\Windows\syswow64\user32.dll 0 0x7529438d
1 VTagOutput C:\Windows\syswow64\user32.dll 0 0x7529438d
2 USER32!EmptyClipboard C:\Windows\syswow64\user32.dll 0 0x752a2674
3 ?? 开发者_如何转开发 0
Level Function File Line Address
0 ntdll!LdrFindResource_U C:\Windows\SysWOW64\ntdll.dll 0 0x76f5000d
1 ntdll!LdrSetAppCompatDllRedirectionCallback C:\Windows\SysWOW64\ntdll.dll 0 0x76fdfabe
2 ?? 0 0x7b9609b5
3 ?? 0
Perhaps the second thread is displaying the error message? The first is a little strange: the top two rows are identical. I have nothing in my code that has TagOutput
in its name, and neither does Qt as far as I can tell.
The only time I have ever seen that error message with Qt was when I first tried setting up a Qt development environment and had installed a number of different versions of MinGW. It seemed as though my executable was finding and loading a version of mingwm10.dll
that didn't agree with everything else. I hunted down and eliminated all the versions of that dll except the one that I wanted and the problem disappeared.
Use procmon.exe and filter for process name and file access to find missing Dependencies.
I had the same Problem with Qt 5.0.1.
The program was missing some dlls from the Qt framework.
I found them in the Directory:
<QTINSTALLDIR>\Qt5.0.1\5.0.1\mingw47_32\plugins
精彩评论