Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3142 closed defect (fixed)

[PATCH] game with 8 players on a giant map prints many js errors at some point

Reported by: matanya Owned by: mimo
Priority: Should Have Milestone: Alpha 19
Component: Core engine Keywords:
Cc: Patch:

Description

ERROR: JavaScript error: simulation/ai/petra/entity-extend.js line 8 TypeError: ent is undefined

m.getMaxStrength@simulation/ai/petra/entity-extend.js:8:6 m.Army.prototype.evaluateStrength@simulation/ai/petra/army.js:94:6 m.Army.prototype.recalculateStrengths@simulation/ai/petra/army.js:86:3 m.Army.prototype.merge@simulation/ai/petra/army.js:284:2 m.DefenseManager.prototype.checkEnemyArmies@simulation/ai/petra/defenseManager.js:181:5 m.DefenseManager.prototype.update@simulation/ai/petra/defenseManager.js:20:2 m.HQ.prototype.update@simulation/ai/petra/headquarters.js:1801:2 m.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:123:3 m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:83:2

Attachments (3)

commands.txt (303.5 KB ) - added by matanya 9 years ago.
comands.txt
logs.tar.gz (269.4 KB ) - added by matanya 9 years ago.
logs
ticket3142.diff (1.0 KB ) - added by mimo 9 years ago.

Download all attachments as: .zip

Change History (9)

by matanya, 9 years ago

Attachment: commands.txt added

comands.txt

by matanya, 9 years ago

Attachment: logs.tar.gz added

logs

comment:1 by elexis, 9 years ago

He said he uses linux, the alpha 18 release version of 0ad and that he had this error in multiple matches.

The two html logfiles contain the exact same errors. All errors seem to be related to a missing entity.

Reportedly this error happened on a17 too.

Last edited 9 years ago by elexis (previous) (diff)

comment:2 by elexis, 9 years ago

Replaying the commands.txt reproduces the errors!

by mimo, 9 years ago

Attachment: ticket3142.diff added

comment:3 by mimo, 9 years ago

Milestone: BacklogAlpha 19
Summary: game with 8 players on a giant map prints many js errors at some point[PATCH] game with 8 players on a giant map prints many js errors at some point

Should be fixed with the patch attached. I'll do more tests and commit it later.

Version 0, edited 9 years ago by mimo (next)

comment:4 by mimo, 9 years ago

In fact, the previous patch was not satisfactory as AIProxy was expecting a certain behaviour from the simulation.(i.e. setting the entity ownership on the same turn as the entity creation) and the patch tried to force the simulation to this expectation. I'm going to fix it differently by removing this expectation from AIProxy.

comment:5 by mimo, 9 years ago

Owner: set to mimo
Resolution: fixed
Status: newclosed

In 16467:

let AIProxy deal with new entities created without ownership, fixes #3142

comment:6 by mimo, 9 years ago

Thanks for the report. This is fixed in svn. A way around for A18 is refraining to train batches of 10 ships :-) because finding room to spawn all of them at once may be rather difficult.

Note: See TracTickets for help on using tickets.