This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Natively compiled SWT segfaults under Windows


Olivier Parisy a écrit :
I was also able to compile and link basic SWT code, but it dies silently at run time.
By spending more time on GDB, I was able to produce a more meaningful stacktrace. I'm posting it at the end of this message in the hope that someone may decipher it.

On a related note, is there a trick to display Java "String" objects in GDB? I have no idea of their memory layout, and it was frustrating to have a reference to the name of the not found class (stack frame #6) while not being able to display it...

Best regards,
Olivier Parisy.



Program received signal SIGSEGV, Segmentation fault.
fallback_backtrace(_Unwind_Reason_Code (*)(_Unwind_Context*, void*), _Jv_UnwindState*) (
trace_fn=0xbcd2d0 <_Jv_StackTrace::UnwindTraceFn(_Unwind_Context*, void*)>, state=0x23f35c) at ./sysdep/backtrace.h:
86
86 if (scan_bytes[0] == 0x55 && scan_bytes[1] == 0x89
(gdb) bt
#0 fallback_backtrace(_Unwind_Reason_Code (*)(_Unwind_Context*, void*), _Jv_UnwindState*) (
trace_fn=0xbcd2d0 <_Jv_StackTrace::UnwindTraceFn(_Unwind_Context*, void*)>, state=0x23f35c) at ./sysdep/backtrace.h:
86
#1 0x00bcd24e in _Jv_StackTrace::GetStackTrace() ()
at /home/olivier/gcj/w32gcc/src/gcc/libjava/stacktrace.cc:156
#2 0x00b1fcac in _ZN4java4lang11VMThrowable16fillInStackTraceEJPS1_PNS0_9ThrowableE ()
at /home/olivier/gcj/w32gcc/src/gcc/libjava/java/lang/natVMThrowable.cc:33
#3 0x009bd062 in _ZN4java4lang9Throwable16fillInStackTraceEJPS1_v (this=0x36949f0)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/classpath/java/lang/Throwable.java:498
#4 0x009bca62 in java.lang.Throwable.Throwable(java.lang.String) (this=0x36949f0, message=0x36949d8)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/classpath/java/lang/Throwable.java:159
#5 0x009a5908 in java.lang.Exception.Exception(java.lang.String) (this=0x36949f0, s=0x36949d8)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/classpath/java/lang/Exception.java:77
#6 0x009a44e9 in java.lang.ClassNotFoundException.ClassNotFoundException(java.lang.String) (this=0x36949f0, s=0x36949d8)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/classpath/java/lang/ClassNotFoundException.java:83
#7 0x00a6476b in _ZN4java3net14URLClassLoader9findClassEJPNS_4lang5ClassEPNS2_6StringE (this=0x3627f50, className=0x364f5b0)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/java/net/URLClassLoader.java:1080
#8 0x00ac8431 in _ZN3gnu3gcj7runtime15BootClassLoader13bootLoadClassEJPN4java4lang5ClassEPNS4_6StringE (this=0x3627f50, name=0x364f5b0)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/gnu/gcj/runtime/BootClassLoader.java:55
#9 0x00b1ecdf in _ZN4java4lang13VMClassLoader9loadClassEJPNS0_5ClassEPNS0_6StringEb (name=0x364f5b0, resolve=0)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/java/lang/natVMClassLoader.cc:208
#10 0x009a30f5 in _ZN4java4lang11ClassLoader9loadClassEJPNS0_5ClassEPNS0_6StringEb (this=0x3627fc0, name=0x364f5b0, resolve=false)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/java/lang/ClassLoader.java:304
#11 0x009a30c3 in _ZN4java4lang11ClassLoader9loadClassEJPNS0_5ClassEPNS0_6StringEb (this=0x3627f88, name=0x364f5b0, resolve=false)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/java/lang/ClassLoader.java:310
#12 0x009a2f90 in _ZN4java4lang11ClassLoader9loadClassEJPNS0_5ClassEPNS0_6StringE (this=0x3627f88, name=0x364f5b0)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/java/lang/ClassLoader.java:260
#13 0x00aa5561 in _Jv_FindClass(_Jv_Utf8Const*, java::lang::ClassLoader*) (name=0x38a5990, loader=0x3627f88)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/java/lang/natClassLoader.cc:393
#14 0x0099c844 in _Jv_FindClassFromSignature(char*, java::lang::ClassLoader*, char**) (sig=0x23f6b0 "Lorg.eclipse.swt.internal.win32.LOGFONTW;", loader=0x3627f88, endp=0x0)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/prims.cc:874
#15 0x00ab9f0a in _Z21_Jv_JNI_GetAnyFieldIDILb0EEP9_Jv_FieldP10_Jv_JNIEnvPN4java4lang5ClassEPKcS9_@16 (env=0x34778, claz
z=0xf03490,
name=0x10046100 "lfCaptionFont",
sig=0x1004613c "Lorg/eclipse/swt/internal/win32/LOGFONTW;")
at /home/olivier/gcj/w32gcc/src/gcc/libjava/jni.cc:1222
#16 0x100161e7 in _libws2_32_a_iname ()
#17 0x007380c6 in _ZN3org7eclipse3swt8internal5win322OS21SystemParametersInfoWEJbiiPNS3_17NONCLIENTMETRICSWEi () at org/
eclipse/swt/internal/win32/OS.java:2707
#18 0x0071d8ee in _ZN3org7eclipse3swt8internal5win322OS20SystemParametersInfoEJbiiPNS3_16NONCLIENTMETRICSEi (uiAction=41
, uiParam=0, pvParam=0x38bbfc0,
fWinIni=0) at org/eclipse/swt/internal/win32/OS.java:2682
#19 0x0081ab3c in _ZN3org7eclipse3swt7widgets7Display13getSystemFontEJPNS1_8graphics4FontEv (this=0x38b3e58) at org/ecli
pse/swt/widgets/Display.java:2044
#20 0x005803ed in org.eclipse.swt.graphics.Device.Device(org.eclipse.swt.graphics.DeviceData) (this=0x38b3e58, data=0x0)
at org/eclipse/swt/graphics/Device.java:137
#21 0x0080a5cb in org.eclipse.swt.widgets.Display.Display(org.eclipse.swt.graphics.DeviceData) (this=0x38b3e58, data=0x0)
at org/eclipse/swt/widgets/Display.java:402
#22 0x0080a5a4 in org.eclipse.swt.widgets.Display.Display() (this=0x38b3e58)
at org/eclipse/swt/widgets/Display.java:393
#23 0x0099a132 in _ZN7TestSWT4mainEJvP6JArrayIPN4java4lang6StringEE (
args=0x35c7fb8) at src/TestSWT.java:8
#24 0x00c21238 in _ZN3gnu4java4lang10MainThread9call_mainEJvv (this=0x38a2fa0)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/gnu/java/lang/natMainThread.cc:50
#25 0x00acda3f in _ZN3gnu4java4lang10MainThread3runEJvv (this=0x38a2fa0)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/gnu/java/lang/MainThread.java:108
#26 0x00ac7a34 in _Jv_ThreadRun(java::lang::Thread*) (thread=0x38a2fa0)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/java/lang/natThread.cc:302
#27 0x0099da56 in _Jv_RunMain(_Jv_VMInitArgs*, java::lang::Class*, char const*, int, char const**, bool) (vm_args=0x0, k
lass=0xf3c310, name=0x0, argc=1,
argv=0x33ec8, is_jar=false)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/prims.cc:1535
#28 0x0099dba6 in _Jv_RunMain(java::lang::Class*, char const*, int, char const**, bool) (klass=0xf3c310, name=0x0, argc=
1, argv=0x33ec8, is_jar=0)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/prims.cc:1546
#29 0x0099dbdf in JvRunMain (klass=0xf3c310, argc=1, argv=0x33ec8)
at /home/olivier/gcj/w32gcc/src/gcc/libjava/prims.cc:1552
#30 0x0040130e in main (argc=2359216, argv=0x401237)
at C:/DOCUME~1/Olivier/LOCALS~1/Temp/ccnxRPku.i:11
(gdb)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]