Skip to content

Fix Carryalls attempting to deliver units that they aren't carrying.#22250

Merged
PunkPun merged 1 commit into
OpenRA:bleedfrom
pchote:fix-carryall-crash
Dec 28, 2025
Merged

Fix Carryalls attempting to deliver units that they aren't carrying.#22250
PunkPun merged 1 commit into
OpenRA:bleedfrom
pchote:fix-carryall-crash

Conversation

@pchote
Copy link
Copy Markdown
Member

@pchote pchote commented Dec 27, 2025

Fixes #21892.

@pchote pchote added this to the Next Release milestone Dec 27, 2025
// something might have happened to the cargo in the time between the activity being
// queued and being run, so short out if it is no longer valid.
if (carryall.Carryable == null)
if (carryall.Carryable == null || carryall.State != Carryall.CarryallState.Carrying)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code that changes the state also sets Carryable to null. So this doesn't seem like the right fix? Did you try to run this through the replay?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did, yes. The carryable was reserved for pickup (CarryallState.Reserved), but not actually picked when this action runs.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. And I assume the rest of the code is able to handle this case?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, yes.

Copy link
Copy Markdown
Member

@PunkPun PunkPun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@PunkPun PunkPun merged commit 17210c1 into OpenRA:bleed Dec 28, 2025
2 checks passed
@PunkPun
Copy link
Copy Markdown
Member

PunkPun commented Dec 28, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ArgumentException: in DeliverUnit.ReleaseUnit

2 participants