Unsolved How to debug crash in qt5core.dll thread
-
@Dariusz said in How to debug crash in qt5core.dll thread:
I've been trying build qt from source today.
Why?
-
@Dariusz
All @Christian-Ehrlicher asked you to do was:Install the debug information and source with the Qt online installer and build / run your program in debug.
By downloading just that stuff your PC will have more information to show you in the debugger when inside Qt libraries. It just needs these files to be found, it does not mean you need to build Qt yourself. Assuming you download files from the same version of Qt as you previously installed.
But btw you may not even have needed to do this. If you claim you have a "crash in qt5core.dll", start by running your app from witihin the debugger. When it "crashes" the debugger should break. Find the stack trace window pane. If you have compiled your own code for debug, it will hopefully show you a trace back into some particular line of your own source. That may be all you need to diagnose the cause, without requiring Qt library symbols/source.
-
@Christian-Ehrlicher said in How to debug crash in qt5core.dll thread:
@Dariusz said in How to debug crash in qt5core.dll thread:
I've been trying build qt from source today.
Why?
I though thats what u meant... to build debug dlls from source to use in my debug app to debug issue.
@JonB said in How to debug crash in qt5core.dll thread:
@Dariusz
All @Christian-Ehrlicher asked you to do was:Install the debug information and source with the Qt online installer and build / run your program in debug.
By downloading just that stuff your PC will have more information to show you in the debugger when inside Qt libraries. It just needs these files to be found, it does not mean you need to build Qt yourself. Assuming you download files from the same version of Qt as you previously installed.
But btw you may not even have needed to do this. If you claim you have a "crash in qt5core.dll", start by running your app from witihin the debugger. When it "crashes" the debugger should break. Find the stack trace window pane. If you have compiled your own code for debug, it will hopefully show you a trace back into some particular line of your own source. That may be all you need to diagnose the cause, without requiring Qt library symbols/source.
Yes when I run in debug I have stack trace... and it starts on my app, few function down the line it dives in to Qt dlls and dies there. So I don't really know what/why/where it "really" dies.
Its threading error. I just cant fully debug it as half of the error happens on Qt side.
-
@Dariusz said in How to debug crash in qt5core.dll thread:
few function down the line it dives in to Qt dlls and dies there.
So you should take a look in your code where you call the Qt function which crashes to see if there is something wrong.
-
@Christian-Ehrlicher said in How to debug crash in qt5core.dll thread:
@Dariusz said in How to debug crash in qt5core.dll thread:
few function down the line it dives in to Qt dlls and dies there.
So you should take a look in your code where you call the Qt function which crashes to see if there is something wrong.
Well it does not crash in my code. It gets a request from my code to set a widget and then it crashes in internal Qt logic. So I cant debug it can I? The only way is to to get stack from qt dlls and see which thread/ptr/item cause issue and figure out why. I take there is a threading problem but I need more info to narrow it down.
-
So did you finally have a valid backtrace as we suggested already many times?
Simplify your code until it no longer crashes. -
@Christian-Ehrlicher Yes I've installed extra modules from QT... I still don't have valid trace. This is all I get >
When I break stop start of the app and step by step all the way to
return a.exec();
There is no crash. The second I hit a.exec() I get a crash. Hell I even see qt widget for a split second with all data populated properly and then it kicks the bucket.So yea, nope I need to see function, location, data etc etc >
I'm still stuck trying to compile the source. :- (
-
After you install the sources and debug info files, you need to set source paths mapping and add CDB symbol paths in the options dialog to make them work in debugging by Qt Creator.
If you are using visual studio, I'm not sure if you can map the sources but you should also add the symbol path.
There's really no need to compile Qt from source. -
@Bonnie Hey, thanks for info! But I'm lost, what paths, to what files ? above all where ? o.o
I went to https://doc.qt.io/qtcreator/creator-debugger-engines.html but I did not find anything about symbols
I've no idea where qt has downloaded the Qt Debug information files :- ( -
@Dariusz
It's quite simple if your are using Qt creator to debug.
In "Source Paths Mapping" of the General tab, click "Add Qt sources..." and choose the Src folder.
Then in "Symbol Paths" of the CDB Paths tab, click "Insert..." and choose the Qt bin folder (that's usually the .pdb files are downloaded to).