<URL: http://bugs.freeciv.org/Ticket/Display.html?id=29557 >
> [dmarks - Mi 20. Dez 2006, 01:18:32]:
>
> On 12/20/06, Christian Prochaska <[EMAIL PROTECTED]>
> wrote:
> >
> > So it seems there is a problem with antialiased zooming. Does the
> > attached patch make the other missing images visible?
> >
>
> It does, yes. Am I missing some component in my SDL installation?
No, the zoom code is part of the SDL client and as it seems Rafal put a
lot of effort into optimizing it for speed, but apparently at the cost
of portability. I'll try to add the hopefully more portable zoom
function from SDL_gfx as an alternative for platforms where the
optimized version doesn't work.
> > > > The SDL client crashes semi-randomly on Mac OS X (10.3.9), but there
> > > > is one segfault that is 100% reproducible: Go to 'video options' and
> > > > chose 1024x768 (max res on my machine) without first selecting 'full
> > > > screen' = immediate segfault. (The resolution works fine in full
> > > > screen tho'.)
> > > >
> > >
> > > can you please send a backtrace?
> > >
> >
> > In the works! (How to figure out how to do it on this machine.)
> >
>
> This is what I got:
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> 0x00447438 in SDL_FillRect (dst=0xc36200, dstrect=0xc36220, color=0)
> at src/video/SDL_surface.c:610
> 610 src/video/SDL_surface.c: No such file or directory.
> in src/video/SDL_surface.c
>
>
> Hope it helps!
>
> ––Daniel
>
At least it tells us that the crash happened while trying to fill a
surface with transparency/black color. Unfortunately it doesn't tell us
where exactly the SDL_FillRect() function was called. Can you please
apply the attached patch and post the console output?
Index: client/gui-sdl/graphics.c
===================================================================
--- client/gui-sdl/graphics.c (Revision 12428)
+++ client/gui-sdl/graphics.c (Arbeitskopie)
@@ -396,13 +396,22 @@
the per pixel alpha
**************************************************************************/
int clear_surface(SDL_Surface *pSurf, SDL_Rect *dstrect) {
- /* SDL_FillRect might change the rectangle, so we create a copy */
+
+ int result;
+
+ freelog(LOG_NORMAL, "clear_surface(%p, %p)", pSurf, dstrect);
+
if (dstrect) {
+ /* SDL_FillRect might change the rectangle, so we create a copy */
SDL_Rect _dstrect = *dstrect;
- return SDL_FillRect(pSurf, &_dstrect, SDL_MapRGBA(pSurf->format, 0, 0, 0, 0));
+ result = SDL_FillRect(pSurf, &_dstrect, SDL_MapRGBA(pSurf->format, 0, 0, 0, 0));
} else {
- return SDL_FillRect(pSurf, NULL, SDL_MapRGBA(pSurf->format, 0, 0, 0, 0));
+ result = SDL_FillRect(pSurf, NULL, SDL_MapRGBA(pSurf->format, 0, 0, 0, 0));
}
+
+ freelog(LOG_NORMAL, "clear_surface() finished");
+
+ return result;
}
/**************************************************************************
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev