I am using vtk in c#. Access violation exception occured while i was executing a line of code such as "this.SetMinimumU(0.0);"
Error detail and code snippet is below mentioned. Please suggest me if anyone faced this issue.
An unhandled exception of type 'System.AccessViolationException' occurred in Kitware.VTK.dll
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Code snippet is below
public class AcessViolation : vtkParametricFunction
{
static IntPtr ptr=new IntPtr();
public AcessViolation():base(ptr,true,true)
{
try
{
this.SetMinimumU(0.0);
}
catch (Exception ex)
{
}
}
}