Ticket #875 (closed defect: fixed)
Out of memory errors should work nicer
| Reported by: | k776 | Owned by: | historic_bruno |
|---|---|---|---|
| Priority: | Should Have | Milestone: | Alpha 6 |
| Component: | Core engine | Keywords: | scripting,spidermonkey |
| Cc: |
Description
See http://www.wildfiregames.com/forum/index.php?showtopic=14859
We should show them a warning in game about out of memory, not just in the logs.
Change History
Note: See
TracTickets for help on using
tickets.

I agree Spidermonkey OOM errors should be handled better (see #742), but it's actually more complicated than it sounds. The normal way of handling SM errors won't work because OOM errors are designed not to halt the script but to let it keep running. I don't see that being solved for A6 and maybe should wait for SM to be upgraded anyway before we mess too much with its internals.
In the short term, we should ensure OOM errors don't occur in normal operation, probably by increasing the script runtime size for the map generator from 96MB to whatever is enough to make it work (although even the simulation scripts will give OOM errors when there's too many trees, for instance).