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

Bill Lorensen bill.lorensen at gmail.com
Fri Sep 8 19:47:29 EDT 2017


Normally we don't create OpenGL classes. Try using
vtkPolyDataMapper and vtkActor.


On Fri, Sep 8, 2017 at 6:38 PM, Jay <jayavardhanravi at outlook.com> wrote:
> 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
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the vtkusers mailing list