I've been seeing a curious problem with the current CVS of COW on Linux,
resulting in segfaults and corruption of display data.

Whenever it happens, I can "fix" it by changing the build slightly, e.g.
by adding another call or disabling a call, and it comes good again.

gdb backtraces show corruption of various data structures, especially
the "me" pointer, but also occasionally of other things.

At one stage I thought I'd reduced it to the addition of Imlib2, but
removing all calls to Imlib2 and leaving it as just the difference
between -lImlib2 or not during link ... and I still got the fault if
Imlib2 is included in the link.

But now having added -lXxf86vm for the video mode change feature, I find
that this does it in as well.

Things I've tried to do to exclude it:

1.  used valgrind to detect reads or writes outside permitted memory
areas ... doesn't tell me where the problem is caused, only tells me
when it manifests,

2.  worked through all the compilation warnings in x11window.c and fixed
them all ... no difference,

3.  added display synchronisation ... seems to make a statistical
difference, but then the problem can return after another program change
and turning off synchronisation fixes it, frustratingly.

4.  added or removed -g,

5.  added or removed -O2.

Any other ideas?  Test reports?

I'm yet to do a regression analysis to find which version builds and
doesn't cause the problem ... but I'm inclined to believe it will be
before the addition of extra libraries.

James Cameron    mailto:quozl at us.netrek.org     http://quozl.netrek.org/