Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] Re: (PR#2546) Everything compiles now BUT
Home

[Freeciv-Dev] Re: (PR#2546) Everything compiles now BUT

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] Re: (PR#2546) Everything compiles now BUT
From: "Bernd Korz via RT" <rt@xxxxxxxxxxxxxx>
Date: Wed, 11 Dec 2002 08:05:03 -0800
Reply-to: rt@xxxxxxxxxxxxxx

This problem is fixed now by McHawk.

We have now the next one:

loading symbols
segment violation occurred
draw_intro_gfx:
draw_intro_gfx:
+0021  800466c5:   *        0c468b    movl    0x0000000c(%esi), %eax
civclient:sc
   frame         retaddr
fcffc57c   800477dc  ui_init + 00000078
fcffc5b0   8001b418  main + 000004c8
fcffc5ec   80018d04  _start + 00000060
civclient:  

And thats in the Terminal:

$ civclient
Using Video Output: bwindow
1: load_surf: Failed to load graphic file !
$ 

The problem is that it does not load any pictures, maybe i have to install 
the Themes... folder anyhow and anywhere?

And we should have a function which gives a real errormessage like Alert 
"Pictures are not loadable"...

Bernd


On 2002-12-11 at 16:45:56 [+0100], you wrote:
> On Wed, Dec 11, 2002 at 05:50:43AM -0800, Bernd Korz via RT wrote:
> > I can conmpile now everything (server AND client)
> > 
> > but when i start the client i get a short time a BWindow (a Window) and 
> > then it crashs and i get that sc:
> > 
> > loading symbols
> > segment violation occurred
> > real_mystrdup:
> > real_mystrdup:
> > +0040  80074e28:   *          108b    movl    (%eax), %edx
> > civclient:sc
> >    frame         retaddr
> > fcffc554   8004672a  load_intro_gfx + 00000046
> > fcffc57c   80047797  ui_init + 00000073
> > fcffc5b0   8001b3d8  main + 000004c8
> > fcffc5ec   80018cc4  _start + 00000060
> 
> This is an indication of two problems. A local one and a global one. The 
> local one is that in client/gui-sdl/graphics.c:
> 
>   pIntro_gfx_path = mystrdup(datafilename("theme/default/intro3.png")); 
>   pLogo_gfx_path = mystrdup(datafilename("theme/default/logo.png")); 
>   pCity_gfx_path = mystrdup(datafilename("theme/default/city.png"));
> 
> datafilename may return NULL. This leads us to the second global one:
> 
>   There is no semantic defined for strlen(NULL), strdup(NULL) and 
>   strcpy(..., NULL).
> 
> Neither the C standard, man-pages nor OpenGroup said something about the 
> NULL case. So while for it may work (strlen(NULL) == 0 for example) on 
> most systems doesn't mean that it is safe everywhere. In the BeOS case it 
> crashes. Also note that I also didn't found any mention of the NULL case 
> for strlcpy. So it looks like we have to do some auditing (strlen) and 
> add guards to other functions (mystrdup) to catch the NULL case. The 
> latter can be "if(!str){die("NULL string);}" or "if(!str){return 
> strdup("");}".
> 
>    Raimar
-- 
Bernd Korz
----------------------------
www.insidebeos.com
www.beusergroup.de
www.yellowtab.com
www.berndkorz.insidebeos.de



[Prev in Thread] Current Thread [Next in Thread]