[Freeciv-Dev] (PR#40676) crash: Assertion `*connect_initial == 0' failed

2009-01-24 Thread Ann Barcomb

URL: http://bugs.freeciv.org/Ticket/Display.html?id=40676 

Freeciv crashed with the following error:

   civclient: goto.c:767: fill_client_goto_parameter: Assertion 
`*connect_initial == 0' failed.


Local details:

   Freeciv version 2.1.6 gui-gtk-2.0
   Linux 2.6.27.9-73.fc9.x86_64 #1 SMP Tue Dec 16 14:54:03 EST 2008 x86_64 
x86_64 x86_64 GNU/Linux


I have been able to replicate this crash three times using a saved game,
which I will attach once a ticket has been created.  To replicate the crash:
   1. Start the game as the Viking player
   2. Select the worker located directly south of Ribe
   3. Hit control-shift-i

A backtrace is attached.
#0  0x0033bd032215 in raise (sig=value optimized out) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x0033bd033d83 in abort () at abort.c:88
#2  0x0033bd02b039 in __assert_fail (assertion=value optimized out, 
file=value optimized out, line=value optimized out, function=value 
optimized out)
at assert.c:78
#3  0x0041d097 in fill_client_goto_parameter (punit=0x8b720a0, 
parameter=0x7174480, connect_initial=0x7174474, connect_speed=0x7174478) at 
goto.c:767
#4  0x0041eaee in enter_goto_state (punits=value optimized out) at 
goto.c:815
#5  0x0041b0e2 in request_unit_connect (activity=ACTIVITY_IRRIGATE) at 
control.c:1084
#6  0x003ee5f66edc in gtk_item_factory_callback_marshal (widget=Could not 
find the frame base for gtk_item_factory_callback_marshal.
) at gtkitemfactory.c:188
#7  0x003d68a0b6cd in IA__g_closure_invoke (closure=value optimized out, 
return_value=value optimized out, n_param_values=value optimized out, 
param_values=value optimized out, invocation_hint=value optimized out) 
at gclosure.c:490
#8  0x003d68a1f6b1 in signal_emit_unlocked_R (node=value optimized out, 
detail=value optimized out, instance=value optimized out, 
emission_return=value optimized out, instance_and_params=value optimized 
out) at gsignal.c:2440
#9  0x003d68a20b8c in IA__g_signal_emit_valist (instance=value optimized 
out, signal_id=value optimized out, detail=value optimized out, 
var_args=value optimized out) at gsignal.c:2199
#10 0x003d68a210d3 in IA__g_signal_emit (instance=value optimized out, 
signal_id=value optimized out, detail=value optimized out) at gsignal.c:2243
#11 0x003ee60f36aa in closure_accel_activate (closure=Could not find the 
frame base for closure_accel_activate.
) at gtkwidget.c:4108
#12 0x003d68a0b6cd in IA__g_closure_invoke (closure=value optimized out, 
return_value=value optimized out, n_param_values=value optimized out, 
param_values=value optimized out, invocation_hint=value optimized out) 
at gclosure.c:490
#13 0x003d68a1f6b1 in signal_emit_unlocked_R (node=value optimized out, 
detail=value optimized out, instance=value optimized out, 
emission_return=value optimized out, instance_and_params=value optimized 
out) at gsignal.c:2440
#14 0x003d68a20a0f in IA__g_signal_emit_valist (instance=value optimized 
out, signal_id=value optimized out, detail=value optimized out, 
var_args=value optimized out) at gsignal.c:2209
#15 0x003d68a210d3 in IA__g_signal_emit (instance=value optimized out, 
signal_id=value optimized out, detail=value optimized out) at gsignal.c:2243
#16 0x003ee5e655e4 in IA__gtk_accel_group_activate (accel_group=Could not 
find the frame base for IA__gtk_accel_group_activate.
) at gtkaccelgroup.c:739
#17 0x003ee5e656e2 in IA__gtk_accel_groups_activate (object=Could not find 
the frame base for IA__gtk_accel_groups_activate.
) at gtkaccelgroup.c:777
#18 0x003ee610ae21 in IA__gtk_window_activate_key (window=Could not find 
the frame base for IA__gtk_window_activate_key.
) at gtkwindow.c:8019
#19 0x003ee61066d4 in gtk_window_key_press_event (widget=Could not find the 
frame base for gtk_window_key_press_event.
) at gtkwindow.c:4962
#20 0x003ee5f87452 in _gtk_marshal_BOOLEAN__BOXED (closure=Could not find 
the frame base for _gtk_marshal_BOOLEAN__BOXED.
) at gtkmarshalers.c:84
#21 0x003d68a0b6cd in IA__g_closure_invoke (closure=value optimized out, 
return_value=value optimized out, n_param_values=value optimized out, 
param_values=value optimized out, invocation_hint=value optimized out) 
at gclosure.c:490
#22 0x003d68a1f382 in signal_emit_unlocked_R (node=value optimized out, 
detail=value optimized out, instance=value optimized out, 
emission_return=value optimized out, instance_and_params=value optimized 
out) at gsignal.c:2478
#23 0x003d68a20a0f in IA__g_signal_emit_valist (instance=value optimized 
out, signal_id=value optimized out, detail=value optimized out, 
var_args=value optimized out) at gsignal.c:2209
#24 0x003d68a210d3 in IA__g_signal_emit (instance=value optimized out, 
signal_id=value optimized out, detail=value optimized out) at gsignal.c:2243
#25 0x003ee60f48be in gtk_widget_event_internal (widget=Could not find the 
frame base for gtk_widget_event_internal.
) 

[Freeciv-Dev] (PR#40676) crash: Assertion `*connect_initial == 0' failed

2009-01-24 Thread Madeline Book

URL: http://bugs.freeciv.org/Ticket/Display.html?id=40676 

 [...@domaintje.com - Sat Jan 24 18:48:35 2009]:
 
 Freeciv crashed with the following error:
 
civclient: goto.c:767: fill_client_goto_parameter: Assertion
 `*connect_initial == 0' failed.

 [...]
 
 I have been able to replicate this crash three times using a saved
 game,
 which I will attach once a ticket has been created.  To replicate the
 crash:
1. Start the game as the Viking player
2. Select the worker located directly south of Ribe
3. Hit control-shift-i
 
 A backtrace is attached.

Thanks for the report. I have confirmed the crash when using
ctrl-shift-i (connect irrigation) with a worker initially on
a tile with a mine. The attached patch fixes the assertion
failure, though I am not sure how correct it is. For example
despite the fact that get_activity_time() is trying to
indicate that mines should not be removed by the connection,
with this patch the client will happily connect over a mine
(removing it in the process). It's hard for me to follow what
the changes in 18010 (where this code was first introduced)
are trying to do; I'll think about it more, or hopefully some-
one more versed in this part of the codebase will give a hint
as to a more correct solution.


---
まず鉱山で働かせた。それから畑で働かせた。
diff --git a/client/goto.c b/client/goto.c
index 240e76a..fd4342b 100644
--- a/client/goto.c
+++ b/client/goto.c
@@ -764,7 +764,7 @@ static void fill_client_goto_parameter(struct unit *punit,
   }
 } else {
   /* otherwise moves_left_initially = punit-moves_left (default) */
-  assert(*connect_initial == 0);
+  *connect_initial = 0;
 }
 break;
   case HOVER_NUKE:
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev