[Freeciv-Dev] Re: Crash: Backtrace + bug.sav.gz (GTK1/FreeBSD4.7)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Just a quick note...
On Thu, 20 Feb 2003 10:56:00 +0100
Raimar Falke <rf13@xxxxxxxxxxxxxxxxx> wrote:
> On Thu, Feb 20, 2003 at 07:50:10AM +0000, Guy Harrison wrote:
> >
> > CVS updated a few hours ago. May be related to PR2709. Easy to trigger:
> > move Warrior at (78,8) east one square...
> >
> > assertion "is_normal_map_pos(((x - 1)),( ( y - 1)))" failed: file
> > "../../freeciv/client/mapview_common.c", line 65
> >
> > 65: square_iterate(x - 1, y - 1, 1, city_x, city_y) {
> >
> > Program received signal SIGABRT, Aborted.
>
> > 0x285facc0 in kill () from /usr/lib/libc_r.so.4
>
> Wow a libc4 system. These are rare these days.
But I only just got it! (FreeBSD-4.7 in case you're wondering.)
> > #3 0x806df09 in refresh_tile_mapcanvas (x=0, y=8, write_to_screen=1)
> > at ../../freeciv/client/mapview_common.c:65
>
> > <note>
> > ddd "display arguments"...
> > void refresh_tile_mapcanvas(int x, int y, bool write_to_screen)
> > x=0 <- trigger is zero?
> > y=4
> > write_to_screen=1
> >
>
> > I got the above from a subsequent run, hence y=4 rather than y=8 as
> > in the backtrace. I've verified the saved game will reliably
> > crash. Dunno if it's being next to the sea or walking into
> > unexplored area, or coincidence.
>
> For the crash you need iso mode.
Sorry, yes. Iso mode required.
>But even with this I can't reproduce
> but I can see from the code why is crashes. You are right that x==0
> triggered it. The problem is that
>
> square_iterate(x - 1, y - 1, 1, city_x, city_y) {
> ^^^^^^^^^^^^
> if ((pcity = map_get_city(city_x, city_y))) {
> get_canvas_xy(city_x, city_y, &canvas_x, &canvas_y);
> show_city_desc(pcity, canvas_x, canvas_y);
> }
> } square_iterate_end;
>
> will create unreal map positions and square_iterate wants real
> ones. The code has to normalize the map position before it is passed
> to square_iterate.
For the time being I'm able to get away with...
square_iterate(x,y, 1,city_x,city_y)
...which I more or less typed at random. Unfortunately I haven't had time to
investigate what effects this change actually has - except that bug.sav.gz no
longer crashes.
--
Guy Harrison
swamp-dog@xxxxxxxxxxxx
|
|