[solved]this application requested the runtime to terminate it in an unusual way
-
@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
-
- root .pro :
TEMPLATE = subdirs SUBDIRS += \ Planner \ MapGraphics Planner.depends += MapGraphics
2.mapgraphics .pro :
#------------------------------------------------- # # Project created by QtCreator 2012-03-03T10:50:47 # #------------------------------------------------- QT += network sql greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = MapGraphics TEMPLATE = lib DEFINES += MAPGRAPHICS_LIBRARY INCLUDEPATH += . SOURCES += MapGraphicsScene.cpp \ MapGraphicsObject.cpp \ MapGraphicsView.cpp \ guts/PrivateQGraphicsScene.cpp \ guts/PrivateQGraphicsObject.cpp \ guts/Conversions.cpp \ MapTileSource.cpp \ tileSources/GridTileSource.cpp \ guts/MapTileGraphicsObject.cpp \ guts/PrivateQGraphicsView.cpp \ tileSources/OSMTileSource.cpp \ guts/MapGraphicsNetwork.cpp \ tileSources/CompositeTileSource.cpp \ guts/MapTileLayerListModel.cpp \ guts/MapTileSourceDelegate.cpp \ guts/CompositeTileSourceConfigurationWidget.cpp \ CircleObject.cpp \ guts/PrivateQGraphicsInfoSource.cpp \ PolygonObject.cpp \ Position.cpp \ LineObject.cpp \ PlaneObject.cpp HEADERS += MapGraphicsScene.h\ MapGraphics_global.h \ MapGraphicsObject.h \ MapGraphicsView.h \ guts/PrivateQGraphicsScene.h \ guts/PrivateQGraphicsObject.h \ guts/Conversions.h \ MapTileSource.h \ tileSources/GridTileSource.h \ guts/MapTileGraphicsObject.h \ guts/PrivateQGraphicsView.h \ tileSources/OSMTileSource.h \ guts/MapGraphicsNetwork.h \ tileSources/CompositeTileSource.h \ guts/MapTileLayerListModel.h \ guts/MapTileSourceDelegate.h \ guts/CompositeTileSourceConfigurationWidget.h \ CircleObject.h \ guts/PrivateQGraphicsInfoSource.h \ PolygonObject.h \ Position.h \ LineObject.h \ PlaneObject.h symbian { MMP_RULES += EXPORTUNFROZEN TARGET.UID3 = 0xE4F7F973 TARGET.CAPABILITY = TARGET.EPOCALLOWDLLDATA = 1 addFiles.sources = MapGraphics.dll addFiles.path = !:/sys/bin DEPLOYMENT += addFiles } unix:!symbian { maemo5 { target.path = /opt/usr/lib } else { target.path = /usr/lib } INSTALLS += target } FORMS += \ guts/CompositeTileSourceConfigurationWidget.ui RESOURCES += \ resources.qrc
- planner .pro file :
#------------------------------------------------- # # Project created by QtCreator 2015-03-01T12:21:14 # #------------------------------------------------- QT += core gui serialport QT += core gui opengl QT += core gui network sql greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = Planner TEMPLATE = app #LIBS += -lGLU #LIBS += -lSDL CONFIG += debug_and_release SOURCES += main.cpp\ Mainwindow.cpp \ readerthread.cpp \ plane3d.cpp \ clicklabel.cpp \ chart.cpp \ ahrsscene.cpp \ mavlinkcrc.cpp HEADERS += Mainwindow.h \ readerthread.h \ plane3d.h \ clicklabel.h \ chart.h \ ahrsscene.h \ ../ardupilotmega/mavlink.h \ ../MAVLink/dowranpilot/mavlink.h \ mavlinkcrc.h \ ../MAVLink/mavlink_types.h FORMS += \ MainWindow.ui #Linkage for MapGraphics shared library win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../MapGraphics/release/ -lMapGraphics else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../MapGraphics/debug/ -lMapGraphics else:unix:!symbian: LIBS += -L$$OUT_PWD/../MapGraphics/ -lMapGraphics INCLUDEPATH += $$PWD/../MapGraphics DEPENDPATH += $$PWD/../MapGraphics RESOURCES = mresources.qrc
-
- Did you copy the Debug build or Release build of MapGraphics.dll?
- Did you build a Debug build or Release build of your Planner app?
-
I didn't build them seprately. I build root project in release mode.
-
@Hamed said:
I didn't build them seprately. I build root project in release mode.
Yes, but MapGraphics.dll is built in a different folder from Planner.exe. Did you copy debug\MapGraphics.dll or release\MapGraphics.dll? Make sure you copied the release version, and not the debug version.
Anyway, before continuing this path, I want to check: Are you able to run TestApp.exe outside of Qt Creator?
-
both are built in release mode!
yes I ran a test application just now! -
Based on the image of your deployment directory you need to remove some of the DLL files you put there. Specifically:
- kernal32.dll
- shell32.dll
- glu32.dll
- libegl.dll
- libglesv2.dllrn
- msvcrt.dll
- opengl32.dll
The operating system has files such as kernel32.dll. Your copy of this will be different then that of the target OS in most cases.
When using dependency viewer stick to items specific to Qt and Mingw.
-
@Rondog
deleted this dlls. still nothing changed! :( -
The Win7 message can be vauge. Maybe something like this can help http://www.nirsoft.net/utils/application_crash_report.html
-
@Hamed said:
both are built in release mode!
yes I ran a test application just now!Can you please post a screenshot of your TestApp.exe folder?
Ok, I'm running out of ideas. Here's my last DLL-related one:
- Download and extract https://technet.microsoft.com/en-us/sysinternals/bb896656.aspx
- Run the Release build of your Planner app from inside Qt Creator
- Interact with your app, make sure it doesn't crash
- Open the command prompt, and navigate to the ListDLL folder
- In the command prompt, type
ListDLLs.exe Planner.exe > output.log
- Open output.log, and make sure you have all the DLLs, but ignore anything from C:\Windows (notice that you have DLLs that Dependency Walker didn't detect)
- Post the contents of the log here
If that still doesn't work, then I suggest doing debugging the old-fashioned way: Start commenting out code in your Planner app until it stops crashing.
-
my test app directory:
https://www.imageupload.co.uk/images/2015/04/19/6516.jpgI will do this steps and let you know the result.
thank you so much