Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Massive Memory Leak

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

Moderators: winston, another_commander, Getafix

Post Reply
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Massive Memory Leak

Post by Screet »

Hi,

I'm not sure where this comes from. Everytime I get the first Thargoid fight from Cataclysm, the ships are invisible (shader bug). I then resize the window by a few pixels - this re-initializes the textures.

The Thargoids become visible again. The framerate drops to 5fps and the game begins to massively leak memory. Within a few seconds, Oolite comes from 700megs to 1.2 gigs - and then crashes out of memory.

Happened three times in a row, not much fun.

EDIT: Continues to be this way. The game even does leak the memory when I pause it! Wish that autosave would work when the player is force-launched.

Screet
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

That's a bit worrying.

Which version of Oolite are you using? 1.72.2 or trunk?
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Kaks wrote:
That's a bit worrying.

Which version of Oolite are you using? 1.72.2 or trunk?
1.72.2

After several more attempts, I was fed up. Filled my cargo hold nicely, including several hundred units of gold, platinum and gems, just to be force-launched without autosave and have the game crash :(

Noticed that my idea to reset the textures is the only thing necessary.

Simply reproduceable bug: Launch, resize, hit pause and watch the memory leak away until a few seconds later the memory is exhausted and the game crashes :shock:

Screet
User avatar
Ark
---- E L I T E ----
---- E L I T E ----
Posts: 664
Joined: Sun Dec 09, 2007 8:22 am
Location: Athens Greece

Post by Ark »

It would be nice if the dev team had a report for the amount of objects and collisions during that "memory leak"
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Ark wrote:
It would be nice if the dev team had a report for the amount of objects and collisions during that "memory leak"
Not necessary.

To reproduce: Install a fresh 1.72.2, select Jameson, launch, resize...

Of course you can also do it with all those oxp's installed. Doesn't make a change ;)

Screet
P.S.: Nurse Hesperus, Nurse Hesperus! Have a look at Kaks and Ark, they appear to be shocked! ;)
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6574
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

I cannot reproduce a leak with a fresh Jameson as you describe. However, resizing the window does not work correctly in the released versions under Windows and can lead to texture memory corruption with all accompanying and unpredictable side effects. This is a long, long standing bug, which was fixed by Kaks on the 1.73 trunk just a few days ago. Although I have not tested it with Cataclysm, I would expect that resizing will work as expected on the next release.
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

another_commander wrote:
I cannot reproduce a leak with a fresh Jameson as you describe. However, resizing the window does not work correctly in the released versions under Windows and can lead to texture memory corruption with all accompanying and unpredictable side effects. This is a long, long standing bug, which was fixed by Kaks on the 1.73 trunk just a few days ago. Although I have not tested it with Cataclysm, I would expect that resizing will work as expected on the next release.
Now that's strange.

Behaviour under Windows XP X64:
1) ATI Driver crashes upon load of Oolite, but recovers
2) Oolite runs with less than half the memory it used under Vista?!?
3) Upon resize, the game instantly quits.

Now going to test with XP 32.

Screet
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Behaviour under XP 32:

1st launch: Oolite freezes.
2nd launch: Everything's well. Very low memory usage and NO LEAK upon resizing, the game just instantly resizes and continues to run.

The nebulae-bug from ATI's wrong OpenGL implementation is visible, as expected.

Screet
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Ugh! It might well be another side effect from those dodgy ATI drivers & the way SDL/OpenGL works. The next iteration of SDL (one of the cross platform libraries used by Oolite) should cope much better with some of windows quirks, but at the moment, there isn't really much we can do. (apart from trying to work outside SDL for screen resizes, like I ended up doing in trunk).

Btw, I'm not surprised about the memory difference. A number of video drivers were instantly broken by the new 'rock solid' device model introduced by Vista. There was a fair amount of wailing & gnashing of teeth from a very naive early adopter friend of mine. That was 2 years ago, and I still hear the occasional wailing from time to time... Me, I'm going to stick with XP for personal use until windows 7 sp1!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Kaks wrote:
Ugh! It might well be another side effect from those dodgy ATI drivers & the way SDL/OpenGL works. The next iteration of SDL (one of the cross platform libraries used by Oolite) should cope much better with some of windows quirks, but at the moment, there isn't really much we can do. (apart from trying to work outside SDL for screen resizes, like I ended up doing in trunk).
OK, I made a final test, just to be sure - I ran Vista with UAC turned off. No change.

There is another interesting observation, though:

Resizing the window while oolite displays it's ships does not cause a continuous memory leak! That only happens after launching from a station.

Anyway, OpenGL acceleration for ATI 4870x2 is broken. The card performs slower than a X800XTPE (which also does not perform as it should) and MUCH slower than a NVidia Go 7950. No wonder they banned me from their forum and censored my reports.

ATI and Asus have been notified and given all the interesting details, including my system specs. Nothing came back yet.

The vendor of the card said they would accept that I return it as defective (it's not having advertised properties, that's illegal!) and allow me to switch to a nVidia GTX 295. If I don't get a good response from ATI/Asus, that's the way I go next week. At least I now do understand the slogan "nVidia, the way it's meant to be played"...

Screet
User avatar
captain122
Above Average
Above Average
Posts: 19
Joined: Sun Sep 28, 2008 12:46 pm
Location: You really don't need to know that

Post by captain122 »

I am running Vista currently, and I am unable to reproduce this bug. I launch from station, resize window, pause, and watch my RAM meter, which does not show a change at all over 5 minutes.
Solas
Dangerous
Dangerous
Posts: 70
Joined: Sun Jan 04, 2009 7:26 am

Post by Solas »

I can spot no memory leak on Vista64.
Oolite memory usage does increase on each resizing approx 700kb.
memory usage will go up and down depending on screen size.
do a few resizes ending up at the size you started with.
strange but there it is.
used Process Explorer ..
http://technet.microsoft.com/en-us/sysi ... 96653.aspx
Process Explorer .. right-click on oolite.exe in 'Processes' ..
select Properties .. then Performance Graph.
Post Reply