[vtkusers] Activiz Error, vtkImageViewer2 example, "Attempted to read or write protected memory"
David Groppe
david.m.groppe at gmail.com
Tue Jun 12 11:10:23 EDT 2018
Hi all,
I'm trying to run the Activiz PNG reader example:
https://lorensen.github.io/VTKExamples/site/CSharp/IO/PNGReader/
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:
http://vtk.1045678.n5.nabble.com/ActiViz-WindowColor-Memory-Corrupt-td5725980.html
but that did not change anything.
Any ideas on how to fix this?
thanks in advance,
-David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180612/5f719aa9/attachment.html>
More information about the vtkusers
mailing list