Random exits code -1073741819 after switch to PySide2
-
Hey there!
I finally updated my app from Python 3.4 /PySide1 to Python 3.6.5/PySide2 (technical preview 5.11.0): (https://github.com/ewerybody/a2 if you're interested)Now I pretty frequently but still randomly get apprupt exits with code -1073741819 aka 0xc0000005 aka ACCESS VIOLATION?
I wish I could tell you a line where it happens but there is no exception thrown no traceback possible. It just pops with this code. I'm kinda baffled. The actions that I do are pretty basic. From widget redraws to list fills, brush changes ... Nothing that caused any problems on PySide1 ever!
So how can I debug stuff like this? Sometimes I think I tracked it and when I then step into it: It doesn't happen anymore! Its gone in debug! But other times it pops with debug mode as well!
Probably I should compile Qt for Python, run it in debug and step in there via Visual Studio? Or should I just wait for the technical preview phase to be over?
Or are there some suggestions/guidelines for how to do things more solid with PySide objects? How to properly do multi inheritence and use
super()and stuff ..?Sorry for wall of text. But it seems like a heisenbug.
-
Hey! Thanks for all the views already :]
I just discovered the pre-releases section here: https://wiki.qt.io/Qt_for_Python/GettingStarted , uninstalled the technical preview and gave it a shot with a package from there. Seems much more stable so far 🤔
I'll have a look at it. So thats already promising for a future release!
Cheers:
ëRiC -
I think I solved it!
Although I didn't have a clue what caused it exactly I once just stepped through the whole thing and made some changes accordingly.Here is the commit that made my app work again.
Basically made a widget in a tab page with some HTML content arranged in Qt Designer load on demand and not on startup right away.It mostly crashed when the translation kicked in on the
setTextlikeself.a2license_text.setText(QtWidgets.QApplication.translate( ...and here the HTML stuff ...And then I added some more on demand widget builds removing about 80 widgets from the startup. Probably better to have it as slim as possible anyway.