NullPointerException in waitCond()
archie at whistle.com
Thu Jul 30 13:10:20 PDT 1998
My application is failing because of a NullPointerException, and a little
debugging show that getLock() is returning NULL in the function waitCond()
* Wait on a conditional variable.
_waitCond(void* addr, jlong timeout)
DBG(VMLOCKS, dprintf("Wait 0x%x on addr=0x%x\n", THREAD_NATIVE(), addr); )
lk = ((Hjava_lang_Object*)addr)->lock;
lk = getLock(addr);
printf("Wait 0x%x lk=0x%x from getLock()\n", THREAD_NATIVE(), lk);
When I run the program (which uses threads), I get this output:
Wait 0x634038 lk=0x0 from getLock()
The NULL return from getLock() is causing the problem (because
the first thing __waitCond() does is dereference it).
This happens completely deterministically, as far as I can tell.
This is kaffe vintage july 29 snapshot (yesterday).
How can I help debug this problem?
On another note, sometimes Kaffe will not respond to Control-C (SIGINT).
In fact, it often only stops with kill -9 when running a certain application.
What's the theory on how SIGINT is handled?
Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
More information about the kaffe