[vtkusers] Application crashes unexpectedly - widgets (vtkCanvas)

Allan James ar.james at qut.edu.au
Sun Jan 29 18:42:52 EST 2006



Hi there,

I am reasonably new to VTK and i am having a problem with the latest 
CVS version built on Windows XP using Visual Studio 2005.
I am using Java and my application, for the most part, is working 
fine.. except when I try to add 3D Widgets.

I have tried to add vtkPlaneWidget and vtkImplicitPlaneWidget which I 
want to eventually use to cut through a vtkStructuredGrid to view a 
cross-section.
However my application crashes after a short period of time...
I believe it is when I interact with the Window, 10-15 seconds later 
it crashes with:


# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0e61c59b, pid=3596, tid=556
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode)
# Problematic frame:
# C  [vtkWidgets.dll+0xcc59b]


The only post I can find that seems similar to my problem is here 
http://public.kitware.com/pipermail/vtkusers/2003-October/070328.html
A solution was posted but no explanation was provided and I cannot 
work out how to prevent my app from crashing..

Any help would be greatly appreciated..  here is the code I am using 
to create the widget
also I am using vtkCanvas...

         vtkPlaneWidget planeWidget = new vtkPlaneWidget();
         planeWidget.SetInteractor(getInteractor());
         planeWidget.SetInput(stressData.getDataSet());   // vtkDataSet
         planeWidget.SetPlaceFactor(1.0);
         planeWidget.PlaceWidget();
         planeWidget.SetOrigin(0,0,0);
         planeWidget.UpdatePlacement();
         planeWidget.EnabledOn();

Thanks again for any help!
Allan




More information about the vtkusers mailing list