Crash when using mouse on Poly data being loaded

Hello,
We have an application that loads data with many poly lines. In short, if hundred data sets are loaded, each one having ~1 - 100k poly lines, one by one, the program randomly crashes if the user uses the mouse to rotate the view. If the mouse is not used to rotate the view, while “loading”, there is no crash.

If run in the debugger, the AV is often in vtkOpenGLPolydataMapper on line 4098:

This application is a QT C++ Windows application using vtk 9.1.

The data is internally read into vtk data objects and assigned to a vtkActor whos visibility is initially set to false.
We see different behavior on different machines, perhaps indicating this is a threading issue…?

We are disabling the interactor while loading for now to avoid the crashes…

Hello,

Is your app multithreaded? If so, do make sure you don’t make OpenGL calls (via VTK) from different threads. If this is not the case, then I suggest you to add the actor to the scene only after loading finishes. I don’t know much about VTK bowels, but making it invisible may not prevent some OpenGL-related operations such as building triangle strips and such.

take care,

PC

The application is multithreaded, and I’m well aware of not making render calls from a thread for example.
I will check in on adding the actors after loading/constructing the VTK data to see if that may fix our problem.

Thanks!