On Sat, 2006-02-18 at 17:20 +0100, Mark Wielaard wrote: > Hi, > > We currently just crash and burn when we have trouble with cairo. This > doesn't really help the user. The following make sure we output a stack > trace and reset the cairo status after a failed drawing operation. Which > will hopefully help the user determine how to work around things. > > 2006-02-18 Mark Wielaard <[EMAIL PROTECTED]> > > * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c > (begin_drawing_operation): Output stacktrace and return on bad cairo > status. > (end_drawing_operation): Likewise. And reset cairo_t. > > Does this seem useful?
Yes, please commit. Thanks, Tom > > Sample output: > > java.lang.InternalError: out of memory > at gnu.java.awt.peer.gtk.GdkGraphics2D.cairoFill (Native Method) > at gnu.java.awt.peer.gtk.GdkGraphics2D.fillRect (GdkGraphics2D.java:1076) > at com.jgoodies.plaf.plastic.PlasticUtils.add3DEffekt > (PlasticUtils.java:257) > at com.jgoodies.plaf.plastic.PlasticUtils.addLight3DEffekt > (PlasticUtils.java:285) > at com.jgoodies.plaf.plastic.PlasticToolBarUI.update > (PlasticToolBarUI.java:164) > [...] > > I don't know the status of the Graphics2D rewrite that Tom was working > on. Maybe that makes this hack unnecessary. If it interferes with that > please yell and scream. I haven't actually found and fixed any real > problems with this patch yet. > > Cheers, > > Mark >