Re: [Freeciv-Dev] (PR#39434) Crash in 2.1 in vsnprintf, probably related to unit_name_translation changes
http://bugs.freeciv.org/Ticket/Display.html?id=39434 > On 19/08/07, William Allen Simpson <[EMAIL PROTECTED]> wrote: > > Marko Lindqvist wrote: > > As a part of feature development, #18380 is not meant to be ported to S2_1. > > > As primarily a bug fix, #18380 should have been ported to S2_1, still > unreleased. And it's not too late As a side effect, #18380 caused one bug to disappear. #18380 is not ticket about fixing that bug. I'll open another ticket for that. - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39434) Crash in 2.1 in vsnprintf, probably related to unit_name_translation changes
http://bugs.freeciv.org/Ticket/Display.html?id=39434 > Marko Lindqvist wrote: > As a part of feature development, #18380 is not meant to be ported to S2_1. > As primarily a bug fix, #18380 should have been ported to S2_1, still unreleased. And it's not too late ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39434) Crash in 2.1 in vsnprintf, probably related to unit_name_translation changes
http://bugs.freeciv.org/Ticket/Display.html?id=39434 > On 04/07/07, William Allen Simpson <[EMAIL PROTECTED]> wrote: > > Comparing against trunk, found that this has been substantially > rewritten (PR#18380). Oh how I wish that folks would test and keep S2_1 > up-to-date As a part of feature development, #18380 is not meant to be ported to S2_1. - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39434) Crash in 2.1 in vsnprintf, probably related to unit_name_translation changes
http://bugs.freeciv.org/Ticket/Display.html?id=39434 > Marko Lindqvist wrote: > What is keeping this ticket open? > The general principal that developer/reporters close their own tickets? The fact that trunk is different, and needs further analysis? Ulrik was really active for awhile, I hope he'll be back soon! ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39434) Crash in 2.1 in vsnprintf, probably related to unit_name_translation changes
http://bugs.freeciv.org/Ticket/Display.html?id=39434 > On 04/07/07, William Allen Simpson <[EMAIL PROTECTED]> wrote: > > Ulrik Sverdrup wrote: > > This patch reinstates the ptype local variable that is needed after > > punit is wiped to print the user messages. > > > Thanks! Added comments. Probably shouldn't be destroyed until after > the messages are sent, but the logic isn't readily apparent. > > Committed revision 13045. What is keeping this ticket open? - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39434) Crash in 2.1 in vsnprintf, probably related to unit_name_translation changes
http://bugs.freeciv.org/Ticket/Display.html?id=39434 > William Allen Simpson wrote: > Thanks! Added comments. Probably shouldn't be destroyed until after > the messages are sent, but the logic isn't readily apparent. > Comparing against trunk, found that this has been substantially rewritten (PR#18380). Oh how I wish that folks would test and keep S2_1 up-to-date Looking at it, a fairly complicated set of interlocking patches. ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39434) Crash in 2.1 in vsnprintf, probably related to unit_name_translation changes
http://bugs.freeciv.org/Ticket/Display.html?id=39434 > Ulrik Sverdrup wrote: > This patch reinstates the ptype local variable that is needed after > punit is wiped to print the user messages. > Thanks! Added comments. Probably shouldn't be destroyed until after the messages are sent, but the logic isn't readily apparent. Committed revision 13045. ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39434) Crash in 2.1 in vsnprintf, probably related to unit_name_translation changes
http://bugs.freeciv.org/Ticket/Display.html?id=39434 > This patch reinstates the ptype local variable that is needed after punit is wiped to print the user messages. Patch against S2_1 r13044 Index: server/unittools.c === --- server/unittools.c (revision 13044) +++ server/unittools.c (arbetskopia) @@ -1468,6 +1470,7 @@ bool wipe_cargo = TRUE; /* This used to be a function parameter. */ struct tile *ptile = punit->tile; struct player *pplayer = unit_owner(punit); + struct unit_type *ptype = unit_type(punit); /* First pull all units off of the transporter. */ if (get_transporter_capacity(punit) > 0) { @@ -1528,7 +1531,7 @@ _("%s escaped the destruction of %s, and " "fled to %s."), unit_name_translation(pcargo), -unit_name_translation(punit), +utype_name_translation(ptype), pcity->name); } } @@ -1536,7 +1539,7 @@ notify_player(pplayer, ptile, E_UNIT_LOST, _("%s lost when %s was lost."), unit_name_translation(pcargo), - unit_name_translation(punit)); + utype_name_translation(ptype)); server_remove_unit(pcargo); } if (++capacity >= 0) { ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39434) Crash in 2.1 in vsnprintf, probably related to unit_name_translation changes
http://bugs.freeciv.org/Ticket/Display.html?id=39434 > Now I suspect it is simply that punit is not a valid pointer after server_remove_unit(punit); and we should extract the unit type of the punit before destroying it? Or is this a sign of something else at fault here? In the simple case, we just do something like const char *unit_name = unit_name_translation(punit); before wiping punit. ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev