[kaffe] HelloWorld > NullPointerException > Aborted

Christophe Andral christophe.andral at gmail.com
Tue Mar 28 00:50:24 PST 2006


Hi all.

I'm trying to run a HelloWorld on my arm but it craches anyway.

I use the standard gcc cross-compiler and configure kaffe as this :

KAFFEH=/my-x86-build/kaffe-1.1.6/kaffeh/bin/kaffeh \
./configure \
--host=arm-linux \
--build=i686-linux \
--disable-alsatest --disable-esdtest \
--enable-pure-java-math \
--with-jikes \
--without-classpath-gtk-awt \
--without-alsa --without-esd \
--with-kaffe-awt-qt --with-qtdir=$QTDIR \
--with-threads=unix-jthreads \
--enable-xscale

This kind of build works on my scratch-box, but not on my arm.

I ever tried unix-pthreads, unix-jthreads, engine intrp, engine jit, with and
without xscale option but no way to work om my arm :(

My arm uname is : armv5tejl

Here is various debugging lines on my arm:

--------------------------------
[...]
findMethodLocal(java/util/HashMap,<init>,()V) -> 0x17acd8
getMethodSignatureClass(java/util/HashMap,<init>,()V) -> success
@7:     areturn
<JIT: java/lang/VMClassLoader.classAssertionStatus()Ljava/util/Map; time 10ms
(16236ms) @ 0x243810>
soft_fixup_trampoline(): return 0x243810
findMethodLocal(java/lang/ClassLoader$StaticData,<clinit>,()V) -> 0x177b04
findMethodLocal(java/lang/ThreadGroup,addThread,(Ljava/lang/Thread;)V) 
-> 0x1b2660
soft_fixup_trampoline(): meth 0x1b2660, where 0x1b2674, native code 0x1b2674
asked to translate = java/lang/ThreadGroup.addThread((Ljava/lang/Thread;)V)
*** getField(java/lang/ThreadGroup,groups,Ljava/util/Vector;)
*** getField(java/lang/ThreadGroup,threads,Ljava/util/Vector;)
findMethodLocal(java/util/Vector,add,(Ljava/lang/Object;)Z) -> 0x1be660
getMethodSignatureClass(java/util/Vector,add,(Ljava/lang/Object;)Z) 
-> success
Loading
java/lang/IllegalThreadStateException.class(/mnt/sda/build-arm//jre/lib/rt.jar)
[compressed]
findMethodLocal(java/lang/IllegalThreadStateException,<init>,
(Ljava/lang/String;)V)
-> 0x21ac04
getMethodSignatureClass(java/lang/IllegalThreadStateException,<init>,
(Ljava/lang/String;)V)
-> success
successfully verified = java/lang/ThreadGroup.addThread((Ljava/lang/Thread;)V)
@0:     aload 0
@1:     getfield 42
*** getField(java/lang/ThreadGroup,groups,Ljava/util/Vector;)
@4:     ifnonnull 17
@7:     new 115
@10:    dup
@11:    ldc1 221
@13:    invokespecial 222
findMethodLocal(java/lang/IllegalThreadStateException,<init>,
(Ljava/lang/String;)V)
-> 0x21ac04
getMethodSignatureClass(java/lang/IllegalThreadStateException,<init>,
(Ljava/lang/String;)V)
-> success
@16:    athrow
@17:    aload 0
@18:    getfield 71
*** getField(java/lang/ThreadGroup,threads,Ljava/util/Vector;)
@21:    aload 1
@22:    invokevirtual 226
findMethodLocal(java/util/Vector,add,(Ljava/lang/Object;)Z) -> 0x1be660
getMethodSignatureClass(java/util/Vector,add,(Ljava/lang/Object;)Z) 
-> success
@25:    pop
@26:    return
<JIT: java/lang/ThreadGroup.addThread(Ljava/lang/Thread;)V time 36ms (16272ms) 
@
0x23a060>
soft_fixup_trampoline(): return 0x23a060
findMethodLocal(java/lang/Thread,<init>,
(Ljava/lang/VMThread;Ljava/lang/String;IZ)V)
-> 0x1b4a5c
soft_fixup_trampoline(): meth 0x1b4a5c, where 0x1b4a70, native code 0x1b4a70
asked to translate =
java/lang/Thread.<init>((Ljava/lang/VMThread;Ljava/lang/String;IZ)V)
findMethodLocal(java/lang/Object,<init>,()V) -> 0xbd68c
getMethodSignatureClass(java/lang/Object,<init>,()V) -> success
*** getField(java/lang/Thread,vmThread,Ljava/lang/VMThread;)
*** getField(java/lang/Thread,runnable,Ljava/lang/Runnable;)
*** getField(java/lang/Thread,name,Ljava/lang/String;)
*** getField(java/lang/Thread,priority,I)
*** getField(java/lang/Thread,daemon,Z)
findMethodLocal(java/lang/ClassLoader,getSystemClassLoader,
()Ljava/lang/ClassLoader;)
-> 0xf5480
getMethodSignatureClass(java/lang/ClassLoader,getSystemClassLoader,
()Ljava/lang/ClassLoader;)
-> success
*** getField(java/lang/Thread,contextClassLoader,Ljava/lang/ClassLoader;)
findMethodLocal(java/lang/StringBuffer,<init>,(Ljava/lang/String;)V) 
-> 0x13ccb4
getMethodSignatureClass(java/lang/StringBuffer,<init>,(Ljava/lang/String;)V) 
-> success
*** getField(java/lang/Thread,numAnonymousThreadsCreated,I)
*** getField(java/lang/Thread,numAnonymousThreadsCreated,I)
findMethodLocal(java/lang/StringBuffer,append,(I)Ljava/lang/StringBuffer;) ->
0x13c480
getMethodSignatureClass(java/lang/StringBuffer,append,
(I)Ljava/lang/StringBuffer;)
-> success
findMethodLocal(java/lang/StringBuffer,toString,()Ljava/lang/String;) -> 0x13cad4
getMethodSignatureClass(java/lang/StringBuffer,toString,()Ljava/lang/String;) 
-> success
successfully verified =
java/lang/Thread.<init>((Ljava/lang/VMThread;Ljava/lang/String;IZ)V)
@0:     aload 0
@1:     invokespecial 269
findMethodLocal(java/lang/Object,<init>,()V) -> 0xbd68c
getMethodSignatureClass(java/lang/Object,<init>,()V) -> success
@4:     aload 0
@5:     aload 1
@6:     putfield 63
*** getField(java/lang/Thread,vmThread,Ljava/lang/VMThread;)
@9:     aload 0
@10:    aconst 0
@11:    putfield 142
*** getField(java/lang/Thread,runnable,Ljava/lang/Runnable;)
@14:    aload 2
@15:    ifnonnull 44
@18:    new 178
@21:    dup
@22:    ldc2 263
@25:    invokespecial 181
findMethodLocal(java/lang/StringBuffer,<init>,(Ljava/lang/String;)V)
 -> 0x13ccb4
getMethodSignatureClass(java/lang/StringBuffer,<init>,(Ljava/lang/String;)V) 
-> success
@28:    getstatic 265
*** getField(java/lang/Thread,numAnonymousThreadsCreated,I)
@31:    iconst 1
@32:    iadd
@33:    dup
@34:    putstatic 265
*** getField(java/lang/Thread,numAnonymousThreadsCreated,I)
@37:    invokevirtual 194
findMethodLocal(java/lang/StringBuffer,append,(I)Ljava/lang/StringBuffer;) 
-> 0x13c480
getMethodSignatureClass(java/lang/StringBuffer,append,
(I)Ljava/lang/StringBuffer;)
-> success
@40:    invokevirtual 188
findMethodLocal(java/lang/StringBuffer,toString,()Ljava/lang/String;) 
-> 0x13cad4
getMethodSignatureClass(java/lang/StringBuffer,toString,()Ljava/lang/String;) 
-> success
@43:    astore 2
@44:    aload 0
@45:    aload 2
@46:    putfield 92
*** getField(java/lang/Thread,name,Ljava/lang/String;)
@49:    aload 0
@50:    iload 3
@51:    putfield 97
*** getField(java/lang/Thread,priority,I)
@54:    aload 0
@55:    iload 4
@57:    putfield 121
*** getField(java/lang/Thread,daemon,Z)
@60:    aload 0
@61:    invokestatic 291
findMethodLocal(java/lang/ClassLoader,getSystemClassLoader,
()Ljava/lang/ClassLoader;)
-> 0xf5480
getMethodSignatureClass(java/lang/ClassLoader,getSystemClassLoader,
()Ljava/lang/ClassLoader;)
-> success
@64:    putfield 161
*** getField(java/lang/Thread,contextClassLoader,Ljava/lang/ClassLoader;)
@67:    return
<JIT: java/lang/Thread.<init>(Ljava/lang/VMThread;Ljava/lang/String;IZ)V time
71ms (16343ms) @ 0x240820>
soft_fixup_trampoline(): return 0x240820
findMethodLocal(java/lang/ClassLoader,getSystemClassLoader,
()Ljava/lang/ClassLoader;) 
-> 0xf5480
dispatchException(): java/lang/NullPointerException
dispatchException(): lastJniFrame is (nil), fp (nil)
Internal error: caught an unexpected exception.
Please check your CLASSPATH and your installation.
java/lang/NullPointerException
Aborted
----------------------------
What is the problem ?


I tried to use libffi too, but when configuring kaffe, it says to me,
unable to find libffi.
Does my libffi have to be built for x86 or arm ?
I tried to put both in my LD_LIBRARY_PATH 
or by --with-includes & --with-libraries for the configuration 
but none of them work.

Regards,

Chrisotphe





More information about the kaffe mailing list