This is the mail archive of the java-discuss@sourceware.cygnus.com 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: cannot compile libgcj


I'm seeing this error all over the place at the moment (not just from gij).
There is something weird going on with exceptions thrown from within libgcj.
I don't think it is limited to class.forName() but this is where it seems to
occur most often.

Consider the following code:

import java.text.*;
import java.util.*;

public class MFTest
{
  public static void main(String args[])
  {
//    try {}
//    catch (Exception x) {}

    Object[] arguments = {
      new Date(System.currentTimeMillis())
    };

    String result = MessageFormat.format("The time is {0,time,short}",
arguments);
    System.out.println(result);
  }
}

It's blowing up when a Class.forName() inside the MessageFormat tries to
throw a MissingResourceException. However, if you uncomment the empty
try/catch block at the top, then it works fine!?

regards

  [ bryce ]


Per Bothner wrote:

> Program received signal SIGABRT, Aborted.
> 0x40204111 in __kill ()
> (gdb) bt
> #0  0x40204111 in __kill ()
> #1  0x40203d66 in raise (sig=6) at ../sysdeps/posix/raise.c:27
> #2  0x40205447 in abort () at ../sysdeps/generic/abort.c:88
> #3  0x40116ef5 in get_reg_addr (reg=256, udata=0xbffff740, sub_udata=0x0)
> #4  0x40116fbe in next_stack_level (pc=0x40090c9b, udata=0xbffff740,
>     caller_udata=0xbffff6c8)
> #5  0x401171e6 in throw_helper (eh=0x40198348, pc=0x40090c9b,
>     my_udata=0xbffff800, offset_p=0xbffff7fc)
> #6  0x40117447 in __throw ()
> #7  0x40090c9c in Letext ()
>     at /home/bothner/GNU/libgcj/libjava/exception.cc:154
> #8  0x401001af in java::lang::Class::forName (className=0x8065f00)


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