-
-
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
Fix a crash when RallyPoint creates RallyPointIndicator #20937
Conversation
I have the replay and the game project (non-git) used by my tester, but it is very strange that my project in git cannot read the replay (cannot find the map). The effective game project is now holded by Hans (tester), and we all have that replay file: Update: |
Why would |
So I can only guess so. I have the same thought as you said, but the fix is working while I am still confused |
So this how I debug:
|
What was triggering the Lua callback that created the actor? |
Triggered by
|
You shouldn't be adding any actors to world on the lua trigger frame |
That is weird then. I don't see any description or comment in Lua Trigger about this limitation. |
meanwhile, if we cannot use call back inside trigger frames to spawn actor, then coding basic story plot like reinforcement after certain mission completed or actor killed will be impossible or too complicated. |
In the lua scripting openra provides we always make sure that actors are only added to world on end frame tick. Though I suppose rally point creates the actor even before it's added to world? |
No. In
|
And at line 206, in Actor.cs, the |
Yes, that makes sense now. The effect should be added in OpenRA/OpenRA.Mods.Cnc/Traits/GpsDot.cs Lines 43 to 56 in 56b5ace
|
In addition, the example shows us most of the |
I am still very curious about it: this bug is not a 100% crash, or I have to say this is a rare crash, consider OpenRA has so many mods and we don't see crash like this. And I cannot reproduce this crash myself, have tried many times. Only crash in this replay. Can someone explain in detail on how the timing cause the problem? Meanwhile, this will lead to a problem that we have to check all of the traits and related places on the timing of effect added&removed. |
Automatic checks fail:
|
Fixed |
Fix #20938
How it happens
When actor with
RallyPoint
is created by Lua Script, it has a low chance that theRallyPointIndicator
is created when effect is ticking (I can only guess so). It was reported by a tester on my mission map testing.Use this fix and the replay is no longer crash