Opened 3 years ago

Last modified 2 years ago

#6377 closed defect

UnitAI error code being displayed — at Version 1

Reported by: Langbart Owned by:
Priority: Should Have Milestone: Alpha 26
Component: Simulation Keywords: UnitAI regression
Cc: Patch:

Description (last modified by Langbart)

When playing a game on Alpha 25b [25860], some errors occurred and even when viewing the replay with and without mods, the error remains the same.

0 A.D. (0.0.25) Main log (warnings and errors only)
ERROR: JavaScript error: simulation/components/UnitAI.js line 6143 Failed to construct Vector3D object

ERROR: Failed to call ProcessCommand() global script function

Engine exited successfully on 2021-11-10 at 21:53:01 with 1604 message(s), 2 error(s) and 0 warning(s).

The error is displayed only once after about 10 seconds in the game. I will attach the replay as a zip file, I have never seen this error before.

Line 6143 in Unitai.js at [25860]

Line 
6137UnitAI.prototype.RememberTargetPosition = function(orderData)
6138{
6139 if (!orderData)
6140 orderData = this.order.data;
6141 let cmpPosition = Engine.QueryInterface(orderData.target, IID_Position);
6142 if (cmpPosition && cmpPosition.IsInWorld())
6143 orderData.lastPos = cmpPosition.GetPosition();
6144};

Change History (3)

by Langbart, 3 years ago

Attachment: unitai_error_replay.zip added

by Langbart, 3 years ago

Attachment: unitai_error.jpg added

comment:1 by Langbart, 3 years ago

Description: modified (diff)

Adding the referenced line of code from the error to the description.

Note: See TracTickets for help on using tickets.