Digital Alpha, RLE Bitmaps, and SDL Parachute

Hi all, I’m new to the list, and just beginning to hack around with SDL.

I’ve had problems while trying to run many SDL programs after the build
completes just fine. I receive the runtime error:

Fatal signal: Segmentation Fault (SDL Parachute Deployed)

I had always wanted to debug the coredump, but never had a chance to do
it. Today I decided to learn how to use SDL, and in my efforts to get
transparency working I found out how to reproduce this bug. Use RLE
bitmaps with SDL_LoadBMP().

I have not gone through the SDL source to find the bug because I’m sure
there is an SDL developer out there that knows exactly where to look for
the mistake. If that person points me to the right place, I’m sure we
can create and test a patch.

For now, I’ll just go through the programs that don’t work and use:

for image in find * -name .bmp; do
mv $image $image.rle
convert $image.rle -compress None $image
done

I had always wanted to debug the coredump, but never had a chance to do
it. Today I decided to learn how to use SDL, and in my efforts to get
transparency working I found out how to reproduce this bug. Use RLE
bitmaps with SDL_LoadBMP().

Interesting. Can you post a link to a BMP that crashes SDL?

Thanks!
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Sam Lantinga wrote:

I had always wanted to debug the coredump, but never had a chance to do
it. Today I decided to learn how to use SDL, and in my efforts to get
transparency working I found out how to reproduce this bug. Use RLE
bitmaps with SDL_LoadBMP().

Interesting. Can you post a link to a BMP that crashes SDL?

http://www.moops.org/Spaceship.html

Sam Lantinga wrote:

I had always wanted to debug the coredump, but never had a chance to do
it. Today I decided to learn how to use SDL, and in my efforts to get
transparency working I found out how to reproduce this bug. Use RLE
bitmaps with SDL_LoadBMP().

Interesting. Can you post a link to a BMP that crashes SDL?

http://www.moops.org/Spaceship.html

My browser (Mozilla) reports that that image is not a correct .bmp file.
If the file is corrupt, it would be pretty easy for it to cause problems
in the loader.

	Bob PendletonOn Sun, 2003-06-29 at 16:31, Mike Warnecke wrote:

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

±----------------------------------+

  • Bob Pendleton: independent writer +
  • and programmer. +
  • email: Bob at Pendleton.com +
    ±----------------------------------+

Bob Pendleton wrote:> On Sun, 2003-06-29 at 16:31, Mike Warnecke wrote:

My browser (Mozilla) reports that that image is not a correct .bmp file.
If the file is corrupt, it would be pretty easy for it to cause problems
in the loader.

Hmmm… my mozilla (1.4b) opened the file, no problems at all.

[]s

Adilson.

Bob Pendleton wrote:

My browser (Mozilla) reports that that image is not a correct .bmp file.
If the file is corrupt, it would be pretty easy for it to cause problems
in the loader.

Hmmm… my mozilla (1.4b) opened the file, no problems at all.

I’m still using 1.2.1 on RH 9.0. So, if someone knows what changed in
image handling between the two versions we would have a very good idea
what the problem with the image is.

		Bob PendletonOn Sun, 2003-06-29 at 17:31, Adilson Oliveira wrote:

On Sun, 2003-06-29 at 16:31, Mike Warnecke wrote:

[]s

Adilson.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

±----------------------------------+

  • Bob Pendleton: independent writer +
  • and programmer. +
  • email: Bob at Pendleton.com +
    ±----------------------------------+

Bob Pendleton wrote:

My browser (Mozilla) reports that that image is not a correct .bmp file.
If the file is corrupt, it would be pretty easy for it to cause problems
in the loader.

  Bob Pendleton

So does my Mozilla. The image was created in the GIMP, it is also
viewable under GQview. ImageMagick seems to be able to read the file as
well when converting to an uncompressed BMP.

