Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2035 closed defect (fixed)

OOM errors in Javascript force game to close

Reported by: scythetwirler Owned by:
Priority: Should Have Milestone: Alpha 14
Component: Core engine Keywords: oom javascript crash
Cc: Patch:

Description (last modified by leper)

Alpha 13: MP game, 2v4. Could be a duplicate of #1966.

ERROR: JavaScript error: simulation/components/ResourceGatherer.js line 131 out of memory
ERROR: Script message handler OnUpdate failed
ERROR: JavaScript error: simulation/components/Health.js line 178 out of memory
ERROR: Script message handler OnUpdate failed
ERROR: JavaScript error: simulation/components/GuiInterface.js line 1754 out of memory
ERROR: Error calling component script function ScriptCall
ERROR: JavaScript error: simulation/components/GuiInterface.js line 1754 out of memory
ERROR: Error calling component script function ScriptCall
ERROR: JavaScript error: gui/session/input.js line 297 TypeError: simState is undefined getActionInfo("setup-trade-route",2012)@gui/session/input.js:297 determineAction(876,672)@gui/session/input.js:495 updateCursorAndTooltip()@gui/session/input.js:61 onTick()@gui/session/session.js:259 __eventhandler56 (tick)([object Object])@sn tick:0
ERROR: JavaScript error: simulation/components/GuiInterface.js line 1754 out of memory
ERROR: Error calling component script function ScriptCall
ERROR: JavaScript error: gui/session/input.js line 297 TypeError: simState is undefined getActionInfo("gather",2012)@gui/session/input.js:297 determineAction(876,672)@gui/session/input.js:497 updateCursorAndTooltip()@gui/session/input.js:61 onTick()@gui/session/session.js:259 __eventhandler56 (tick)([object Object])@sn tick:0
ERROR: JavaScript error: simulation/components/ResourceGatherer.js line 135 out of memory
ERROR: Script message handler OnUpdate failed
ERROR: JavaScript error: out of memory

Attachments (3)

interestinglog.html (2.1 KB ) - added by scythetwirler 11 years ago.
mainlog.html.tar.7z (464.2 KB ) - added by scythetwirler 11 years ago.
commands.txt (443.8 KB ) - added by scythetwirler 11 years ago.

Download all attachments as: .zip

Change History (11)

by scythetwirler, 11 years ago

Attachment: interestinglog.html added

by scythetwirler, 11 years ago

Attachment: mainlog.html.tar.7z added

comment:1 by scythetwirler, 11 years ago

Description: modified (diff)

by scythetwirler, 11 years ago

Attachment: commands.txt added

comment:2 by scythetwirler, 11 years ago

Description: modified (diff)

comment:3 by leper, 11 years ago

Description: modified (diff)

comment:4 by ben, 11 years ago

In 13659:

Increases simulation script runtime to 32 MB to reduce OOM errors, refs #1436, #1966, #2035

comment:5 by historic_bruno, 11 years ago

I was able to reproduce the OOM errors in a 1v1 multiplayer match with 64-bit Ubuntu 12.04 client and Win 7 host. It occurred after some thousands of units had been created (not all at once, they fought and died). The Ubuntu client got the OOM error, but not the host.

I've bumped the sim runtime up to 32MB as a solution for A14, but I think we should also investigate why memory usage is increasing and how we can reduce it, or at least what the best limit is (maybe based on testing very long games on giant maps with 8 players).

Last edited 11 years ago by historic_bruno (previous) (diff)

comment:6 by historic_bruno, 11 years ago

And for what it's worth, the "salad bowl" cheat is very useful for testing large numbers of units without having to actually play the game for long :)

comment:7 by historic_bruno, 11 years ago

Resolution: fixed
Status: newclosed

I'm going to resolve these as fixed, but if you get more JS OOM errors, please reopen or create a new ticket and describe the game setup so we can adjust the limit (AIs, num players, map and size, player OSes, etc.)

comment:8 by leper, 11 years ago

In 13794:

Increase simulation script runtime size again. Refs #1436, #1966 and #2035.

Note: See TracTickets for help on using tickets.