Opened 3 years ago

Closed 3 years ago

#5849 closed defect (fixed)

Error building Civic Center

Reported by: Asger Owned by: wraitii
Priority: Should Have Milestone: Alpha 24
Component: UI – In-game Keywords: regression
Cc: Patch: Phab:D3062

Description (last modified by Asger)

When I tried to build a civic center on a ruined one i got those errors.

this now happens whenever we try to build anything.

ERROR: JavaScript error: simulation/components/BuildRestrictions.js line 314 TypeError: this.GetTerritories(...).indexOf is not a function BuildRestrictions.prototype.HasTerritory@simulation/components/BuildRestrictions.js:314:10 BuildRestrictions.prototype.CheckPlacement@simulation/components/BuildRestrictions.js:184:8 GuiInterface.prototype.SetBuildingPlacementPreview@simulation/components/GuiInterface.js:1117:13 GuiInterface.prototype.ScriptCall@simulation/components/GuiInterface.js:2055:1 updateBuildingPlacementPreview@gui/session/input.js:134:17 handleInputAfterGui@gui/session/input.js:1072:4

ERROR: Error calling component script function ScriptCall

ERROR: JavaScript error: gui/session/input.js line 143 TypeError: result is undefined updateBuildingPlacementPreview@gui/session/input.js:143:36 handleInputAfterGui@gui/session/input.js:1072:4

ERROR: JavaScript error: simulation/components/BuildRestrictions.js line 314 TypeError: this.GetTerritories(...).indexOf is not a function BuildRestrictions.prototype.HasTerritory@simulation/components/BuildRestrictions.js:314:10 BuildRestrictions.prototype.CheckPlacement@simulation/components/BuildRestrictions.js:184:8 GuiInterface.prototype.SetBuildingPlacementPreview@simulation/components/GuiInterface.js:1117:13 GuiInterface.prototype.ScriptCall@simulation/components/GuiInterface.js:2055:1 updateBuildingPlacementPreview@gui/session/input.js:134:17 updateGUIObjects@gui/session/session.js:672:2 onSimulationUpdate@gui/session/session.js:642:2 __eventhandler66 (SimulationUpdate)@session SimulationUpdate:0:1

ERROR: Error calling component script function ScriptCall

ERROR: JavaScript error: gui/session/input.js line 143 TypeError: result is undefined updateBuildingPlacementPreview@gui/session/input.js:143:36 updateGUIObjects@gui/session/session.js:672:2 onSimulationUpdate@gui/session/session.js:642:2 __eventhandler66 (SimulationUpdate)@session SimulationUpdate:0:1

SVN: r24118

When the game is finished I will try to upload a video of the moment it happened.

Attachments (1)

commands.txt (699.4 KB ) - added by Asger 3 years ago.
Around minute 48:30 using no mods

Download all attachments as: .zip

Change History (7)

comment:1 by Asger, 3 years ago

Description: modified (diff)

comment:2 by Asger, 3 years ago

https://youtu.be/C0zBf4XIaXA This is the link to the video on my channel.

comment:3 by Stan, 3 years ago

Can you upload the replay ? And tell us at what time it happens ? Do you use any mods ?

Last edited 3 years ago by Stan (previous) (diff)

by Asger, 3 years ago

Attachment: commands.txt added

Around minute 48:30 using no mods

comment:4 by Freagarach, 3 years ago

Keywords: regression added
Milestone: BacklogAlpha 24

Athenian Long-wall upgrade is broken. Introduced in r23843.

Steps to reproduce:

  • Start game as Athenians.
  • Upgrade Long-wall tech.
  • Try to build something.

comment:5 by wraitii, 3 years ago

Owner: set to wraitii
Patch: Phab:D3062

Thanks for reporting, this is indeed a new issue.

comment:6 by wraitii, 3 years ago

Resolution: fixed
Status: newclosed

In 24135:

Fix Athenian Long Walls technology following rP23843.

rP23843 changed modifiers to explicitly support only string or numeric values.
However, buildRestrictions territories worked with a list, which errored out. This is now replaced with a string.

Reported by: Asger

Investigated by: Freagarach.

Reviewed By: Freagarach

Fixes #5849

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

Note: See TracTickets for help on using tickets.