[vtkusers] QT/VTK application: Access violation on vtkTransform inside a QTimer event

Elvis Chen elvis.chen at gmail.com
Tue Nov 8 09:39:32 EST 2011


hi all,

I'm writing an application base on QT/VTK, using 3D positional tracking
system.  The pose of an tracked object is returned as a vtkTransform, and
it is obtained using a QTimer event.  The timing interval is set at 0, thus
it is updating the vtkTransform continuously (or as fast as the
computer/tracking system can).

The vtkTransform is defined as an class object and it would be accessed by
other class members.  However, I noticed that sometimes wI would get an
access violation error:


First-chance exception at 0x60c48183 (vtkCommon.dll) in my.exe: 0xC0000005:
Access violation reading location 0xfeeeff36.
Unhandled exception at 0x60c48183 (vtkCommon.dll) in my.exe: 0xC0000005:
Access violation reading location 0xfeeeff36.
The program '[5788] my.exe: Native' has exited with code -1073741819
(0xc0000005).

and the place where the access violation occurs is in

vtkAbstractTransform::GetMTime

    unsigned long inverseMTime = this->MyInverse->GetMTime();

which is being updated in the QTimer event.


What would be proper mechanism to prevent such access violation?

any help is very much appreciated,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111108/691bbf53/attachment.htm>


More information about the vtkusers mailing list