-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
segfault when clicking on Source #254
Conversation
OK so in reviewing this I noticed that I could not reproduce the original bug on the version of pyqt5 specified on latest master, but if I first:
then I can reproduce and I confirm this PR does fix the segfault 🎉. It's possible this is a qt bug, but it's also possible that we are using pyqt improperly i.e. we are referencing the Python wrapper for an object that qt has deleted, check out this document for more details on the interplay between pyqt and qt, that might be a useful starting point. |
@redshiftzero Thanks for linking me to that doc! This sorta seems like an ownership issue since the segfault is happening when (Pdb) button = QPushButton("push")
(Pdb) button.isVisible()
False
(Pdb) self.view_layout.addWidget(widget)
[1] 24061 segmentation fault ./run.sh When stepping though the code, I noticed that setting Another solution might require more of a redesign, but hopefully there's something in between rewriting |
0f56adf
to
219b300
Compare
More info on troubleshooting this issue:
@heartsucker do you have any thoughts or ideas on what could be happening? |
@creviera I think the best I can guess is that we're having issues with the parent/child relationships being correctly established. From the docs, it looks like this should raise a |
So upon further investigation, this appears to be an upstream issue. Check out this branch and see if you can trigger the segmentation fault. The investigation process here inspecting the core dump for the segfault:
Searching the QTbug tracker for issues involving Now there is also the possibility there is another upstream issue with the CSS stylesheets, the way to fully validate that QTBUG-69204 is the culprit would be to apply the patch here, recompile qt and then verify that Then going forward, we can do one of the following:
|
2d44038
to
a76a27e
Compare
a76a27e
to
7a22a6b
Compare
@redshiftzero, ready for final review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confirming on this branch that I don't hit the segfault on PyQt 5.12, this should unblock us until PyQt 5.12.1 is released
Fixes #248 where the client crashes when a user clicks on a source from the sources list.
When debugging the client I could see that crash happened when adding the widget to the
view_layout
:TODO: Still more research needs to be done as to why Qt crashes when a widget isn't set to visible.