Feb. 10 trunk build eating memory?

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Keeper
---- E L I T E ----
---- E L I T E ----
Posts: 273
Joined: Fri Feb 01, 2013 7:44 am
Location: Indian Hills, Nevada, USA

Feb. 10 trunk build eating memory?

Post by Keeper »

Unless I cut my list of OXPs down by about 25 or 30 percent, tonight's Windows build (1.79.0.5613-140210-098d187 (x86-64 test release)) will not start for me. It churns away for about five minutes then crashes to desktop. The log has a long list of which this is just an excerpt:

Code: Select all

00:31:29.019 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Trader AI 1.79): out of memory
00:31:29.019 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-traderAI.js, line 108.
00:31:45.114 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Escort AI 1.79): out of memory
00:31:45.114 [script.javaScript.error.outOfMemory]:       Resources/Scripts/oolite-priorityai.js, line 42.
00:31:45.845 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Escort AI 1.79): out of memory
00:31:45.845 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-escortAI.js, line 46.
00:31:45.945 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Pirate AI 1.79): out of memory
00:31:45.946 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-pirateAI.js, line 43.
00:31:46.044 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Escort AI 1.79): out of memory
00:31:46.044 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-escortAI.js, line 39.
00:31:46.147 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Pirate AI 1.79): out of memory
00:31:46.148 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-pirateAI.js, line 73.
00:31:46.247 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Escort AI 1.79): out of memory
00:31:46.247 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-escortAI.js, line 39.
00:31:46.364 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Pirate AI 1.79): out of memory
00:31:46.364 [script.javaScript.error.outOfMemory]:       Resources/Scripts/oolite-priorityai.js, line 5886.
00:31:46.463 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Escort AI 1.79): out of memory
00:31:46.463 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-escortAI.js, line 39.
00:31:46.594 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Pirate AI 1.79): out of memory
00:31:46.595 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-pirateAI.js, line 129.
00:31:46.696 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Escort AI 1.79): out of memory
00:31:46.696 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-escortAI.js, line 39.
00:31:46.851 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Trader AI 1.79): out of memory
00:31:46.851 [script.javaScript.error.outOfMemory]:       Resources/Scripts/oolite-priorityai.js, line 280.
00:31:46.968 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Escort AI 1.79): out of memory
00:31:46.968 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-escortAI.js, line 38.
00:31:47.067 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Escort AI 1.79): out of memory
00:31:47.067 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-escortAI.js, line 47.
00:31:47.168 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Pirate AI 1.79): out of memory
00:31:47.168 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-pirateAI.js, line 43.
00:31:47.268 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Escort AI 1.79): out of memory
00:31:47.268 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-escortAI.js, line 39.
00:31:47.383 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Pirate AI 1.79): out of memory
00:31:47.383 [script.javaScript.error.outOfMemory]:       Resources/Scripts/oolite-priorityai.js, line 46.
00:31:47.499 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Escort AI 1.79): out of memory
00:31:47.499 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-escortAI.js, line 73.
00:31:47.632 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Escort AI 1.79): out of memory
00:31:47.633 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-escortAI.js, line 38.
00:31:47.840 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Pirate AI 1.79): out of memory
00:31:47.840 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-pirateAI.js, line 43.
00:31:47.955 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Escort AI 1.79): out of memory
00:31:47.956 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-escortAI.js, line 46.
00:31:48.088 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Escort AI 1.79): out of memory
00:31:48.089 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-escortAI.js, line 38.
00:31:48.222 [script.javaScript.error.outOfMemory]: ***** JavaScript error (oolite-default-ship-script): out of memory
00:31:48.222 [script.javaScript.error.outOfMemory]:       Resources/Scripts/oolite-default-ship-script.js, line 119.
00:31:48.222 [script.javaScript.load.failed]: ***** Error loading JavaScript script Resources/Scripts/oolite-default-ship-script.js -- could not run script
00:31:48.394 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Pirate AI 1.79): out of memory
00:31:48.394 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-pirateAI.js, line 48.
00:31:48.882 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Pirate AI 1.79): out of memory
00:31:48.882 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-pirateAI.js, line 61.
00:31:49.033 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Escort AI 1.79): out of memory
00:31:49.033 [script.javaScript.error.outOfMemory]:       Resources/Scripts/oolite-priorityai.js, line 46.
00:31:49.167 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Pirate AI 1.79): out of memory
00:31:49.167 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-pirateAI.js, line 61.
00:31:49.283 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Pirate AI 1.79): out of memory
00:31:49.283 [script.javaScript.error.outOfMemory]:       Resources/Scripts/oolite-priorityai.js, line 5809.
00:31:49.700 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Oolite Trader AI): out of memory
00:31:49.700 [script.javaScript.error.outOfMemory]:       Resources/AIs/oolite-traderAI.js, line 109.
00:31:49.700 [script.javaScript.load.failed]: ***** Error loading JavaScript script Resources/AIs/oolite-traderAI.js -- could not run script
It will start if I significantly reduce the number of OXPs installed. The number of OXPs installed has not changed since the last build I ran, however (which was from mid or late last week).

My system has 4GB of RAM.

Tomorrow I will try selectively installing OXPs to make sure it isn't a particular OXP causing it. I have been re-installing about 10 at a time until it crashed again, so if it is a particular one that the latest build doesn't like, it won't take long to find it. But I should have been in bed 45 minutes ago, so I can't keep experimenting with it now.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Re: Feb. 10 trunk build eating memory?

