Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"This application has requested the Runtime to terminate it in an unusual way."

Tags:

c++

qt

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.

like image 572
TonyK Avatar asked Mar 26 '11 13:03

TonyK


People also ask

How do you fix this application has requested the Runtime to terminate it in an unusual way?

Open control pannel> program and features > repair all versions of Microsof visual c++ then restart pc and test 3. uninstall all the Microsoft visual c++ versions and download and install them again from Microsoft.com restart and test.


1 Answers

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.

like image 96
Arnold Spence Avatar answered Oct 02 '22 22:10

Arnold Spence