The original is a PNG. Saving from Gimp with RLE selected causes SDL to
seg fault. Saving without RLE, has no problem. Testing on another box,
I found it also crashes SDL on ix86, so I’m likely wrong in suspecting
it to be an Alpha-only issue.

Hi,

when I load the test image using SDL_LoadBMP(“Spaceship.rle.bmp”), the
function returns NULL and I see this error message:

SDL Error:Compressed BMP files not supported

because loading of RLE bmp files is not supported yet…

Are you sure you are checking the return value properly?

best regards,
John.--------------------------------------------------------------------

#include “SDL.h”

int main(int argc, char *argv[] )
{
SDL_Init(SDL_INIT_VIDEO);

SDL_Surface *bmp = SDL_LoadBMP("Spaceship.rle.bmp");

if ( !bmp )
{
    printf("SDL Error:%s\n",SDL_GetError());
}

SDL_Quit();
return 0;

}

On Monday 30 June 2003 1:05 am, Mike Warnecke wrote:

Bob PeSDL Error:Compressed BMP files not supportedndleton wrote:

My browser (Mozilla) reports that that image is not a correct .bmp file.
If the file is corrupt, it would be pretty easy for it to cause problems
in the loader.

Bob Pendleton

So does my Mozilla. The image was created in the GIMP, it is also
viewable under GQview. ImageMagick seems to be able to read the file as
well when converting to an uncompressed BMP.

The original is a PNG. Saving from Gimp with RLE selected causes SDL to
seg fault. Saving without RLE, has no problem. Testing on another box,
I found it also crashes SDL on ix86, so I’m likely wrong in suspecting
it to be an Alpha-only issue.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

MS IE opens it up in paint, which seems to be able to handle the file.

why don’t you use a normal bmp instead of a rle compressed one?
if you want compression use jpg (you will need SDL_image to load a jpeg
file, though).

Sam Lantinga wrote:

I had always wanted to debug the coredump, but never had a chance to
do> On Sun, 2003-06-29 at 16:31, Mike Warnecke wrote:

it. Today I decided to learn how to use SDL, and in my efforts to get
transparency working I found out how to reproduce this bug. Use RLE
bitmaps with SDL_LoadBMP().

Interesting. Can you post a link to a BMP that crashes SDL?

http://www.moops.org/Spaceship.html

My browser (Mozilla) reports that that image is not a correct .bmp file.
If the file is corrupt, it would be pretty easy for it to cause problems
in the loader.

Bob Pendleton


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

±----------------------------------+

  • Bob Pendleton: independent writer +
  • and programmer. +
  • email: Bob at Pendleton.com +
    ±----------------------------------+

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hi,On Sunday 29 June 2003 19:06, Bob Pendleton wrote:

My browser (Mozilla) reports that that image is not a correct .bmp file.
If the file is corrupt, it would be pretty easy for it to cause problems
in the loader.

Bob, my browser (Konqueror, KDE 3.1.2) displays it correctly.

Cheers,

Eduardo B. Fonseca
ebf at aedsolucoes.com.br
OpenPGP Public Key: F5206326

Hi,

My browser (Mozilla) reports that that image is not a correct .bmp file.
If the file is corrupt, it would be pretty easy for it to cause problems
in the loader.

Bob, my browser (Konqueror, KDE 3.1.2) displays it correctly.

Has anyone thought of loading it in gimp, then saving it under a different
filename, and loading that? Its quite possible the bmp is not corrupt, but
also not written right. Ive come across a few bmps that I had to do that.On 30-Jun-2003, Eduardo B. Fonseca wrote:

On Sunday 29 June 2003 19:06, Bob Pendleton wrote:


Patrick “Diablo-D3” McFarland || unknown at panax.com
"Computer games don’t affect kids; I mean if Pac-Man affected us as kids, we’d
all be running around in darkened rooms, munching magic pills and listening to
repetitive electronic music." – Kristian Wilson, Nintendo, Inc, 1989