[vtkusers] VTK Render Window Crashes after 6 hours of running

Jay jayavardhanravi at outlook.com
Fri Sep 8 18:38:01 EDT 2017


I created a simple project to render the sphere to render window. The
rendering works fine with no issues. vtkTransform is used to rotate the
sphere. The rendering is left to run for a long time. After 6 hours 40
minutes the VTK application crashes with error message shown below:

ERROR :/ *Exception thrown at 0xeqwewqeqwe (nvoglv32.dll) in XXXX.exe:
0xC0000005: Access violation reading location 0x00000020.*/

My system uses the NVIDIA Graphic card. And my memory usage is low at the
time of crashing.
NVIDIA Memory usage : 
/<fb_memory_usage>
	<total>4096 MiB</total>
	<used>387 MiB</used>
	<free>3709 MiB</free>
</fb_memory_usage>
<bar1_memory_usage>
	<total>256 MiB</total>
	<used>4 MiB</used>
	<free>252 MiB</free>
</bar1_memory_usage>/

Code used:

/#include <vtkRenderWindowInteractor.h>
#include <vtkSmartPointer.h>
#include <vtkOpenGLActor.h>
#include <vtkOpenGLPolyDataMapper.h>
#include <vtkSphereSource.h>
#include <vtkTransform.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>

int main()
{
	vtkSmartPointer<vtkSphereSource> src =
vtkSmartPointer<vtkSphereSource>::New();
	src->SetRadius(5);
	src->Update();
	vtkSmartPointer<vtkTransform> tran = vtkSmartPointer<vtkTransform>::New();
	vtkSmartPointer<vtkOpenGLPolyDataMapper> maper =
vtkSmartPointer<vtkOpenGLPolyDataMapper>::New();
	maper->SetInputConnection(src->GetOutputPort());
	vtkSmartPointer<vtkOpenGLActor> act =
vtkSmartPointer<vtkOpenGLActor>::New();
	act->SetMapper(maper);
	act->SetUserTransform(tran);
	vtkSmartPointer<vtkRenderer> rer = vtkSmartPointer<vtkRenderer>::New();
	vtkSmartPointer<vtkRenderWindow> rew =
vtkSmartPointer<vtkRenderWindow>::New();
	vtkSmartPointer<vtkRenderWindowInteractor> rei =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
	rer->AddActor(act);
	rew->AddRenderer(rer);
	rew->SetInteractor(rei);
	rei->Initialize();
	while (true)
	{
		tran->RotateX(90);
		rer->Modified();
		rew->Render();
	}
}/



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list