Illegal instruction upon Blit

Hello List,

I think I found a little bug in SDL (I’m using 1.2.6). Google revealed
nothing. When blitting a surface onto another one, the program crashes
with a “Illegal Instruction”. I compiled it with -ggdb and traced it:

– Snip
(gdb) run Tank_Blue.png Outfile.png 11.25

Starting program:
/home/joe/Applikationen/SDL/srotationcache/srotationcache Tank_Blue.png
Outfile.png 11.25
[New Thread 16384 (LWP 3942)]
Input image is 150x150 pixels.
Rotation angle is 11.2?, 32 images are being created.
Output image will have 150x4800 pixels.

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 16384 (LWP 3942)]
0x4003b2cb in SDL_CalculateAlphaBlit () from /usr/lib/libSDL-1.2.so.0

(gdb) up

#1 0x4002ed41 in SDL_UnRLESurface () from /usr/lib/libSDL-1.2.so.0

(gdb) up

#2 0x40046478 in SDL_LowerBlit () from /usr/lib/libSDL-1.2.so.0

(gdb) up

#3 0x400466cd in SDL_UpperBlit () from /usr/lib/libSDL-1.2.so.0

(gdb) up

#4 0x0804a376 in main (argc=4, argv=0xbffff794) at srotationcache.c:73
73 if
(SDL_BlitSurface(SingleImage,&Source,MultiImage2,&Source)<0) {

(gdb) print SingleImage

$1 = (SDL_Surface *) 0x8059860

(gdb) print *SingleImage

$2 = {flags = 65536, format = 0x80598a0, w = 150, h = 150, pitch = 600,
pixels = 0x80598d0, offset = 0,
hwdata = 0x0, clip_rect = {x = 0, y = 0, w = 150, h = 150}, unused1 =
0, locked = 0, map = 0x806f868,
format_version = 0, refcount = 1}

(gdb) print Source

$3 = {x = 0, y = 0, w = 100, h = 100}

(gdb) print MultiImage2

$4 = (SDL_Surface *) 0x8055d40

(gdb) print *MultiImage2

$5 = {flags = 65536, format = 0x8055d80, w = 100, h = 100, pitch = 400,
pixels = 0x806f8a0, offset = 0,
hwdata = 0x0, clip_rect = {x = 0, y = 0, w = 100, h = 100}, unused1 =
0, locked = 0, map = 0x8055db0,
format_version = 0, refcount = 1}
– Snap

Hope this is some help.

Greetings
Johannes

I think I found a little bug in SDL (I’m using 1.2.6). Google revealed
nothing. When blitting a surface onto another one, the program crashes
with a “Illegal Instruction”. I compiled it with -ggdb and traced it:

What CPU do you have in your machine?

–ryan.

I think I found a little bug in SDL (I’m using 1.2.6). Google revealed
nothing. When blitting a surface onto another one, the program crashes
with a “Illegal Instruction”. I compiled it with -ggdb and traced it:

What CPU do you have in your machine?

That’s an old bug :
http://www.google.com/search?hl=fr&lr=&ie=UTF-8&oe=UTF-8&q=+site:www.libsdl.org+sdl+illegal+instruction
It’s fixed in CVS.

Stephane

Hello !

I think I found a little bug in SDL (I’m using 1.2.6). Google revealed
nothing. When blitting a surface onto another one, the program crashes
with a “Illegal Instruction”. I compiled it with -ggdb and traced it:

Try also the latest SDL-CVS and tell if it prod. the same error.

CU

Torsten Giebl wrote:

Try also the latest SDL-CVS and tell if it prod. the same error.

You’re right. It’s fixed! Strange I didn’t find the bug in google, as Stephane pointed out. Sorry!

Greetings
Joe