URL:
  <http://gna.org/bugs/?15061>

                 Summary: SDL: crash in hurry production dialog. 
                 Project: Freeciv
            Submitted by: None
            Submitted on: Wednesday 01/06/2010 at 13:44 CET
                Category: client-sdl
                Severity: 4 - Important
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 2.1.10
         Discussion Lock: Any
        Operating System: Mac OS
         Planned Release: 

    _______________________________________________________

Details:

Crash when OKing hurry production. Is intermittent. Backtrace follows:

#0  0x00006367 in city_buy_production (pcity=0x0) at citydlg_common.c:834
#1  0x000e9335 in ok_buy_prod_city_dlg_callback (pButton=0x1923ef50) at
citydlg.c:1072
#2  0x00155f33 in widget_pressed_action (pWidget=0x1923ef50) at widget.c:325
#3  0x00119b12 in main_mouse_button_down_handler (pButtonEvent=0x2776fc,
pData=0x0) at gui_main.c:335
#4  0x0011a9a1 in gui_event_loop (pData=0x0, loop_action=0,
key_down_handler=0x1197f3 <main_key_down_handler>, key_up_handler=0x119a8a
<main_key_up_handler>, mouse_button_down_handler=0x119ab5
<main_mouse_button_down_handler>, mouse_button_up_handler=0x119ba1
<main_mouse_button_up_handler>, mouse_motion_handler=0x119c35
<main_mouse_motion_handler>) at gui_main.c:705
#5  0x0011b1dd in ui_main (argc=1, argv=0x7095a0) at gui_main.c:1005
#6  0x00008a6f in SDL_main (argc=1, argv=0x7095a0) at civclient.c:417

Possible cause:

in ok_buy_prod_city_dlg_callback, popdown_hurry_production_dialog is called
before city_buy_production(pButton->data.city).
popdown_hurry_production_dialog frees the widgets including the pButton used
in the expression pButton->data.city. This often leads to pButton->data.city
being NULL.

Suggested solution:

move popdown_hurry_production_dialog after
city_buy_production(pButton->data.city).




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?15061>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


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

Reply via email to