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

                 Summary: adv_data_get() called after adv_data_phase_done()
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Fri 04 Feb 2011 04:25:32 PM EET
                Category: ai
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: In Progress
             Assigned to: cazfi
        Originator Email: 
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: None
         Planned Release: 2.3.0, 2.4.0

    _______________________________________________________

Details:

While debugging patch #2352, I have discovered that adv_data_get() gets
sometimes called outside adv_data_phase_init() / adv_data_phase_done() pair.
This breaks things if there is need to recalculate the data. In that case
adv_data_get() calls adv_data_phase_done(), which does nothing as data phase
is already closed, and then adv_data_phase_init() which leaves data phase
open. So, data phase is left open when adv_data_get() returns even if it was
closed when adv_data_get() was first called. When adv_data_phase_init() is
then called for refreshing data for new turn, it detects that data phase is
already open and does nothing, leaving data outdated.

These calls happen in TRUNK at least, don't know about S2_3. Anyway,
adv_data_get() should be protected against errors like this in S2_3 too.




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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