[Freeciv-Dev] Re: (PR#7077) assert in packhand
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7077 >
On Thu, Dec 11, 2003 at 01:17:47AM -0800, ue80@xxxxxxxxxxxxxxxxxxxxx wrote:
>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7077 >
>
> On Thu, Dec 11, 2003 at 01:01:49AM -0800, Raimar Falke wrote:
> >
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=7077 >
> >
> > On Wed, Dec 10, 2003 at 08:32:00AM -0800, ue80@xxxxxxxxxxxxxxxxxxxxx wrote:
> > >
> > > <URL: http://rt.freeciv.org/Ticket/Display.html?id=7077 >
> > >
> > > With cvs-head gtk-client
> > >
> > > i get:
> > >
> > > 2: 0x83da670 Marines at (48,37) 8
> > > civclient: packhand.c:1873: handle_tile_info: Assertion
> > > `unit_list_size(&ptile->units) == 0' failed.
> > > Aborted (core dumped)
> > >
> > > #0 0x4041a561 in kill () from /lib/libc.so.6
> > > (gdb) bt
> > > #0 0x4041a561 in kill () from /lib/libc.so.6
> > > #1 0x4035c741 in pthread_kill () from /lib/libpthread.so.0
> > > #2 0x4035ca4b in raise () from /lib/libpthread.so.0
> > > #3 0x4041a314 in raise () from /lib/libc.so.6
> > > #4 0x4041b828 in abort () from /lib/libc.so.6
> > > #5 0x40413a5f in __assert_fail () from /lib/libc.so.6
> > > #6 0x0807d997 in handle_tile_info (packet=0x82bd950) at packhand.c:1853
> > > #7 0x0807f442 in client_handle_packet (type=PACKET_PROCESSING_STARTED,
> > > packet=0x40362cf4) at packhand_gen.c:72
> > > #8 0x08069d9e in handle_packet_input (packet=0x82bd950, type=14)
> > > at civclient.c:273
> > > #9 0x0806d1bb in input_from_server (fd=6) at clinet.c:325
> > > #10 0x40180bcf in gdk_get_show_events () from /usr/lib/libgdk-1.2.so.0
> > >
> > > It's reproduceable.
> > > (Savegame available)
> >
> > Please send the savegame and the instructions.
>
> Client compiled with --enable-client=gtk
>
> Login as pille with autoturndone, after some turns the game crashes.
The fix for the rather dumb (use of pplayer instead of other_player)
bug attached. The fix is also applied.
The Marine in the ship attacks the city. The server shows the
attacking unit to the city owner. Bug here is that the server doesn't
remove this knowledge after the attack. So the client now sees a
Marine which floats in the ocean. A turn later the city is finally
captured and the assert above triggers.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"- Amiga Y2K fixes (a bit late, wouldn't you say?)"
-- Linus Torvalds about linux 2.4.0 at 4 Jan 2001
Index: server/unithand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unithand.c,v
retrieving revision 1.279
diff -u -u -r1.279 unithand.c
--- server/unithand.c 2003/11/28 17:37:22 1.279
+++ server/unithand.c 2003/12/15 19:04:03
@@ -741,12 +741,12 @@
/*
* Remove the client knowledge of the units.
*/
- if (!can_player_see_unit_at2(pplayer, punit, punit->x, punit->y)) {
- unit_goes_out_of_sight(pplayer, punit);
+ if (!can_player_see_unit_at2(other_player, punit, punit->x, punit->y)) {
+ unit_goes_out_of_sight(other_player, punit);
}
if (!can_player_see_unit_at2
- (pplayer, pdefender, pdefender->x, pdefender->y)) {
- unit_goes_out_of_sight(pplayer, pdefender);
+ (other_player, pdefender, pdefender->x, pdefender->y)) {
+ unit_goes_out_of_sight(other_player, pdefender);
}
}
} players_iterate_end;
|
|