[vtkusers] Llvmpipe threads collapses the system when capturing a screenshot
Patricio Palma C.
patriciop at gmail.com
Thu Feb 22 18:07:53 EST 2018
Hi All
I’m using vtkWindowToImageFilter to export screenshots of a
vtkXOpenGLRenderWindow. It works, but every time a screenshot is created,
15 new llvmpipe threads are spawned and they are not finalized by the app.
I noticed this because after a while the number of threads reached the
limit (about 5500) and no more threads can be spawned.
This application is running linux RH 6.6 / VTK 7.1 / mesa 17.0.6
Source code extract:
vtkSmartPointer<vtkRenderer> osRenderer =
vtkSmartPointer<vtkRenderer>::New();
vtkSmartPointer<vtkXOpenGLRenderWindow> renWin =
vtkSmartPointer<vtkXOpenGLRenderWindow>::New();
renWin->SetOffScreenRendering(true);
renWin->AddRenderer(osRenderer);
renWin->SetSize(pictureSize.width(), pictureSize.height());
// copyActors from QVTKWidget2
vtkSmartPointer<vtkWindowToImageFilter> filter =
vtkSmartPointer<vtkWindowToImageFilter>::New();
filter->SetInput(renWin);
filter->SetInputBufferTypeToRGB();
filter->SetMagnification(1);
filter->Update();
vtkSmartPointer<vtkImageData> image = filter->GetOutput();
…
(continue using image)
At this moment I’m using an empty RenderWindow, I thought actors could have
a problem so I commented that out but the problem persists.
After some testing I’ve noticed that the problem arise after calling
filter->Update(). If this line is commented, no picture is generated but
the threads are finalized.
Any ideas on how can I track this issue or where should I continue looking
for an issue in my code?
Regards
Patricio
--
Patricio Palma C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180222/89b4cd50/attachment.html>
More information about the vtkusers
mailing list