Qt6 Read Access Violation from QDockAreaLayout
-
By the way, I have found something
I manupulated the xml file via removing geometry="01d9d0cb00030000fffffffffffffff700000780000004060000046c000000b40000077f000003d300000000020000000780000000000000001d0000077f00000405" attribute. When I remove this, there is no crash. If I add it again, it crashes
<mainview> <window state="000000ff00000000fd00000003000000000000010000000237fc0200000001fb00000016006d00610069006e0076006900650077005f0070006e0100000042000002370000007100ffffff00000001fffffffffffffffffc0200000001fb00000016006d00610069006e0076006900650077005f007700610100000000ffffffff0000000000000000000000030000078000000152fc0100000002fb00000016006d00610069006e0076006900650077005f006300770100000000000001790000000000000000fb00000016006d00610069006e0076006900650077005f006400760100000000000007800000011200ffffff0000067b0000023700000004000000040000000800000008fc000000010000000200000001000000660043005f004d00610069006e0056006900650077003a003a0070006f005f006e00650077005f0074006f006f006c005f00620061007200530069006d006f006300720061006e0065002000530065006e0073006f00720020004d006f00640075006c006500730100000000ffffffff0000000000000000" geometry="01d9d0cb00030000fffffffffffffff700000780000004060000046c000000b40000077f000003d300000000020000000780000000000000001d0000077f00000405" navigator="visible"/> <language selected_action_name="english"/> </mainview>
-
Then don't restore the old window state from Qt5.
-
@Christian-Ehrlicher do you know why it is a problem? Is there some behavior change in Qt6?
-
This can really be a bug. This is scenario:
- Delete geometry tag,
- Open app.exe
- Close app (geometry value is created in the xml)
- Open app.exe (geometry value created in 3rd step is used and successful)
- Maximize the window
- Close app (geometry value is created in the xml)
- Open app.exe => The same crash
-
And again - please provide a minimal, compilable example. Noone will look into your full-blown code and even if you report it to bugreports.qt.io noone will look into it until there is a minimal reproducer.
-
@Christian-Ehrlicher The only thing I can say is I am giving "01d9d0cb0003000000000000fffffff9000005ff00000337000001c0000000ac00000521000002eb000000000200000006000000000000000017000005ff00000337" this value m_poMainWindow->restoreGeometry(oOrgDataGeometry); and then I call m_poMainWindow->show();
this value is actually gathered from m_poMainWindow->saveGeometry()..toHex().constData();
the value I wrote above is the value gathered by this method when the user wanted to save the app settings. Currently I cannot support a minimal app but these are the problematic codes -
I have the exact same problem. After upgrading to Qt6, this standard "store/restore" thing started crashing on me.
-
@Martin-Cmar hi and welcome to devnet,
Please provide a minimal compilable example that shows this issue.
In the mean time, did you try to delete the current saved state and trigger a new cycle ?
-
@SGaist Hi, and thanks for welcome :)
Sadly I am in a similar situation as the other guy in the thread. We are working on a big project and providing a minimal sample is almost impossible at this moment. Though I understand that without it, it's hard to say what's wrong.
Yes, removing the old data and starting fresh solves the issue, but since many users run our software, it's not an ideal solution. However, increasing the version number, that is passed into this API effectively causes the same fresh start on their machines as well, so I guess this should be enough.
Either way though, it kinda proves the point that from Qt5 to Qt6, something got changed and loading the data from previous version leads to some memory corruption, so I still think this should be solved somehow officially.
-
@Martin-Cmar thanks for chiming in. Rather than reducing your application, can you trigger that from a dummy minimal application ?