Re: Assertion fails when calling java.lang.reflect.Method.invoke()

David Bélanger <[email protected]> Sun, 20 Feb 2005 18:29:16 -0500
Newsgroups gmane.comp.java.vm.sablevm.devel
Message-ID <[email protected]>
On Fri, Feb 18, 2005 at 11:55:51AM -0500, [email protected] wrote:
> Hi all,
> 
> While developing a Java application that starts another Java application, I met a strange 
> SableVM 1.1.9 behaviour. An assertion fails when I put wrong parameters into 
> Method.invoke() call. The error in the StartAppHelper.run() function:
>   mainMethod.invoke(null, this.parameters); // parameters is String[]
> should be
>   mainMethod.invoke(null, this.parameterList); // parameterList is Object[]
> 
> This happens only when enabling SableVM debugging features (SableVM 1.1.9 compiled with 
> options --enable-debugging-features --disable-errors-on-warnings).
> 
> Here is the command to compile it:
> jikes -g -bootclasspath ~{...}/sablevm/sablevm-classpath/ Bridge.java
> 
> Here is the command to launch it:
> /svm119/bin/sablevm -Y --classpath={...} -p 
> java.library.path={...}--property=sablevm.bridge.start --property=java.compiler=NONE Bridge
> 
> The output with the right code or erroneous code without debugging features:
> >JAVA : get the property
> >start org.eclipseguide.hello.HelloWorld
> >JAVA : helper creation
> >JAVA : helper setup
> >JAVA : helper start
> >Hello, World! greetings from Sablevm
> >Hello, World! greetings from Sablevm
> >Hello, World! greetings from Sablevm
> 
> The output with the erroneous code and debugging features:
> >JAVA : get the property
> >start org.eclipseguide.hello.HelloWorld
> >JAVA : helper creation
> >JAVA : helper setup
> >JAVA : helper start
> >sablevm: util1.c:318: _svmf_get_reference_array_element: Assertion `indx >= 0 && indx < 
> array->size' failed.
> >Abandon

Bug confirmed on SableVM/staging.
Will look into it later today or tomorrow.

David

---

David Bélanger
Web page:   http://www.cs.mcgill.ca/~dbelan2/
Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt