Qt app crashes
-
Hello everyone, I'm currently making an app in Qt and now, I have updated to Qt 6.2.0 version and when I try to run it, it crashes immediatly.
I tried to debug it and this is what it showed:
and it opens the qstring.h file:
do you guys know why it's telling this? -
@HenkCoder Oh wait, i know the error, I opened a JSON file in the location of the exe +
/settings.json
but now that I have updated it, it changed.
Thank you guys for the help tho.
Sorry for my misunderstanding and for wasting your time. -
@HenkCoder Without seeing your code my crystal ball tells me you do operations on the QString that went out of scope or something. Do you try to assign the value to the object/member of who has already been deleted or not initialised?
-
@HenkCoder
The bottom-left pane is what we are interested in. It shows the crash is coming in someQFontComboBox
, apparently in response to someQComboBox
'sQLineEdit
's text being changed. You do not show the full stack trace, scroll down in that pane to see where it ultimately emanates from in your code, e.g. inmain()
or whatever. You might check whether your code uses aQFontComboBox
anywhere.As for why, or what has changed when maybe it worked in a previous Qt version, I do not know. Somebody else may comment....
-
@JonB Hello, found out the problem was in here
But i still don't know how to resolve this.
In Qt 6.1.3 the code worked fine but now it doesn't.
This is the JSON file:{ "font": { "family": "Calibri", "pointSize": 11, "bold": false, "italics": false, "underline": false, "foregroundColor": { "red": 0, "green": 0, "blue": 0 }, "backgroundColor": { "red": 255, "green": 255, "blue": 255 } }, "toolBarColor": { "red": 154, "green": 244, "blue": 230 }, "defaultSavingLocation": "Documents", "defaultOpenLocation": "Documents", "defaultPictureLocation": "Pictures", "darkTheme": false }
-
@HenkCoder Oh wait, i know the error, I opened a JSON file in the location of the exe +
/settings.json
but now that I have updated it, it changed.
Thank you guys for the help tho.
Sorry for my misunderstanding and for wasting your time.