Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3232 closed defect (fixed)

Petra AI transportPlan - self.boardingPos[shipId] is undefined

Reported by: elexis Owned by: mimo
Priority: Should Have Milestone: Alpha 19
Component: AI Keywords:
Cc: Patch:

Description

This error happened on r16639.

First error appeared on turn 880:

ERROR: JavaScript error: simulation/ai/petra/transportPlan.js line 294
TypeError: self.boardingPos[shipId] is undefined
  m.TransportPlan.prototype.onBoarding/<@simulation/ai/petra/transportPlan.js:294:6
  m.EntityCollection.prototype.forEach@simulation/ai/common-api/entitycollection.js:142:3
  m.TransportPlan.prototype.onBoarding@simulation/ai/petra/transportPlan.js:251:2
  m.TransportPlan.prototype.update@simulation/ai/petra/transportPlan.js:239:3
  m.NavalManager.prototype.update@simulation/ai/petra/navalManager.js:717:7
  m.HQ.prototype.update@simulation/ai/petra/headquarters.js:1841:2
  m.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:123:3
  m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:83:2

The second error appeared on every turn thereafter:

ERROR: JavaScript error: simulation/ai/common-api/utils.js line 32
TypeError: a is undefined
  m.SquareVectorDistance@simulation/ai/common-api/utils.js:32:6
  m.TransportPlan.prototype.onBoarding/<@simulation/ai/petra/transportPlan.js:280:9
  m.EntityCollection.prototype.forEach@simulation/ai/common-api/entitycollection.js:142:3
  m.TransportPlan.prototype.onBoarding@simulation/ai/petra/transportPlan.js:251:2
  m.TransportPlan.prototype.update@simulation/ai/petra/transportPlan.js:239:3
  m.NavalManager.prototype.update@simulation/ai/petra/navalManager.js:717:7
  m.HQ.prototype.update@simulation/ai/petra/headquarters.js:1841:2
  m.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:123:3
  m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:83:2

Error reproducible with the attached commands.txt.

Attachments (1)

commands.txt and replaylog.7z (20.6 KB ) - added by elexis 9 years ago.

Download all attachments as: .zip

Change History (4)

by elexis, 9 years ago

comment:1 by elexis, 9 years ago

It was a networked game on cycladic islands. The error appeared after minute 7 (i.e. after the ceasefire ended) and it was a tiny map (map size 128). A ship could barely pass the islands, if at all.

comment:2 by mimo, 9 years ago

Owner: set to mimo
Resolution: fixed
Status: newclosed

In 16641:

petra: add protection when no boarding point found, fix #3232

comment:3 by mimo, 9 years ago

Milestone: BacklogAlpha 19
Note: See TracTickets for help on using tickets.