Project

General

Profile

Actions

Bug #1460

open

unit_make_contact() called for dead unit

Added by Marko Lindqvist 10 days ago. Updated 10 days ago.

Status:
In Review
Priority:
Normal
Category:
Server
Target version:
Start date:
05/27/2025
Due date:
% Done:

0%

Estimated time:

Description

I have an alien ruleset autogame crash in main branch, which I've debugged long enough to know that unit_make_contact() is being called for a dead unit (and at this time utype pointer within unit structure is garbage)
The crash happens in 'unit_has_type_flag(punit, UTYF_FLAGLESS)' call only present in S3_3 and main, but unit_make_contact() has also other unit pointer usages that are not correct with a dead unit.


Files

Actions #1

Updated by Marko Lindqvist 10 days ago

Marko Lindqvist wrote:

unit_make_contact() has also other unit pointer usages that are not correct with a dead unit.

Those are conditional, and should never trigger the issue in the older branches.

Actions #2

Updated by Marko Lindqvist 10 days ago

Actions

Also available in: Atom PDF