Deadlock in Class::forName on OSX

Juerg Lehni juerg@scratchdisk.com
Tue May 23 16:58:00 GMT 2006


I am new to gcj and am currently trying to get it work in an Adobe 
Illustrator plugin for which I previously used Apple's JVM. I want to 
switch to gcj in order to get around problems with the Rosetta 
PowerPC emulation, as the JVM cannot be invoked on Intel machines, 
but gcj should still run inside the Rosetta emulated Illstrator app.
I am using gcj version 4.2.0 20060318 (experimental) from http:// 
hpc.sourceforge.net/ and link libgcj.7.0.0.dylib to my XCode project, 
which uses Apple's default GCC 4 compiler without gcj support. The 
gcj VM is then invoked through the default JNI interface.
It all seems to work to the point where one of my libraries calls 
Class.forName, where it then seems to deadlock and hang forever.
When I pause the debugger, it randomly shows one of the stacktraces 
bellow, among other similar ones. Something seems to go on, but it 
never comces back from that call:
_Unwind_Find_FDE
uw_frame_state_for
_Unwind_RaiseException_Phase2
_Unwind_Resume
java::lang::Class::forName
_Unwind_Find_FDE
uw_frame_state_for
uw_init_context_1
_Unwind_Resume
java::lang::Class::forName
uw_update_context_1
uw_init_context_1
_Unwind_Resume
java::lang::Class::forName
Is this a problem with gcj version 4.2.0 20060318, or could it be due 
to the fact that I'm mixing libgcj with a non gcj version of gcc?
Please excuxe me if these are silly questions. I'm still at the 
beginning of all this, but I'm very excited by the possibilities of 
gcj and really would like to get it working.
Jürg


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /