Jump to content
Excelsior Forums
gendooly

EXCEPTION_ACCESS_VIOLATION

Recommended Posts

I got the message "EXCEPTION_ACCESS_VIOLATION"

when I ran the program.

It happened at code (Pointer) args.createArray().

But the java and native side programs were compiled successfully.

Is there a way to avoid this?

Thanks in advance.

Share this post


Link to post
Share on other sites

I get a similar error:

An unexpected exception has been detected in native code outside the VM.

Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x184

729D0

Function=[unknown.]

Library=K:\project\PIMS\lib\xFunction.dll

NOTE: We are unable to locate the function name symbol for the error

     just occurred. Please refer to release documentation for possible

     reason and solutions.

I get this error after calling the following C function multiple times (30+):

int32 pipt_tag(int32 pt, char PIPTR * tag, int32 len );

Arguments

pt (passed) Point number

tagname (returned) Tagname buffer

len (passed) Length of the passed tagname buffer

With the following java code

private static long charlength = 40;

...

     xFunction pipt_tag = new xFunction("piapi32", "int pipt_tag(int, CSTRING, int)");

     String tag = "";

     int pt = point.getPointnumber();

     Argument[] args = new Argument[3];

     args[0] = new Argument(pt);

     args[1] = new Argument(tag, Argument.CSTRING);

     args[2] = new Argument(charlength);

     ...

      tag = (String) args[1].getValue();

If I make this call once or twice, the error does not occur. It only occurs, when it is called multiple times

Thanks in advance,

Robert

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×