[solved]this application requested the runtime to terminate it in an unusual way
-
hi
I'm trying to run an executable file of a qt based application but I get this error :
this application requested the runtime to terminate it in an unusual way
I know this is the same topic with this one :
https://forum.qt.io/topic/24553/this-application-has-requested-the-runtime-to-terminate-it-in-an-unusual-way
but I did everything that they said in that topic and still I getting this error. I'm using qt 5.4.1 mingw with window 7 64bit
thank you -
Hi,
You can use Dependency walker to check if the application is missing any dlls to be copied at the exe path/folder.
Regards
Sam -
dear @Sam
I used that application and copied all the dlls that I need and error doesn't say missing dll I can't find why this error happens! -
Hi,
@Hamed said:
this application requested the runtime to terminate it in an unusual way
This is a very generic message that means "your program crashed". There are many possible reasons. To find out what caused the crash, use a Debugger.
Can you run your program from inside Qt Creator?
-
@JKSH
yes it works properly in both debug and release mode. how can it crashes by running .exe file? -
Did you try this
-
@Sam
you mean that youtube video?
yes I already tried that one. nothing changed! -
@Hamed said:
@JKSH
yes it works properly in both debug and release mode. how can it crashes by running .exe file?If it runs correctly in Qt Creator but crashes when you open the .exe file, that means you haven't deployed your application correctly. Follow the instructions at http://wiki.qt.io/Deploy_an_Application_on_Windows carefully.
-
-
Hi @Sam,
There is a link in the search results where they discuss
under Windows Search Properties>Recovery>"Restart service after:" somehow was changed from 0 to 1. I changed it back to 0 and everything is now back to normal.
The message "this application requested the runtime to terminate it in an unusual way" is extremely generic and broad. It can be caused by many different problems (e.g. missing DLLs, programming error, or something completely different) I highly doubt that link is related to @Hamed's problem, because his program already runs correctly in Qt Creator.
-
@JKSH
I don't think the problem is with deployment. I flowed instruction step by step.
here is my .exe file folder and the way I deploy files : -
@Sam
I read that topic and I don't think that is related to my case! problem should be somewhere else. -
@JKSH
my deployment was wrong? -
@Hamed said:
@JKSH
I don't think the problem is with deployment. I flowed instruction step by step.
here is my .exe file folder and the way I deploy files :- What version of Qt did you use?
- What compiler did you use?
- What is MapGraphics.dll?
- Why do you have both MSVC and MinGW DLLs in your folder?
- Did you rename your Qt folder to something like C:\QtHidden\ ?
- The wiki asked you to copy all DLLs from the <Qt>\bin\ folder. You don't have all of them.
- You shouldn't need system DLLs (glu32.dll, kernel32.dll, opengl32.dll, shell32.dll)
-
- Qt 5.4.1
- mingw
- this is map view costume library, It's needed
- I copied just mingw dll and I faced this problem. in some topics I read you need msvc dll and I copied it and it's not changed anything as I expect!
- No I thought renaming to QtHidden is for simulating your system with a system that don't have Qt! I have Qt and I have problem!
- I copied the dlls that dependency walker told it's needed! should I copy all of them?
- those dlls also recomended by dependency walker.
suggest anything that you think might help me I will do that.
-
- Ok
- Ok
- Where did you download this from? Did you build this DLL yourself?
- To clarify: Do you mean you copied the MinGW DLL and it crashed? (Also, remove the MSVC DLL)
- No, renaming it will temporarily "remove" Qt from your system PATH. Try it.
- Dependency Walker does not show all the required DLLs by default. Please follow the Wiki instructions, and copy all of them. If you don't, it's difficult to help you.
- Windows system DLLs can always be found. You don't need to copy them. Remove them from your folder.
If it still doesn't work, please post:
- Your .pro file
- The full path to where you got your Qt DLLs from? (for example, "C:\Qt\5.2.1\mingw48_32\bin")
- Answers to my questions above
-
- I download It from github and it's work properly! it's ran as an application by itself and I don't think that is the problem.
- no minGW was needed and lik other dlls I add it! at the end of adding all dlls this error happens.
- did it, Nothing changed
- did it, Nothing changed
- did it, Nothing changed :(
1.how to post my .pro?
2.C:\Qt\Qt5.4.1\5.4\mingw491_32\bin
3.done -
@Hamed said:
- I download It from github and it's work properly! it's ran as an application by itself and I don't think that is the problem.
What's the github link?
- no minGW was needed and lik other dlls I add it! at the end of adding all dlls this error happens.
I meant remove MSVC, not MinGW
- did it, Nothing changed
- did it, Nothing changed
- did it, Nothing changed :(
:(
1.how to post my .pro?
Open it in Qt Creator. Copy the text in the file, and paste it here.
2.C:\Qt\Qt5.4.1\5.4\mingw491_32\bin
Ok, that's correct
-
- github link : https://github.com/raptorswing/MapGraphics
- no, nothing changes when I delete msvc dll
- by .pro you mean my root project .pro or subdirs .pro s? I have two subdirs and both have .pro file
-
@Hamed said:
- by .pro you mean my root project .pro or subdirs .pro s? I have two subdirs and both have .pro file
Post all 3 of them