This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: awt problem on darwin
Andreas Tobler wrote:
> I built and installed the cvs from yesterday. The above command ends
> up now in the following:
>
> [titanium:~/tst/testsuite/libjava.compile] andreast% gij -mx= 1
> Bus error
>
> gdb bt below.
>
> Any ideas? I'm a bit lost.
Well it appears to be crashing in the INIT_NEEDED macro. I presume
you're using no-threads? I guess its a problem with that.Try poking
around in gdb (try print obj->sync_info etc) and see if you can figure
out what exactly its crashing on. The idea is that _Jv_MonitorEnter etc
should just do nothing (but not crash) in the no-threads case. See
no-threads.cc and include/no-threads.h.
BTW what version of the Apple dev tools are you using? In theory the
April dev tools should have a gdb that can demangle v3 names, so you'll
get a better looking back trace. I havn't tried it myself yet, though.
regards
Bryce.
> Starting program: /Volumes/reserved1/gcctmp/bin/gij -mx= 1
> [Switching to thread 1 (process 11201 thread 0x1503)]
> Reading symbols for shared libraries . done
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> _Jv_MonitorEnter (obj=0x1874fc) at
> /Volumes/xufs/gccsrc/gcc/libjava/java/lang/natObject.cc:248
> 248 if (__builtin_expect (INIT_NEEDED (obj), false))
> (gdb) bt
> #0 _Jv_MonitorEnter (obj=0x1874fc) at
> /Volumes/xufs/gccsrc/gcc/libjava/java/lang/natObject.cc:248
> #1 0x00037440 in
> _ZN4java4lang11ClassLoader13resolveClass0EPNS0_5ClassE
> (clazz=0x44010023) at
> /Volumes/xufs/gccsrc/gcc/libjava/java/lang/ClassLoader.java:315
> #2 0x00033b94 in _Z16_Jv_PrepareClassPN4java4lang5ClassE
> (klass=0x1df334) at /Volumes/xufs/gccsrc/gcc/libjava/resolve.cc:523
> #3 0x0001d390 in _ZN4java4lang11ClassLoader10linkClass0EPNS0_5ClassE
> (klass=0x1df334) at
> /Volumes/xufs/gccsrc/gcc/libjava/java/lang/natClassLoader.cc:167
> #4 0x00037450 in
> _ZN4java4lang11ClassLoader13resolveClass0EPNS0_5ClassE
> (clazz=0x1df334) at
> /Volumes/xufs/gccsrc/gcc/libjava/java/lang/ClassLoader.java:319
> #5 0x00025c10 in _ZN4java4lang5Class15initializeClassEv
> (this=<incomplete type>) at
> /Volumes/xufs/gccsrc/gcc/libjava/java/lang/natClass.cc:714
> #6 0x00002c4c in _Jv_AllocObjectNoFinalizer (klass=0x1df334, size=24)
> at /Volumes/xufs/gccsrc/gcc/libjava/java/lang/Class.h:248
> #7 0x0001fea0 in _ZN3gnu3gcj7runtime11FirstThread3runEv
> (this=0x66b550) at
> /Volumes/xufs/gccsrc/gcc/libjava/gnu/gcj/runtime/FirstThread.java:48
> #8 0x0001eac4 in _Z13_Jv_ThreadRunPN4java4lang6ThreadE
> (thread=0x66b550) at
> /Volumes/xufs/gccsrc/gcc/libjava/java/lang/natThread.cc:285
> #9 0x000040a4 in _Z11_Jv_RunMainPN4java4lang5ClassEPKciPS4_b
> (klass=0x0, name=0xbffff843 "1", argc=1, argv=0xbffff784,
> is_jar=false) at /Volumes/xufs/gccsrc/gcc/libjava/prims.cc:1010
> #10 0x000021e4 in main (argc=1, argv=0x66ba50) at
> /Volumes/xufs/gccsrc/gcc/libjava/gij.cc:139
> #11 0x00001f5c in _start ()
> #12 0x00001d8c in start ()
> (gdb)
>
>