Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2003:
[Freeciv-Dev] (PR#4815) failed assertion in client goto
Home

[Freeciv-Dev] (PR#4815) failed assertion in client goto

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#4815) failed assertion in client goto
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 10 Aug 2003 20:03:58 -0700
Reply-to: rt@xxxxxxxxxxxxxx

civclient: goto.c:392: enter_goto_state: Assertion 
`goto_map.template.get_EC == ((void *)0)' failed.

Does this have anything to do with the 2 recent commits to goto.c?  I 
don't see how it couldn't - but OTOH I don't see how it could, either...

#0  0x4041afd1 in kill () from /lib/libc.so.6
#1  0x4041ac94 in raise () from /lib/libc.so.6
#2  0x4041c04d in abort () from /lib/libc.so.6
#3  0x40414695 in __assert_fail () from /lib/libc.so.6
#4  0x0806db0d in enter_goto_state (punit=0x0) at goto.c:398
#5  0x0806b104 in request_unit_goto () at control.c:603
#6  0x401a5bb8 in gtk_item_factory_callback_marshal (widget=0x82ba088,
     func_data=0x6) at gtkitemfactory.c:263

It seems easily reproducable: just goto, then goto with another unit.

I suspect the assertions are spurious.  Too bad there's no comment 
explaining why they're there.  Really, I don't understand why they 
didn't always fail.  These values are initialized when you enter the 
goto state, and never unitialized.  What am I missing?

jason

? rc
Index: client/goto.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/goto.c,v
retrieving revision 1.56
diff -u -r1.56 goto.c
--- client/goto.c       2003/08/11 02:31:38     1.56
+++ client/goto.c       2003/08/11 03:01:36
@@ -389,8 +389,6 @@
   goto_map.unit_id = punit->id;
   assert(goto_map.num_parts == 0);
 
-  assert(goto_map.template.get_EC == NULL);
-  assert(goto_map.template.get_TB == NULL);
   fill_client_goto_parameter(punit, &goto_map.template);
 
   add_part();

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