Skip to content
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

MAINT: Better test fixtures #7358

Merged
merged 7 commits into from
Mar 2, 2020
Merged

MAINT: Better test fixtures #7358

merged 7 commits into from
Mar 2, 2020

Conversation

larsoner
Copy link
Member

@larsoner
Copy link
Member Author

Failed but the traceback was truncated, restarting

@larsoner
Copy link
Member Author

This does not fix the problem:

https://dev.azure.com/mne-tools/mne-python/_build/results?buildId=5679&view=logs&j=b195a6e3-7484-5943-e627-0b35c27605d6&t=6dcb3581-08d4-5e76-74f2-6edaf20ff912&l=225

  File "D:\a\1\s\conda\lib\site-packages\tvtk\pyface\ui\qt4\QVTKRenderWindowInteractor.py", line 370 in paintEvent
  File "D:\a\1\s\conda\lib\site-packages\tvtk\pyface\ui\qt4\scene.py", line 69 in paintEvent
  File "D:\a\1\s\conda\lib\site-packages\pyface\ui\qt4\gui.py", line 85 in process_events
  File "D:\a\1\s\conda\lib\site-packages\surfer\viz.py", line 183 in _force_render
  File "D:\a\1\s\conda\lib\site-packages\surfer\viz.py", line 550 in _toggle_render
  File "D:\a\1\s\conda\lib\site-packages\surfer\viz.py", line 487 in __init__
  File "D:\a\1\s\mne\viz\_3d.py", line 2385 in plot_vector_source_estimates

So we have some persistent problem with TVTK where paintEvent tries to draw something that should not be drawable.

I'll try tweaking mayavi again, I had another idea for what might help. We'll see!

@codecov
Copy link

codecov bot commented Feb 26, 2020

Codecov Report

Merging #7358 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #7358      +/-   ##
==========================================
+ Coverage   89.96%   89.96%   +<.01%     
==========================================
  Files         451      451              
  Lines       81630    81847     +217     
  Branches    12956    12982      +26     
==========================================
+ Hits        73435    73631     +196     
- Misses       5372     5386      +14     
- Partials     2823     2830       +7

@larsoner
Copy link
Member Author

After many restarts, I was finally able to see the problem even on my mayavi branch:

Thread 0x0000055c (most recent call first):
  File "D:\a\1\s\conda\lib\site-packages\tvtk\pyface\ui\qt4\QVTKRenderWindowInteWindows fatal exception: raccess violationa

ctor.py", line 379 in paintEvent

So it's still the paintEvent/self._RenderWindow.Render() call breaking things.

Time to try another thing, which is adding self._Iren.SetRenderWindow(None) in the Finalize call. But this is almost just a shot in the dark...

@larsoner
Copy link
Member Author

Okay I new think the problem is more likely that there is some VTK object that tries to draw before the window is closed (which is reasonable behavior) but some underlying memory (e.g., NumPy array) has been GC'ed so it gets an access violation.

Not sure how best to track that down, but I'll see if upping the VTK verbosity and running with -s helps.

@larsoner larsoner changed the title WIP: Try to fix PySurfer failures MAINT: Better test fixtures Feb 27, 2020
@larsoner
Copy link
Member Author

Okay I'm abandoning the PySurfer/mayavi stuff, leaving #7294 as a reminder of the failures.

I did find some minor issues by testing with -vs on Azure, though, so I'm changing the title and just making this a maintenance PR to improve our testing a bit.

@larsoner larsoner merged commit 56f98a7 into mne-tools:master Mar 2, 2020
@larsoner larsoner deleted the force branch March 2, 2020 14:59
AdoNunes pushed a commit to AdoNunes/mne-python that referenced this pull request Apr 6, 2020
* WIP: Try to fix PySurfer failures

* FIX: Try fixing Mayavi

* ENH: Speed up failure (hopefully)

* FIX: Try again

* FIX: Try another

* FIX: Better testing

* FIX: MPL version
AdoNunes pushed a commit to AdoNunes/mne-python that referenced this pull request Apr 6, 2020
* WIP: Try to fix PySurfer failures

* FIX: Try fixing Mayavi

* ENH: Speed up failure (hopefully)

* FIX: Try again

* FIX: Try another

* FIX: Better testing

* FIX: MPL version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant