On 9/5/07, Kai Antweiler <[EMAIL PROTECTED]> wrote:
>
> > > For some reason I thought it might be a server-mode thing...
> >
> > ...The reason being that "glob2 --help" just says:
> > -nox <game file name>    runs the game without using the X server
>
> Yes, I asked Nuage last year to include more options.  Until then I used
> a save game where the human player was about to loose and called
> "glob2 --nox" from inside a bash for loop.
>
>
> > Anyway, there seems to be a problem with that option - it triggers a
> > segfault right away, here:
> > 0x080f0ce5 in GameGUI (this=0xbf7f3a54) at src/GameGUI.cpp:132
> > 132       minimap(globalContainer->gfx->getW()-128, 0, 128, 14,
> > Minimap::HideFOW)
> > - because globalContainer->gfx == NULL.
>
> Not again.  Options that are not used become bugs really fast in glob2.
> (This will happen to Stephs critters too.)
>
> OK, I can't fix this because my valgrind isn't working.
> You can change line 132 to:
>
>   minimap(globalContainer->runNoX ? 0 :
> globalContainer->gfx->getW()-128, 0, 128, 14, Minimap::HideFOW)
>
> I don't know whether 0 is a good value.
> Someone else has to fix this, or we have to wait until gentoo uses a
> newer valgrind.
> --
> Kai Antweiler


This is because the GlobalContainer expects gfx to exist at initialization.
In this case, your fix works, just because no mini map code is executed
after initialization. A potential fix is to change the minimap in GameGUI
from an object to a pointer, and only create it in the first place if gfx
exists.


-- 
Extra cheese comes at a cost. Bradley Arsenault.
_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel

Reply via email to