I am developing a 64 bit C++ application using Visual Studio 2015, Qt 5.5 and OpenCV3.0. The application runs well on the pc I use for developing in Release and Debug version. But the same application runs only in Debug on other PCs, and in release version I get this Error Message:
The application was unable to start correctly 0xc0000005, Click Ok toclose the application:
I created a dump file to open it using visual studio debugger, it shows that the application stops when loading the dll before loading opencv_imgproc300.dll.
I tried to review the event viewer but I did not find this error there.
Is there a method to debug a release version in startup when loading the dlls to know which the cause of the problem?
After a great effort, I solved the issue, It was because the opencv_imgproc300.dll was corrupted, It has the true size but inside is corrupted, I checked with dependency walker and found that there is great difference between the linked DLL in the Application folder and the original dll file. As a summary, If you want to debug a release version when starting up, you have many methods. We will describe two of them:
Compiling your Release version with Debug Info, and run your application like if it was in Debug version. If the application stops before loading a DLL. This DLL is probably corrupted or missing. This link show how to compile your Release version with Debug informations: How to: Debug a Release Build.
Using Dependency walker, You open your release version application with this tool and you will find if there is any corrupted or missing dll that it needs when starting up (It is marked with red color in dependency walker). If you application is built in 64 bit, your should use the x64 version of dependency walker. If it is x86, you should use the x86 version of dependency walker. If you use the x86 version to open the x64 version of your application, you can see some false error related to linking with system DLL in their x86 version, but don't care about it, it is a bug in Dependency Walker itself.