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]

GCJ 4.03 crash on Windows 98 (Was: Re: FYI: Article "Building GCJ on Windows" Relocated)


Thanks for the pointer!

Below is the info from drmingw when running a hello world program cross-compiled with gcj 4.03, run on Windows 98.

I would love to try fix this, but for the time being I am not sure what the normal operation of GCJ is supposed to be (it's a big program after all), so please excuse my newbie questions.

Reading from location ffffffff seems a bit weird, so if I interpret it correctly, a nullpointerexception is thrown immediately, and a class is finalized before the engine variable is initialized? Does someone see an obvious reason for this?


-Jesper


*****
TEST403.EXE caused an Access Violation at location 0041df00 in module TEST403.EXE Reading from location ffffffff.


Registers:
eax=022afda8 ebx=022a7ca8 ecx=0070dd4b edx=00000000 esi=00000009 edi=00000000
eip=0041df00 esp=01d3eeec ebp=01d3eeec iopl=0     vif nv up ei pl nz ac pe nc
cs=015f  ss=0167  ds=0167  es=0167  fs=2b6f  gs=0000             efl=00090212

Call stack:
0041DF00 TEST403.EXE:0041DF00 java::lang::Class::finalize() natClass.cc:710
0041CDAF TEST403.EXE:0041CDAF _Jv_FinalizeObject(java::lang::Object*) natObject.cc:121
00514502 TEST403.EXE:00514502 GC_invoke_finalizers finalize.c:789
00428D05 TEST403.EXE:00428D05 maybe_finalize gcj_mlc.c:132
00428DB1 TEST403.EXE:00428DB1 GC_gcj_malloc gcj_mlc.c:175
00402319 TEST403.EXE:00402319 _Jv_AllocObjectNoFinalizer java-gc.h:48
0040235D TEST403.EXE:0040235D _Jv_AllocObject prims.cc:448
00402411 TEST403.EXE:00402411 catch_segv(int) prims.cc:149
0040110A TEST403.EXE:0040110A
BFF9D770 KERNEL32.DLL:BFF9D770 RtlFillMemory
BFF8B544 KERNEL32.DLL:BFF8B544 RtlUnwind
BFF8B3E9 KERNEL32.DLL:BFF8B3E9 RtlUnwind
*****


This is natClass.cc
707 void
708 java::lang::Class::finalize (void)
709 {
710   engine->unregister(this);
711 }


prims.cc:


145 #ifdef HANDLE_SEGV
146 SIGNAL_HANDLER (catch_segv)
147 {
148   java::lang::NullPointerException *nullp
149     = new java::lang::NullPointerException;
150   unblock_signal (SIGSEGV);
151   MAKE_THROW_FRAME (nullp);
152   throw nullp;
153 }
154 #endif


PS.
I am not sure what to make of the reference to RtlFillMemory and RtlUnwind, neither of which are supposed to be supported on Windows 98.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/Kernel_r/hh/Kernel_r/k109_db7a2a9f-c7b5-40c3-9755-e386bbaf5353.xml.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/rtlunwind.asp


At 24-04-2006 08:34, Ranjit Mathew wrote:
> GCJ 4.03 built as a cross-compiler as well as Mohan Embar's 4.02
> distribution create executables that work great for me on Windows XP.
> But all programs built either way crash instantly with a page fault
> if run on Windows 98.

Try using "Dr MinGW":

http://jrfonseca.planetaclix.pt/projects/gnu-win32/software/drmingw/index.html

to see if you can find out the cause of the problem.

GCJ on Windows gets very little testing and on Windows 9x/ME
much less so.


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