On Sun, 2005-01-23 at 19:01 -0800, Bill Kendrick wrote:
> On Sun, Jan 23, 2005 at 11:51:44AM -0500, Albert Cahalan wrote:
> > You should have also seen this:
> > printf("Sending %u bytes with %u families.\n", size, num_font_families);
> > 
> > Did you? (it's really important to be sure about this)
> 
> Nope!
> 
> 
> > If you saw that, there is an IO problem.
> > If you didn't see that, the child crashed.
> 
> It must be the latter.  It went like this:
> 
>   $ tuxpaint
>   Start-up time: 4.177
> 
> ... I wait about 1-2 minutes, then click 'Text' ...
> 
>   Got 0 bytes with 62292 families.
>   Segmentation fault

--- idea 1 ---

I just ran Tux Paint in valgrind, like this:
valgrind -v --tool=memcheck --log-file=/tmp/tp tuxpaint

I think you could do a better job of this, both
because you're seeing the crash and because you
have an x86 box. The problems reported for me were:

1. libX11 does a write with uninitialized data (padding?)
2. libSDL conditional depends on uninitialized data
3. libSDL uses partly uninitialized sigprocmask
4. libc itself, in fclose, unlocks unlocked mutex

BTW, when you try this, font loading will take an
extraordinary amount of time to run.

--- idea 2 ---

Add an option to only attempt opening fonts that have
filenames starting with a given prefix. Then, go down
the alphabet to see if some cause crashes. Like so:

tuxpaint --fontprefix=a
tuxpaint --fontprefix=b
tuxpaint --fontprefix=c
...
tuxpaint --fontprefix=z
tuxpaint --fontprefix=A
tuxpaint --fontprefix=B
...

Supposing that all but 'E' work fine, then you do:

tuxpaint --fontprefix=Ea
tuxpaint --fontprefix=Eb
tuxpaint --fontprefix=Ec
...

If the problem is caused by a specific font, this should
lead you to it.

--- idea 3 ---

See if a libSDL_ttf upgrade makes the problem go away.

-- idea 4 ---

Put a sleep(42) at the beginning of the child, right
near the nice() and sched_yield() calls. Right after
you start Tux Paint, look up the PID with "ps fjax".
Attach gdb to this PID, then wait for the sleep() to
end. If the process crashes, you'll know. Do a "bt"
in gdb to see where it happened.


_______________________________________________
Tuxpaint-dev mailing list
Tuxpaint-dev@tux4kids.net
http://tux4kids.net/mailman/listinfo/tuxpaint-dev

Reply via email to