Hi Brandon,

I have a simple patch that fixes this segfault for me. Here it is:

This seems to work well. It's a pity not to use this nice music, but since it is clearly better than an occasional crash.

While debugging, I tried replacing that line in sound.c with 4
pennights. I thought it would crash more. It didn't crash at all. I
also tried moving it to the front, back, and second position. It didn't
crash under those seemingly identical situations. Like I said, weird.

I guess this is the reason why I didn't succeed in identifying the mod file, which causes the crash.

Also worthy of note, is that every time I got penguin-command to crash
, it was playing song #2 (starting from 0). Here is a log I have been
keeping. I only added to this log sometimes when penguin-command would
crash. I am not including the core dumps. If someone wants them, email
me.

Interesting. I will think a bit more about this (and test a bit more myself). It might be a good clue.

Core was generated by `penguin-command'.
Program terminated with signal 11, Segmentation fault.
#0  0xb7eb1413 in SDL_LowerBlit () from /usr/lib/libSDL-1.2.so.0
(gdb) backtrace
#0  0xb7eb1413 in SDL_LowerBlit () from /usr/lib/libSDL-1.2.so.0
#1  0xb7eb16b4 in SDL_UpperBlit () from /usr/lib/libSDL-1.2.so.0
#2  0x0804ceea in Blit (Xpos=136111496, Ypos=510, image=0x805a750) at
gfx.c:331 #3  0x0804bdab in DrawCannon (x=20, y=0) at game.c:160
#4  0x0804c0ad in ProcessEvents () at game.c:322
#5  0x0804c314 in StartGame () at game.c:429
#6  0x0804b1df in main (argc=136100536, argv=0x0) at main.c:460
(gdb)

Notice that this has some things in common with the trace that Karl
provided a few years ago, but some things are distinctly different.

It probably crashes in Blit, because the function is the most memory intensive one. This really looks like memory corruption.

Thanks for your hard work. I'd like to do some more testing before applying the patch, to get sure it really works around this bug (and hopefully get some more details). The crash doesn't occur very frequently, so It'll probably take some time. I'll write again within the next week.

Thanks again,
Karl


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to