gallantlab / pycortex

Pycortex is a python-based toolkit for surface visualization of fMRI data
https://gallantlab.github.io/pycortex
BSD 2-Clause "Simplified" License
592 stars 138 forks source link

FIX random crashes in `save_3d_views` #445

Closed mvdoc closed 2 years ago

mvdoc commented 2 years ago

I realized that after calling getImage, sometimes the view was not rendered. I believe this is what caused the random crashes with save_3d_views. Forcing the view to be drawn again after getImage solves the random crashes. (Or at least, I've been running cortex.export.plot_panels for ~20 times in a loop and it hasn't crashed...