Opened 22 months ago
Closed 22 months ago
#6580 closed defect (fixed)
Trouble with merging formations
Reported by: | Langbart | Owned by: | Freagarach |
---|---|---|---|
Priority: | Release Blocker | Milestone: | Alpha 26 |
Component: | Simulation | Keywords: | regression |
Cc: | Patch: | Phab:D4727 |
Description
Issue No.1 - conversion check
This issue was first reported by andy5995
in the forum
- Feedbacks from A26 SVN tests (22/Jun/22)
errors
ERROR: JavaScript error: simulation/components/Formation.js line 931 Script value conversion check failed: v.isString() || v.isNumber() || v.isBoolean() (got type undefined) Formation.prototype.ComputeMotionParameters@simulation/components/Formation.js:931:16 Formation.prototype.AddMembers@simulation/components/Formation.js:449:7 Formation.prototype.ShapeUpdate@simulation/components/Formation.js:973:8 Timer.prototype.OnUpdate@simulation/components/Timer.js:139:44 ERROR: Script message handler OnUpdate failed
to reproduce
Note: The steps for reproduction could not be clearly determined, the following points only increase the probability of the error occurring.
- Start a map with three unit groups, each with at least 4 entities.
- Position them far apart and select them all.
- First choose the
None
formation and after that theBox
formation - Units should not come together, but only form a formation at the position they are currently at.
- Now order all three groups to come together by clicking at the center point.
- Check the images below and the first minute of the attached replay for more clarity:
conversion_check.txt
possible solution for issue no.1
-
binaries/data/mods/public/simulation/components/Formation.js
a b Formation.prototype.ShapeUpdate = function() 969 969 // Merge the members from the twin formation into this one 970 970 // twin formations should always have exactly the same orders. 971 971 let otherMembers = cmpOtherFormation.members; 972 if (otherMembers.length == 0) 973 continue; 972 974 cmpOtherFormation.RemoveMembers(otherMembers); 973 975 this.AddMembers(otherMembers); 974 976 Engine.DestroyEntity(this.twinFormations[i]);
Issue No.2
It is related to problem no. 1. If the group is not successfully merged, there is a big problem that prevents any interaction with the game when trying to select certain units that have not been successfully merged into the new large formation.
errors
ERROR: JavaScript error: gui/session/selection.js line 500 GetEntityState(...) is null EntitySelection.prototype.addFormationMembers@gui/session/selection.js:500:39 EntitySelection.prototype.setHighlightList@gui/session/selection.js:433:20 handleInputBeforeGui@gui/session/input.js:529:16
to reproduce
Note: The steps for reproduction could not be clearly determined, the following points only increase the probability of the error occurring.
- Try the steps from issue no.1 with a mixture of different unit types.
- This might take multiple runs to occur.
- Watch the replay
GetEntityState_null.txt
till 50 seconds have gone by and then try to select all the units that have tried to merge.
bisect
(not yet)
reproducible
Could not trigger any of the errors described above in A25b, I guess the problem must have been introduced after [25860].
additional notes
Tested on [26983] with default settings.
Attachments (6)
Change History (11)
by , 22 months ago
Attachment: | merge_gone_wrong.jpg added |
---|
by , 22 months ago
Attachment: | GetEntityState_null.txt added |
---|
by , 22 months ago
Attachment: | conversion_check.txt added |
---|
by , 22 months ago
Attachment: | conversion_check.jpg added |
---|
by , 22 months ago
Attachment: | conversion_check_fail.jpg added |
---|
comment:1 by , 22 months ago
comment:3 by , 22 months ago
Component: | Core engine → Simulation |
---|---|
Keywords: | regression added |
Owner: | set to |
Patch: | → Phab:D4727 |
Thanks for the thorough report. :)
comment:4 by , 22 months ago
Since I reported that a few days ago, I haven't played any games until today. Me and Jammy again vs AI. we played 2 games. The first one was short, maybe 20 minutes. Second game (same setup) was over an hour. Scripting error happened on the second game. We both used the latest git version at commit 74a0875.
I'll attach the replay and interestinglog
by , 22 months ago
Attachment: | 2022-06-27_0002.zip added |
---|
saharan oases replay + interestinglog.html 2v3AI
Hey,
Thanks again for the very detailed report. It's nice to see all one can see with markdown, you seem to have mastered it :)
Could be Phab:rP26956, or Phab:rP26893.
Sounds like it might happen often so it is indeed a release blocker. I hope Freagarach will have some time after the weekend :/
This is blocking for RC2 as well.