Activiz Error, vtkImageViewer2 example, "Attempted to read or write protected memory"

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Activiz Error, vtkImageViewer2 example, "Attempted to read or write protected memory"

David Groppe
Hi all,
   I'm trying to run the Activiz PNG reader example:

I changed filepath to be a png file on my machine:
string filePath = @"C:\Users\dgrop\Downloads\cthead1.png";

And the file can be opened fine. However, the following line:
    imageViewer.SetRenderer(renderer);

throws the following error:

System.AccessViolationException
  HResult=0x80004003
  Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
  Source=<Cannot evaluate the exception source>
  StackTrace:
<Cannot evaluate the exception stack trace>

I've tried moving the variable declarations to the Public Partial Class level as suggested here:


but that did not change anything.

Any ideas on how to fix this?
    thanks in advance,
         -David

_______________________________________________
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:
https://public.kitware.com/mailman/listinfo/vtkusers