Hi James, Troubleshooting an intermittent segfault can be summarized as an exercise in frustration, causes can be all over the place, but it can be really tough. One thing you can do is enable the python faulthandler <https://docs.python.org/3/library/faulthandler.html>. This may help with identifying where in the code things are blowing up (but that's not necessarily a guarantee that that is where the issue is).
If you are unable to reproduce the issue with any reliability (which I maintain doing this is a critical step and effort should be made to attempt to do this), and migrating to a different binding is feasible, I would recommend doing that. That's no guarantee to fix the issue though. Some other frequent causes of segfaults can involve the python garbage collection cleaning up an object that may have some kind of internal Qt reference. These can sometimes occur when using the `del` operator or calling `gc.collect()`. Here is a link <https://github.com/pyqtgraph/pyqtgraph/pulls?q=is%3Apr+is%3Aclosed+segfault>to closed PRs with the word "segfault" in there. Not all these PRs addressed a segfault, but you can see what changes were made to fix some segfaults. Hope that helps, Ogi On Thu, Jul 7, 2022 at 8:16 AM James Campbell <[email protected]> wrote: > I'm using pyqtgraph in a PyQt5 app. I have a tabbed window (outside the > main window) where each tab has a figure. Sometimes, when resizing a the > window displaying a figure, I'll randomly get a segfault crash. This > happens infrequently, and usually I dont run uinto this error. > > The annoying thing is that these segfaults are not reproducible as far as > I can tell. > > Does anyone have any good advice on how one goes about debugging such > issues? Are there well known issues that may cause such sporadic crashes? > > I was considering updating my app to PyQt6 to see if that will help > things. Is PyQt6 more stable in this regard? > > Thanks > > > -- > You received this message because you are subscribed to the Google Groups > "pyqtgraph" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/pyqtgraph/9b54d993-934a-4719-aa61-d9869a4c3a03n%40googlegroups.com > <https://groups.google.com/d/msgid/pyqtgraph/9b54d993-934a-4719-aa61-d9869a4c3a03n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "pyqtgraph" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/CA%2BnduTFfDcQ9KH3E02UFkrZEiRX3tMsdU9i87E%2BrtWG2b_jkeQ%40mail.gmail.com.
