Wed 10 Aug 2011 06:19:38 AM UTC, comment #7:
I'm not 100% sure about the patch - can't be as I did only test my error case. Here it did remove the crash and, furthermore, did not add any other. As I see it the following work flow is done:
srv_running()
- begin_turn()
-- new initialisation to ai/adv phase
- loop (phases)
-- begin_phases()
--- initialisation to ai/adv phase; if initialised, do nothing
-- (some code)
-- end_phase()
--- end of ai/adv phase
- end (loop phases)
- end_turn()
-- in this function the ai/adv phase can be closed to have the correct count of begin/end; these functions will do nothing at the moment but as you said, would be helpful to read the code
|
Tue 09 Aug 2011 09:13:09 PM UTC, comment #6:
Are you sure about the patch? Just by reading it (without checking from source code more context) I notice that you add initialization to one place, but don't remove it from anywhere. Isn't this going to cause double initialization? (If it is, and you have tested this patch without error messages, we are missing important assert)
Also, I don't remember offhand what, but moving the initialization earlier from where it is may cause other problems (I recall that when I last moved it, I put it as early as possible) Some information that it uses is bogus earlier, or something like that. Code comments or old tickets hopefully contain more exact information.
|
Sat 06 Aug 2011 10:34:57 PM UTC, original submission:
I'm working on a lua test game. Trying to add the lua function civil_war() I got the following core dump:
The attached savegame can be used to reproduce it. Simply start freeciv as './ser -F -f luatest.sav' and enter start ...
|