[Freeciv-tickets] [freeciv] #78170: Attack from transport crash

Back to archive index
OSDN Ticket System norep****@osdn*****
Sun May 12 15:15:55 JST 2024


#78170: Attack from transport crash

  Open Date: 2024-05-10 08:44
Last Update: 2024-05-12 09:15

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/78170
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=78170

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2024-05-12 09:15 Updated by: cazfi

Comment:

While osdn has refused to send my comments about the first patch, the second one has already been made. Now you likely want to test unit_focus_advanceIterateSafe.patch first, to see if it resolves the issue for you. Seems to me that the old code could have messed memory with undefined results.
If it doesn't help:
Can you try to reproduce the issue with attached DeathFromTransportDebug.patch applied, and paste the logs between BEGINS and ENDS.
For reference, here's what I got on S3_1 HEAD, and where I see no problems (the removed unit (pointer) is not getting back to focus, like seems to happen in your backtrace):
3: BEGINS
3: client_remove_unit() 0x556fcdfba580 at (14, 24)
3: client_remove_unit(): 1 units in focus.
3: End of control_unit_killed(): 0 units in focus.
3: unit_focus_advance(): urgent focus size 0
3: Center tile: (14, 24)
3: best focus candidate: 0x556fcc10bd40
3: ENDS


---------------------------------------------------------------------
Ticket Status:

      Reporter: bard
         Owner: (None)
          Type: Bugs
        Status: Open
      Priority: 5 - Medium
     MileStone: 3.1.2
     Component: Client common
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Similar to bug #62981, but this time with default ruleset (S3_1). Tested with client gtk3.22 and qt6.
If I load the attached savegame, I use the mouse to select one of the Musketers (all in sentry state) inside the Transport, and I use "drag and drop" (mouse gesture) to attack the adjacent enemy Mech Inf, then the Musketer is deselected, loses the sentry state, and it changes to a "waiting orders" state with a "?" icon. If I select the same Musketer again, and I click attack when the popup appear, the game crashes with a segmentation fault error:
in utype_can_do_action() [unittype.c::449]: assertion '(signed int)(utype_index(putype)) >= 0 && (signed int)(utype_index(putype)) < (signed int) sizeof((unit_can_act_cacheact_id).vec) * 8' failed.
I'm playing a game where this kind of crashes are common (any action performed from a transport with a sentry unit), but it uses to work if I just reload the game. This savegame crashes to me every time I try the same attack.

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/78170
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=78170



More information about the Freeciv-tickets mailing list
Back to archive index