views:

36

answers:

1

Hi,

I am compiling a project into a .dll and trying to use it in another project. For most of the functions I use in this library, I get a System.AccessViolationException exception :

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at nglib.Ng_GetPoint(Void** , Int32 , Double* ) at ForwardModelingPlugin.CustomMeshVol3D.tesselate(CustomMeshVol3D* )

The lib I am using is called nglib - part of netgen, an open source mesher.

I have read a lot of related errors, but I don't understand why it is happening. And I cannot go into this library because it's unmanaged and the rest of my project is managed.

Thanks

A: 

AccessViolationException means either:

  1. There is a bug in the library you are using, or
  2. You are passing the library invalid arguments.
Billy ONeal
Right. Some object is being converted into a Void** at some point, don't know why.
ChRtS