-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed a crash when trying to capture husks that have been destroyed. #5801
Conversation
@@ -12,6 +12,7 @@ | |||
|
|||
namespace OpenRA.Mods.RA.Buildings | |||
{ | |||
[Desc("A dictionary of buildings placed on the map. Attach this to the World: actor.")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
World:
is syntax for a yaml trait.
Maybe Attach this to the world actor
would be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay.
Two problems here:
|
Updated. I hope this fixes the problem as a whole. Looks the removal from the world and immediate adding back during owner change was causing breakage everywhere when the actor has already been destroyed. Looks like BuildingInfluence was just the first one being notified and stumbling over it then. |
I think @chrisforbes's point 2) is the key thing here. This crash will be occurring when someone captures a husk in the same tick that it is killed and removed from the map. The current checks will prevent the crash, but it will also cause the engineer/mechanic to be consumed with no tank to show for it. A much better fix for this crash would be to add an IsDead check to CaptureActor.cs:L42. |
I added additional checks. Now every AddFrameEndTask should be safe. |
Fixed a crash when trying to capture husks that have been destroyed.
Confirmed that this fixes the crash and that engineers/mechanics aren't consumed when this case is hit. Thanks. |
as desribed in #5793 and #5638.