[vtk-developers] Rendering hangs in viewport

Taras Shchehelskyi shchegelskij at gmail.com
Tue Jul 5 07:00:12 EDT 2016



Hello,

I am part of the team that is working on project that uses VTK 7.0 for rendering mesh grid (not big, about 400k triangles) couple point clouds (about 8000 – 30000 points per cloud, up to 4 clouds) + couple very simple meshes. Our app can work fine for 12-15h for then main viewport hangs. When I do some mouse interaction (click + move or scroll) some meshes became invisible for couple seconds and that became visible again. Also when I resize viewport window scene aspect ratio became wrong. It works like aspect ratio does not depends of viewport size. 

Also we noticed other strange thing. Our point clouds update dynamically during app work. We create 2 classes:
class CameraPointCloudSource : public vtkPolyDataAlgorithm
and
class PointCloudColoring : public vtkPolyDataAlgorithm.

I pass data (vtkPolyData with initialized points and vertexes) from CameraPointCloudSource to PointCloudColoring. I setup pipeline that output of the CameraPointCloudSource is input of the PointCloudColoring.

Sometimes (can’t always reproduce this) CameraPointCloudSource:: RequestData stops to be called and CameraPointCloudSource::RequestData always get the same input data (the same point cloud the same with the same points). As result I always see in viewport the same point cloud visualization. I checked, code that responsible for point cloud generation works fine and produce correct point clouds.

For test we also tried to use new VTK PointCloud filters. There we also noticed similar behavior. We set filters chain.  Alter some long time (> 12h of work) sometimes some filters star producing the same output that not depends of input point cloud. Interesting that some filters work fine and some start producing the same output. This issue can be in combination with viewport rendering hangs. Sometimes can happen before hang. Sometimes can happen after rendering hang. 

Our app uses many threads for generating data. We have many mutexes to protect data. But we are pretty sure that there are no deadlocks. Also we checked couple times that we not share Actors and Mappers between threads. We have couple viewports. But I was able to reproduce bug even when only one viewport is active. Interesting that when one viewport can hang, other viewports that uses the same data can work fine.

We are using Windows 7/10 x64 and MS VS 2013.


Any ideas what can lead to this problem?

P.S. Sorry for my English, I am not a native speaker.


Thanks,
Taras
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160705/892e5272/attachment.html>


More information about the vtk-developers mailing list