Repository navigation
ENH: Use Qt backend for doc build - #10359
Conversation
|
Oh, this seems complicated. There is no immediate idea I get when looking at this. I thought, when a PyQtBrowser-object is garbage-collected all attributes should be garbace-collected too. Or what does this mean with the methods above? |
Yes in theory this should happen, the python garbage collector should recognize when all references are gone, or when the only remaining ones are circular. But once you start interacting with C++ libraries it becomes harder. @GuillaumeFavelier for example has had to do a bunch of gymnastics with the Brain class to take care of the interactions with VTK. I think we might end up having to do the same thing with mne-qt-browser. The easiest way to get to the bottom of it is to first come up with some minimal example, which we more or less have with the command above. Then, if it's possible to make the PyQtGraphBrowser object do as little as possible by removing almost all functionality and attributes, that's the best first step. Hopefully that doesn't show the problem. If that's the case, then functionality / attributes / connections can be restored little by little to see where the problem is. Any problematic things can be dealt with in a cleanup that explicitly removes references, e.g.: mne-python/mne/viz/_brain/_brain.py Lines 720 to 752 in c874944 |
|
Just adding that the |
|
@marsipu I'm working on this a little bit now. FYI you'll need to be on the branch from this PR to properly test: |
|
Possible solution in mne-tools/mne-qt-browser#61 -- @marsipu I'm out of time for the day, but if you merge that, feel free to push a commit here with |
|
Okay, the full build passed: Ready for review/merge from my end @agramfort ! |
|
I'm actually going to put this in since @marsipu is happy already. That way, we can get things built and have tomorrow and Tues to look them over. But @agramfort or others if you have comments, feel free to make them here and I can make a follow-up PR! |
@marsipu I can see the gc failure with the following in the
docfolder:It gives us at least some debugging leads on what could be causing
gcnot to be able to collect thePyQtGraphBrowserinstances.