The attached small C program causes my Xfbdev server to crash in CopyGC.
Usually it's a SIGSEGV, but sometimes its a SIGILL.  When the program
starts, it shows a blank screen.  Click mouse button 1 and it starts
animating some circles, and does so until you kill it (control-C or
whatever).  On my embedded system, it crashes the X server in about 10
minutes.  Using gdb, I've looked at the source and destination GC, including
all the function pointers.  Everything looks fine -- no indication of what
made it crash.

Running the same program on a desktop PC, it hasn't crashed yet, although I
haven't tried to run it for all that long.

I'm wondering:
 a) Is there any obvious should-not-do code in the attached program?
 b) Is high-volume XCreateGC/XCopyGC/XFreeGC (see below) considered normal?
 c) Could the high volume be causing the problem?
 d) Can anyone else replicate this crash?

My Xfbdev is version 4.3, but the same thing happens on 4.2.0.  I've tried
compiling it with gcc 3.2.1 and 3.3 (not released yet), and both with and
without optimization.  The one I'm running at the moment was compiled for
Intel 486.

My system is an Arcom SBC-GX1, which uses a National Geode GX1 chip
(Pentium-compatible).  It has 128 megs of RAM and no swap.  At no time
during the test does the free RAM drop below 20 megs.  It's obviously
conceivable that the problem is related to the non-Intel processor, but I
would have expected the symptoms to change with different optimizer settings
if that were the case.  I suppose the kernel or video FB driver could also
be at fault.

My linux is:
Linux version 2.4.18-rthal5 ([EMAIL PROTECTED]) (gcc version 3.2.1) #1 Wed
Dec 18 17:39:47 EST 2002

History:
I've been trying to track down an Xfbdev crash when running a gcj-compiled
(Java) executable using the xlib peers.  I noticed that the C xlib examples
I found don't do very many XCreateGC, XCopyGC and XFreeGC calls, whereas the
java library peers create a new GC for every repaint.  The attached C
program creates a new GC every paint, just like the peers.  Since it crashes
the server in the same manner as the Java program, it's not strictly a
problem with the Java compiler or libraries.


Attachment: manyGC.c
Description: Binary data

Reply via email to