Nov 4, 2009 12:39 AM
ArrayIndexOutOfBoundException returning from DLL Native Call
I am receiving the following Error as a result of returning from the "register()" method of a DLL that was created with Delphi. The register call takes a single parameter that is a pointer to a structures. The function reads initialization information from the structure and updates a few relevent fields in the structure before returning from the method. I was able to use the Delphi debugger to step through the DLL code, and all code gets executed correctly, up to the point were the function returns the return code, at which point this exeception is thrown. I have verified that the OUT fields in the structure have the correct values. In fact this method call was working fine until I added additional code which calls a method in a different DLL from the first DLL, and the debugger revealed that the call to the second DLL returned without issue.
Does anyone have any ideas to what can cause the ArrayIndexOutOfBoundsException from simple return a return code from the end of a native C Function call?
Thanks, Rob A.
java.lang.ArrayIndexOutOfBoundsException
at com.jniwrapper.Function.invokeCFunc(Native Method)
at com.jniwrapper.FunctionCall.a(SourceFile:127)
at com.jniwrapper.FunctionCall.call(SourceFile:35)
at com.jniwrapper.Function.invoke(SourceFile:188)
at com.jniwrapper.Function.invoke(SourceFile:212)
at com.compositeideas.peerlink.peerlet.app.filemanagement.event.driver.win.EventServiceImpl.register(EventServiceImpl.java:97)
at com.compositeideas.peerlink.peerlet.app.filemanagement.event.driver.win.Activator.start(Activator.java:93)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)I