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]

Re: ZipInputStream broken?



Bryce McKinlay <bryce@waitaki.otago.ac.nz> writes:
> >The top two lines are things that my code prints. The text "Aborted"
> >doesn't appear anywhere in my source code -- what is libgcj trying to
> >tell me?

> It means that something called abort(). It can happen when an exception 
> is thrown but there is no handler for that exception, but there are 
> plenty of other reasons. GDB will stop automatically on an abort, so the 
> best thing to do is run the app in GDB and look at the stack trace.

Hrm, what I'm getting isn't very helpful:

    (gdb) run run valency/xwt/dist/xwt-main.jar email
    Starting program: /home/megacz/a.out run valency/xwt/dist/xwt-main.jar email
    [New Thread 2748 (manager thread)]
    [New Thread 2747 (initial thread)]
    [New Thread 2749]
    Detected GCJ JVM, vendor="Free Software Foundation" version="0.0.7"

    Program received signal SIGPWR, Power fail/restart.
    0x40479a9e in sigsuspend () from /lib/libc.so.6
    (gdb) bt
    #0  0x40479a9e in sigsuspend () from /lib/libc.so.6
    #1  0x4042c659 in __pthread_wait_for_restart_signal () from /lib/libpthread.so.0
    #2  0x40428f82 in pthread_cond_wait () from /lib/libpthread.so.0
    #3  0x40247fd9 in _Z14_Jv_ThreadWaitv () from /usr/lib/libgcj.so.2
    #4  0x4014ec35 in JvRunMain () from /usr/lib/libgcj.so.2
    #5  0x805d13e in main (argc=4, argv=0xbffff7d4) at /tmp/ccjgPASymain.i:11

I've done a bit of printf-style debugging, and I think an exception is
getting thrown in a class member initializer -- like this

    public class foo {
      Bar bar = new Bar();
      foo() { .... }
    }

Where Bar's constructor is throwing an exception.

Normal JVMs throw the exception out of the "new foo()" call -- but it
seems that GCJ doesn't work this way. Is that the case?

  - a


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