[Freeciv-Dev] (PR#39919) freeze on Haiku (formaly openbeos)

2007-12-05 Thread

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

Started the server from the Terminal in Haiku now ... I was thinking
that this could be a problem as the server is started in the background
when civclient is started.
First it was telling me that there was no libreadline.so.4 in Haiku
(copy'd that over from my ZETA install), after that I got into the
debugger and got some info out of it. Hope it can serve some purpose ...


haiku_freeciv_server
Description: Binary data
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39850) hover_tile crash on 1st turn of second game

2007-12-05 Thread William Allen Simpson

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

Sadly for 2.1, we have another problem from PR#17793, porting only part of
the update_mouse_cursor() patch of PR#17637.  And that's why we crash

It makes my head hurt!

I'll try to cobble together a minimal patch tonight.



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39850) hover_tile crash on 1st turn of second game

2007-12-05 Thread William Allen Simpson

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

The good news is that I tested against 2.2, and it doesn't crash.  So,
porting the rest of the update_mouse_cursor() patch should fix this
particular symptom

The VERY BAD NEWS is that this is not the only problem.  I cannot find a
code path from the Leave command to control_done().

Therefore, all the battlegroup, client goto, etc. lists are still holding
units and stuff from the previous game.  And that's true for 2.2/trunk!

This is the umpteenth time we've seen that code ported from warclients is
very poorly written.  Let's see, I've already suggested hanging from their
toes, and lopping off their fingers to prevent future atrocities -- what
else can be done to punish the perpetrators?



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39850) crash on 1st turn of second game

2007-12-05 Thread William Allen Simpson

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

In trunk, an additional line was added by (PR#17637) Wait Cursor:

client/civclient.c:475:
/**
  called whenever client is changed to pre-game state.
**/
void client_game_init()
{
   game_init();
   attribute_init();
   agents_init();
   hover_tile = NULL;
}

Gosh, you think that *might* be important?



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39850) missing control re-initialization for second game

2007-12-05 Thread William Allen Simpson

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

Not the way I'd planned to spend my Wednesday evening, but here's the
minimal backport from S2_2 to S2_1 that fixes the crash.  In addition, it
should handle all the other potential bugs reported on this ticket
concerning leaving and starting another game (without quitting the client).
Obviously not a code path that was well tested  Committing immediately,
and I'd appreciate independent testing, please.

Committed S2_1 revision 14139.
Committed S2_2 revision 14140.
Committed trunk revision 14141.

Index: client/control.c
===
--- client/control.c(revision 14138)
+++ client/control.c(working copy)
@@ -62,11 +62,11 @@
 
 /* These should be set via set_hover_state() */
 enum cursor_hover_state hover_state = HOVER_NONE;
-struct tile *hover_tile = NULL;
 enum cursor_action_state action_state = CURSOR_ACTION_DEFAULT;
 enum unit_activity connect_activity;
 enum unit_orders goto_last_order; /* Last order for goto */
 
+static struct tile *hover_tile = NULL;
 static struct unit_list *battlegroups[MAX_NUM_BATTLEGROUPS];
 
 /* units involved in current combat */
@@ -89,7 +89,7 @@
 enum quickselect_type qtype);
 
 /**
-  Called only by main() in client/civclient.c.
+  Called only by client_game_init() in client/civclient.c
 **/
 void control_init(void)
 {
@@ -105,10 +105,11 @@
   for (i = 0; i  MAX_NUM_BATTLEGROUPS; i++) {
 battlegroups[i] = unit_list_new();
   }
+  hover_tile = NULL;
 }
 
 /**
-  Called only by client_exit() in client/civclient.c.
+  Called only by client_game_free() in client/civclient.c
 **/
 void control_done(void)
 {
@@ -124,6 +125,7 @@
   for (i = 0; i  MAX_NUM_BATTLEGROUPS; i++) {
 unit_list_free(battlegroups[i]);
   }
+  free_client_goto();
 }
 
 /**
@@ -896,7 +898,7 @@
 enter_goto_state(punits);
 create_line_at_mouse_pos();
 update_unit_info_label(punits);
-handle_mouse_cursor(NULL);
+control_mouse_cursor(NULL);
   } else {
 assert(goto_is_active());
 goto_add_waypoint();
@@ -923,12 +925,17 @@
   and the information gathered from the tile which is under the mouse 
   cursor (ptile).
 **/
-void handle_mouse_cursor(struct tile *ptile)
+void control_mouse_cursor(struct tile *ptile)
 {
   struct unit *punit = NULL;
   struct city *pcity = NULL;
   struct unit_list *active_units = get_units_in_focus();
 
+  if (C_S_RUNNING != client_state()) {
+action_state = CURSOR_ACTION_DEFAULT;
+return;
+  }
+
   if (is_server_busy()) {
 /* Server will not accept any commands. */
 action_state = CURSOR_ACTION_WAIT;
@@ -938,11 +945,14 @@
 
   if (!ptile) {
 if (hover_tile) {
-  /* hover_tile is the tile which is currently under the mouse cursor. */
+  /* hover_tile is the tile that was previously under the mouse cursor. */
   ptile = hover_tile;
 } else {
+  action_state = CURSOR_ACTION_DEFAULT;
   return;
 }
+  } else {
+hover_tile = ptile;
   }
 
   punit = find_visible_unit(ptile);
@@ -991,8 +1001,6 @@
 /* FIXME */
 break;
   };
-
-  update_unit_info_label(active_units);
 }
 
 /**
@@ -1076,7 +1084,7 @@
 enter_goto_state(punits);
 create_line_at_mouse_pos();
 update_unit_info_label(punits);
-handle_mouse_cursor(NULL);
+control_mouse_cursor(NULL);
   } else {
 assert(goto_is_active());
 goto_add_waypoint();
Index: client/gui-gtk-2.0/mapview.c
===
--- client/gui-gtk-2.0/mapview.c(revision 14138)
+++ client/gui-gtk-2.0/mapview.c(working copy)
@@ -178,7 +178,7 @@
 
   gdk_window_set_cursor(root_window,
 fc_cursors[cursor_type][cursor_frame]);
-  handle_mouse_cursor(NULL);
+  control_mouse_cursor(NULL);
   return TRUE;
 }
 
Index: client/gui-gtk-2.0/gui_main.c
===
--- client/gui-gtk-2.0/gui_main.c   (revision 14138)
+++ client/gui-gtk-2.0/gui_main.c   (working copy)
@@ -607,7 +607,6 @@
 static gboolean mouse_scroll_mapcanvas(GtkWidget *w, GdkEventScroll *ev)
 {
   int scroll_x, scroll_y, xstep, ystep;
-  struct tile *ptile = NULL;
 
   if (!can_client_change_view()) {
 return FALSE;
@@ -647,9 +646,7 @@
 maybe_activate_keyboardless_goto(cur_x, cur_y);
   }
 
-  ptile = canvas_pos_to_tile(cur_x, cur_y);
-  handle_mouse_cursor(ptile);
-  hover_tile = ptile;
+  

[Freeciv-Dev] Starting Locations

2007-12-05 Thread Todd Sorensen
Hi,

I really enjoy your game and like the new version.
There is just one problem I am having with it: unlike
the last version (Feb?) when you play the European
scenario, there are non-european nations playing as
well. Is this an option I have to change somewhere or
a bug?

Thanks,

Todd


  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev