Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#6019 closed defect (fixed)

Creating lots of units, unknown error

Reported by: Langbart Owned by: wraitii
Priority: If Time Permits Milestone: Alpha 24
Component: UI – In-game Keywords:
Cc: Patch: Phab:D3562

Description

I do not know what causes this error. Median Oasis (2) as Cart

  • Open chat ‘gift from the gods'.
  • produce 2x siege catapults and 2x bolt gunners.
  • build 1x house, 1x elephant stable and 1x siege factory
  • produce 16 elephants (2x in pipeline)
  • produce 96 women (1x in pipeline)
  • produce 35x rams (20x in pipeline)
  • I did not move any of the units and did not set any waypoints away from the building, except for the 2x siege catapults and 2x bolt gunners.

ERROR: JavaScript error: simulation/components/ResourceGatherer.js line 136 right-hand side of 'in' should be an object, got undefined 
ResourceGatherer.prototype.RecalculateCapacity@simulation/components/ResourceGatherer.js:136:6 
ResourceGatherer.prototype.OnValueModification@simulation/components/ResourceGatherer.js:389:9 
ModifiersManager.prototype.SendPlayerModifierMessages@simulation/components/ModifiersManager.js:74:9 
ModifiersManager.prototype.ModifiersChanged@simulation/components/ModifiersManager.js:60:9 
ModifiersManager.prototype.Init/this.modifiersStorage._OnItemModified@simulation/components/ModifiersManager.js:23:87 
MultiKeyMap.prototype.AddItem@simulation/helpers/MultiKeyMap.js:49:7 
MultiKeyMap.prototype.AddItems@simulation/helpers/MultiKeyMap.js:62:19 
ModifiersManager.prototype.AddModifiers@simulation/components/ModifiersManager.js:265:31 
TechnologyManager.prototype.ResearchTechnology@simulation/components/TechnologyManager.js:228:23 
ProductionQueue.prototype.ProgressTimeout@simulation/components/ProductionQueue.js:917:26 
Timer.prototype.OnUpdate@simulation/components/Timer.js:139:44
ERROR: Script message handler OnValueModification failed

My guess is that the siege manufacturer had trouble putting out 16 units because two animals blocked the space for the 16th unit. So only 15 were around the building. Maybe this is causing the error.

I am attaching a zip file that contains the following:

  • 24892_2021-02-13_0002 (replay file).
  • 24892_logs (interestinglog.html and mainlog.html)

Attachments (3)

gift_from_the_gods.png (329.5 KB ) - added by Langbart 3 years ago.
massiv.gif (1.6 MB ) - added by Langbart 3 years ago.
24892_files.zip (58.2 KB ) - added by Langbart 3 years ago.

Download all attachments as: .zip

Change History (5)

by Langbart, 3 years ago

Attachment: gift_from_the_gods.png added

by Langbart, 3 years ago

Attachment: massiv.gif added

by Langbart, 3 years ago

Attachment: 24892_files.zip added

comment:1 by wraitii, 3 years ago

Owner: set to wraitii
Resolution: fixed
Status: newclosed

In 24896:

Fix this.capacities not always existing when processing value modification messages.

rP24670 assumed that this.capacities would always exist, but that proved incorrect, in particular if a value modification message is sent before ownership change is processed.

Fix that by initializing them on init.

Reported by: Langbart

Fixes #6019

Differential Revision: https://code.wildfiregames.com/D3562

comment:2 by Langbart, 3 years ago

Patch: Phab:D3562
Note: See TracTickets for help on using tickets.