Looking for ideas to fix X server crash running GCJ-compiled program
Fri Mar 14 18:27:00 GMT 2003
> Recent tests of my application cause the X server to crash....
> According to a gdb backtrace, the problem is a SEGV in CopyGC...
I've been working on this problem for a week, and I thought I'd report the
results so far.
I've determined that the problem is not specific to the libjava xlib peers,
in that the attached little C program (for linux/gcc/libX11) crashes the
server in the same way. The trick is to do XCreateGC, XCopyGC and XFreeGC
for every repaint. Most C xlib programs I've seen don't do that (not that
I've seen that many), but our java.awt implementation does. So far the
crash has only happened on embedded systems using Xfbdev - not on desktops.
I've reported the problem on the XFree86 list, to see what folks there
If I find out that we shouldn't be doing so many GC operations, maybe I'll
have to either modify java.awt.Component to preserve GCs or implement a GC
cache in gnu.gcj.xlib.GC. I prefer the cache idea. We'd still have a lot
of XCopyGC calls, but far fewer XCreateGC and XFreeGC, and a smaller number
of GCs simultaneously open on the server. It might boost performance by
reducing traffic to the server.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2808 bytes
Desc: not available
More information about the Java