Skip to content

Fix crash caused by queuing multiple pick up orders for a single unit.#21425

Merged
PunkPun merged 1 commit intoOpenRA:bleedfrom
darkademic:pr/fix-queued-pickup
May 27, 2024
Merged

Fix crash caused by queuing multiple pick up orders for a single unit.#21425
PunkPun merged 1 commit intoOpenRA:bleedfrom
darkademic:pr/fix-queued-pickup

Conversation

@darkademic
Copy link
Copy Markdown
Contributor

Feel free to suggest a simpler check, or a better location for it.

If you queue multiple pick up orders on a single unit, the game will crash once the Carryall has picked up the unit and has fully taken off again (as it tries to perform another PickupUnit activity).

This fixes it.

@darkademic darkademic force-pushed the pr/fix-queued-pickup branch from c42308c to 2e68ced Compare May 25, 2024 08:10
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.

It crashes with null exception because it failed to reserve in OnFirstRun and now it doesn't have child activities. To fix this we should make sure we cancel the activity on failing to reserve. I recon a flag should be good as we can't call Cancel in OnFirstTick

@darkademic darkademic force-pushed the pr/fix-queued-pickup branch from 2e68ced to f7db9d5 Compare May 26, 2024 19:15
@darkademic
Copy link
Copy Markdown
Contributor Author

It crashes with null exception because it failed to reserve in OnFirstRun and now it doesn't have child activities. To fix this we should make sure we cancel the activity on failing to reserve. I recon a flag should be good as we can't call Cancel in OnFirstTick

Aha, something like this (see updated code)? That also fixes it.

@darkademic darkademic force-pushed the pr/fix-queued-pickup branch from f7db9d5 to 5230c2b Compare May 26, 2024 21:03
@PunkPun PunkPun merged commit b693f20 into OpenRA:bleed May 27, 2024
@PunkPun
Copy link
Copy Markdown
Member

PunkPun commented May 27, 2024

changelog

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.

2 participants