Please, do not ignore, problem with SDL still exists

Hello, All!

Please do not ignore this, better to revert back the patch, because I am
(and not only I am) can’t stay using current CVS version for the
development. This patch can be applied later if it really needed, when all
compatibility problems will gone.==========================================================================

  • Forwarded by Mike Gorchak
  • Newsgroup: gmane.comp.lib.sdl
  • From: “Mike Gorchak” <@Mike_Gorchak>
  • Date: Fri, 18 Feb 2005 07:53:14 +0200
  • To: All
  • Subj: Current CVS version of SDL became broken
    ==========================================================================

Hello, All!

That patch causes segfault, when trying to run lbreakout2 version 2.5.2 (can
be downloaded from http://lgames.sf.net ):

2005-01-12 19:38 slouken

  • src/video/SDL_pixels.c: Clarified the code in the pixel format
    allocation Added support for direct color 8-bpp modes.

SDL_pixels.c have revision 1.13, I’ve checked out previous 1.12 revision
without that patch, all working fine !

I’m right now fixing QNX6 code of SDL, so haven’t a much free time to
discover what happens in SDL internals, but looks like palette is not
created for some surfaces, and without checking it for NULL it passed to
Map1toN() function where it segfaults. But the root of the problem located
in this applied patch.

// lmike

==========================================================================

  • Forwarded by Mike Gorchak
  • Newsgroup: gmane.comp.lib.sdl
  • From: “Mike Frysinger”
  • Date: Fri, 18 Feb 2005 21:46:10 -0500
  • Subj: Re: Current CVS version of SDL became broken
    ==========================================================================

On Friday 18 February 2005 12:53 am, Mike Gorchak wrote:

That patch causes segfault, when trying to run lbreakout2 version 2.5.2
(can be downloaded from http://lgames.sf.net ):

i posted this same report almost a month ago but no one responded :confused:
http://twomix.devolution.com/pipermail/sdl/2005-January/066957.html
-mike

With best regards, Mike Gorchak. E-mail: @Mike_Gorchak

Mike Gorchak wrote:

That patch causes segfault, when trying to run lbreakout2 version 2.5.2
(can be downloaded from http://lgames.sf.net ):

2005-01-12 19:38 slouken

  • src/video/SDL_pixels.c: Clarified the code in the pixel format
    allocation Added support for direct color 8-bpp modes.

SDL_pixels.c have revision 1.13, I’ve checked out previous 1.12 revision
without that patch, all working fine !

The patch seems to be reversed now. Anyway, I attach a patch that fix the
problem.
It was assumed in SDL_pixels.c that a format with a RGB mask is not indexed,
but many other code create an indexed surface with RGB masks.–
Gautier Portet
http://kassoulet.free.fr
-------------- next part --------------
A non-text attachment was scrubbed…
Name: kassoulet–bug_with_RGBmask_and_indexed.patch
Type: text/x-diff
Size: 1029 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050302/1bda9251/attachment.patch