Post by another_commander »

Do you still have the earlier build around? Can you try first one then immediately the other to confirm that one crashes and the other doesn't under the same conditions? What is the memory usage before starting up the game?

Also, assuming that you have the previous build and it runs, how much memory does it use when running all OXPs?

Edit: And just to exclude some obvious possibilities:
- How many OXPs are we talking about? A full log uploaded somewhere for review might be helpful.
- Can you confirm that there is enough disk space available? From the description of the problem it looks as if it starts using the swap file (which is understandable in case of 4GB of memory with lots of OXPs) and dies while accessing it.
- Would it be possible to post a screen of Task Manager's Performance tab while Oolite is starting up?

Please do continue trying to isolate a potential OXP causing this. For the record, I've run a few quick test runs and to me it looks like the memory usage patterns are similar to what we had before. But I use just a few OXPs (about 15-16) and that probably makes things a bit different.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Feb. 10 trunk build eating memory?

Post by cim »

The Javascript virtual machine within Oolite does not have access to all your system memory. In 1.77 or later it gets 32Mb to use, which is normally considerably more than is necessary, but a heavy OXP could easily use all of it either through unoptimised programming or expensive requirements, and of course the JS AIs do increase the baseline requirements.
User avatar
Keeper
---- E L I T E ----
---- E L I T E ----
Posts: 273
Joined: Fri Feb 01, 2013 7:44 am
Location: Indian Hills, Nevada, USA

Re: Feb. 10 trunk build eating memory?

Post by Keeper »

Back from work now. I don't have the previous version anymore as the batch script I run to update the trunk build overwrites it, but I see from a screenshot I took with it yesterday that it was 1.79.0.5593-140204-a54c729. It was from just a few days ago -- just before the sharp shadow edges on planets were eliminated, I think, judging from the timing of forum posts about that. If someone has the exe of that build lying around, I can test it again to make sure nothing weird has happened with my computer.

For now, I'll continue installing a few OXPs at a time and see when it fails. It failed with 100 OXPs last night. (Gosh do I really have that many now? OK, many are individual Griff ships ... .) Still, it's no more OXPs than I had with the previous build, so it's weird that this build can't get close to the number I was running previously.
User avatar
Keeper
---- E L I T E ----
---- E L I T E ----
Posts: 273
Joined: Fri Feb 01, 2013 7:44 am
Location: Indian Hills, Nevada, USA

Re: Feb. 10 trunk build eating memory?

Post by Keeper »

Interesting. Got it to load with a few more OXPs, but with errors:

Code: Select all

16:16:39.467 [script.javaScript.error.outOfMemory]: ***** JavaScript error (Ship_Storage_Helper.js 0.20): out of memory
16:16:39.467 [script.javaScript.error.outOfMemory]:       ../AddOns/Ship_Storage_Helper_0.20_2012.06.24.oxp/Scripts/Ship_Storage_Helper.js, line 41.
16:16:45.868 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (oolite-populator 1.79): TypeError: extras is null
16:16:45.868 [script.javaScript.exception.unexpectedType]:       Resources/Scripts/oolite-populator.js, line 1904.
User avatar
Keeper
---- E L I T E ----
---- E L I T E ----
Posts: 273
Joined: Fri Feb 01, 2013 7:44 am
Location: Indian Hills, Nevada, USA

Re: Feb. 10 trunk build eating memory?

Post by Keeper »

It's looking like that old Ship Storage Helper might be the culprit... I suppose it isn't needed anymore as it was for trunk of a couple years ago...?

I'm still adding more a little at a time...
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Feb. 10 trunk build eating memory?

Post by Norby »

Please update Ship Storage Helper to v0.21, this need much less memory with Oolite 1.79. In 1.77 there is no better solution than reducing the number of iterations in Ship_Storage_Helper.js if you have many ships installed.
User avatar
Keeper
---- E L I T E ----
---- E L I T E ----
Posts: 273
Joined: Fri Feb 01, 2013 7:44 am
Location: Indian Hills, Nevada, USA

Re: Feb. 10 trunk build eating memory?

Post by Keeper »

Yep, it was Ship Storage Helper that was the problem. I must have missed that update, Norby. Everything is working now, even with the new version installed. The error with the Oolite Populator isn't coming up either; I thought that was unrelated, but apparently not...?

Phew! Crisis averted. For a moment, I was worried that I might have to give up Oolite again. I had stopped for nearly a year because there were too many OXPs that I liked but my dinosaur desktop couldn't handle it. Then I inherited my mother-in-law's "old" laptop a few months ago and can play Oolite on it! (Not that I actually play very often; I'm always tweaking stuff! Many of the OXPs I do have installed have had new textures or shaders added to make them more appealing to me -- what spara calls "facelifts", only specific to my installation because I call all sorts of other bits and bobs from OXPs I have installed. Or other things like modifying the sounds in BGS, e.g. replacing the computer voice's "ortopilot" with "autopilot" by clever mixing of sounds from other bits... skills developed making more variations to a set of "real-life" pace notes for Richard Burns Rally back in the day!)

One of these days I'll take the plunge and build myself a new gaming desktop. I might end up spending all my time with the new racing sims though!
Post Reply