Opened 8 years ago

Closed 8 years ago

#3720 closed defect (needsinfo)

Error in Petra attackPlan.js

Reported by: zsolt Owned by:
Priority: Should Have Milestone:
Component: AI Keywords:
Cc: Patch:

Description

After reopening saved single user match: Gambia River, following Error occurs and slows down the game considerably.

From intresting.log: TypeError: this.queue is undefined

m.AttackPlan.prototype.trainMoreUnits@simulation/ai/petra/attackPlan.js:504:3 m.AttackPlan.prototype.updatePreparation@simulation/ai/petra/attackPlan.js:438:4 m.AttackManager.prototype.update@simulation/ai/petra/attackManager.js:137:8 m.HQ.prototype.update@simulation/ai/petra/headquarters.js:2057:3 m.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:123:3 m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:81:2</p>

<p class="error">ERROR: JavaScript error: simulation/ai/petra/attackPlan.js line 504 TypeError: this.queue is undefined

Attachments (3)

commands.txt (193.3 KB ) - added by zsolt 8 years ago.
commands.txt from saved game with error
savegame-0139.0adsave (1.7 MB ) - added by zsolt 8 years ago.
savegame-0138.0adsave (1.6 MB ) - added by zsolt 8 years ago.

Change History (15)

comment:1 by zsolt, 8 years ago

Forgot: It´s on Mac OS X 10.11.2 Game is Version: 0.0.19

comment:2 by elexis, 8 years ago

Can you also upload the replay (commands.txt)?

If you go to tools & options -> replays, select that game and press delete, it will show you the filepath (make sure not to press yes).

by zsolt, 8 years ago

Attachment: commands.txt added

commands.txt from saved game with error

in reply to:  2 comment:3 by zsolt, 8 years ago

Replying to elexis:

Can you also upload the replay (commands.txt)?

If you go to tools & options -> replays, select that game and press delete, it will show you the filepath (make sure not to press yes).

I just did.

comment:4 by zsolt, 8 years ago

Do you need the saved game too? To reproduce it?

comment:5 by elexis, 8 years ago

Component: Core engineAI
Keywords: petra removed

Nah, that should be fine, thank you :)

comment:6 by mimo, 8 years ago

Replay of saved games are useless for debugging. But if the errors happen just after reopening the game, are you sure it was saved with the same 0ad version ?

comment:7 by zsolt, 8 years ago

Hi thanks for your quick response. Though I upgraded to the recent version a few days ago I´ve played this match from the beginning with the new version. Till save and reopen it run flawlessly with ok fps and no errors. I can send you additional information if you need/want, like screen shots of the saved games and replay sets. Isn´t there a version stamp in the saved games set? If not, would be probably be a useful feature. Thanks for your effort developing this great game!

comment:8 by mimo, 8 years ago

And if you open the save game and do nothing (just let the AI play), does the error happen ? if yes, you can upload the saved game here and i'll have a look at it. Otherwise, there is not much we can do without a reproducible way to get this error.

by zsolt, 8 years ago

Attachment: savegame-0139.0adsave added

by zsolt, 8 years ago

Attachment: savegame-0138.0adsave added

in reply to:  8 comment:9 by zsolt, 8 years ago

Replying to mimo:

And if you open the save game and do nothing (just let the AI play), does the error happen ? if yes, you can upload the saved game here and i'll have a look at it. Otherwise, there is not much we can do without a reproducible way to get this error.

Yes, the error just starts right from the beginning. I´ve attached the most recent saved games. Hope thats the right files. Should be at least one of them.

comment:10 by mimo, 8 years ago

In 17592:

petra: use the proper attack number when deserializing, refs #3720

comment:11 by mimo, 8 years ago

The savedgame can not be used for understanding the problem, as it is already screwed up. Each petra attack should have its own training queue, which is not present in the savedgame. This should never happen, and we would need the commands.txt of the starting game to understand it. With r17592, if the queue is missing when deserializing, a new one will be created.

Last edited 8 years ago by mimo (previous) (diff)

comment:12 by mimo, 8 years ago

Milestone: Backlog
Resolution: needsinfo
Status: newclosed
Note: See TracTickets for help on using tickets.