fury-gl / fury

FURY - Free Unified Rendering in pYthon.
https://fury.gl
Other
230 stars 163 forks source link

Pytest failing on mac when calling showm.initialize() without starting it #578

Open filipinascimento opened 2 years ago

filipinascimento commented 2 years ago

Description

We are adding new multithreading functionality to the show manager. However, by adding a new test to the test_window.py, we start getting segmentation fault on macs. By further isolating the issue, we found out that this seems to be related to calling the initialize() method for a show manager without starting it (which is already present in the test_save_screenshot test.

Way to reproduce

By using the following code as a pytest

from fury import window

def test1():
    scene = window.Scene()
    show_m = window.ShowManager(scene)
    show_m.initialize()

def test2():
    scene = window.Scene()
    show_m = window.ShowManager(scene)
    show_m.initialize()
    show_m.start()

it fails with a segmentation fault on macs (not sure about other OSes).

This is probably a vtk bug, so I will further explore it using only vtk functions and report to the VTK community.

For now I think the best option would be to have the multithread test in a different file.

skoudoro commented 2 years ago

Hi @filipinascimento,

I can not reproduce the error on my old mac (macbook pro mid-2015). I will try with another OS.

image