forum

[resolved] [confirmed] Marathon maps use too much memory and can crash the game

posted
Total Posts
23
Topic Starter
Full Tablet
Testing "Within Temptation - The Unforgiving" and "LQGR - OMG"

https://osu.ppy.sh/b/156352
https://osu.ppy.sh/b/48534
Monitoring done with Perfmon (included in Windows 7). The green line is Virtual Memory of osu!.exe, and the blue line is Private Memory of the osu!.exe process. Each vertical mark is 100MB of memory.

1) After just starting osu!, it stays at about 350MB of Private Memory during the main menu, it jumps to about 500MB on the song selection screen. I apply auto mod, and start The Unforgiving: memory immediately increases to about 900MB, and it keeps increasing until the game crashes (there is no error screen, the screen and the process just disappear almost instantly).
2) I start the game again, and play the map (without Auto mod this time). The situation is very similar, but memory is at about 1000MB when starting the map instead of 900MB. The game crashes.
3) I start the game again, apply auto mod and start LQGR - OMG [Binary]. RAM use doesn't increase as much as the other map when just starting the map (probably because it doesn't have a custom skin, video nor storyboard), but RAM increases much more quickly than in the other map (it doesn't crash though); this is a map that has thousands of circles at a time in the screen, this might be a contributing factor. After the map is over, Private Memory is at about 750MB in the song selection screen and the main menu (it was about 600MB in the results screen).

Testing https://osu.ppy.sh/b/104016&m=0 (Unfinished Marathon Map)

In this case, RAM is about 650MB when just starting the map, and it increases gradually while playing the map with Auto mod. Notably, memory use doesn't increase in unmapped parts (long breaks in the map), it only seems to increase while playing notes or just a few seconds before the end of each break. The song keeps playing until it crashes again.
TheVileOne
This is to be expected. Every song adds a bit to memory usage. Marathons add more to the usage more quickly. peppy is blaming the .net framework for Beatmap selection leaks. This might fall under the same problem.
Topic Starter
Full Tablet
The crashes have been happening frequently in the last few days (probably because the amount of beatmaps I have has increased considerably, increasing the base amount of RAM used while not playing a map).

Edit: I have been able to replicate this in game folders with only 1 map. Having a lot of maps still makes this more troublesome since osu! uses more memory that way.
Topic Starter
Full Tablet
More information about this issue in this thread: http://osu.ppy.sh/forum/t/159330&start=0

Is there any reason the /LARGEADDRESSAWARE flag isn't set for osu!.exe? (http://maheshkumar.wordpress.com/2012/0 ... en-to-use/).

I find it troublesome having to pause the game in the middle of marathon maps to avoid crashing the client (since garbage collection is done when you pause the game, it is never done in mid-game to avoid lag spikes), specially since when I am focused in the map it is more likely I will forget to pause.

Also there is the issue that the beatmap database gets corrupted periodically because of this, it takes about 2 hours to re-import the local records and replays when they fail to be re-imported automatically. This seems to delete collections too (though I don't use collections).

I have set the /LARGEADDRESSAWARE flag to a copy of osu!.exe to play, and so far I haven't seen any issue with it, except that it doesn't connect to bancho (since the .exe file was modified).

What does peppy have to say about this?

Edit: I managed to get the modified osu!.exe (modified from the current version, with /LARGEADDRESSAWARE flag) to use more than 4GB Virtual Memory by watching one of my replays of The Unforgiving. With the osu!.exe from October this never happened (probably the newer client uses more memory).
TheVileOne
Moving out of resolved. I will stick to get a response about this issue. I don't want to confirm, because I'm sure it doesn't happen to me.
Topic Starter
Full Tablet
I noticed that the memory use increase can be reduced considerably by using cursor-middle and skinning out the cursor trail (by replacing it with a big transparent image, using a single pixel image actually increases memory use). This seems to reduce the amount of sprites drawn on the screen, reducing the amount of garbage generated while playing.

With this, the limit of 2GB of memory was reached about 3/4 though the Unforgiving. Considerably better than reaching 4GB halfway though the song while using a 9-pixel cursor trail
peppy
What frame limiter are you running? Also, garbage collection is never disabled (only put in low-latency mode). Try updating your .net framework to see if it helps.
Topic Starter
Full Tablet
I was using Unlimited frame limiter (that runs at 500-900 fps depending on the map). I tried with low-latency 60fps and 300fps custom frame limiter, but it is the same.

Also, because of the last crash (while using 60fps frame limiter), the osu!.<username>.cfg file seems to have got corrupted as well D: (that had never happened before).

I will try updating .net framework another day (can't reboot my PC now).
Topic Starter
Full Tablet
I installed .NET v4.5.1 upgrade and tested again. The game still crashes due to excessive Virtual Memory allocation it seems (the game crashed without any error report while watching in x2 speed WWW's replay of The Unforgiving, when it was about 7/8 though the song)


Also, the crash that corrupted the osu!.<username>.cgf file seems to have caused the deletion of the local replays in the Data/r/ folder:
- When I restarted the game after that crash, I noticed the configurations stored in that file weren't being applied. I closed the game and changed some of the settings in the file (that were restored to their default value).
- When I opened the game again, I noticed that the local records were still there, but they didn't have an option to watch the replay.
- Some days after, I tried to re-import the local replays, but the only replays that were in Data/r/ folder were recent plays (the other replays, that consisted of about 2 years of playing, were gone).
- Marco -

Full Tablet wrote:

(the other replays, that consisted of about 2 years of playing, were gone).
*hugs* :c
MillhioreF
Yes. Memory management wasn't always this bad - I can now no longer get through The Unforgiving. Each note adds a certain amount of memory that isn't properly garbage collected until the map ends or is restarted - on my computer, I crash with OutOfMemoryException without fail after around 6000-7000 combo on any one map. I was able to finish that map before, and it has 9000 combo, so there's definitely room for improvement.
higurush
I am just wondering if this topic: t/178948 could be considered a memory allocation problem as well. When I was importing (1104) maps at once (279 files), then played around 50-100 of the maps, the osu! just randomly shut down with no error msg when playing (described in more details in the topic). (I currently have 29667 maps).
That case seemed to make a similar behaviour oO
peppy
Does pausing gameplay help?
Topic Starter
Full Tablet

peppy wrote:

Does pausing gameplay help?
When you pause the game, memory use decreases.
Arnold0
bump.
p/2851051
Something should be done about this è.é
fuzzbucket
just happened to me playing senya - Songs Compilation

1. Tried to watch an Auto replay , but it got stuck on the loading cursor.
2. I hit X on the Osu! window at the top right to get back to the song selection menu.
3. Played the song normally, but osu! just closed halfway through the song.

Now my song db was corrupt and my configuration settings were not working.
A lot (but not all) of my Local ranks are gone.

Anyway to restore my Local ranks and my original settings?
higurush

fuzzbucket wrote:

Anyway to restore my Local ranks and my original settings?
try this: p/2806764/
also read through the topic. maybe you find something useful
Colored
BUMP

I have the same problem

I cant aim, when osu eats more than 450mb RAM. Im just must to restart osu client everytime to play normally :'((

btw, when i play in multiplayer, osu dont change to use more RAM. (sorry my poor eng)
just try to test in mp and play some songs, you will see...
Pilesos
Yes if you only have lets say 1 GB this can cause issues (from FPS drops to Game crashes).

I got 4 GB but ifyou have lots of stuff running in the background then you still might experience problems (Browser with 20 Tabs, Skype, Photoshop, Steam) .

Happened to me today.
peppy
Fixed in next release (test build too).
Topic Starter
Full Tablet
While the beatmap database doesn't seem to get corrupted when there is a crash associated with this issue anymore (the most annoying and damaging part of the problem), the game still crashes when virtual memory allocation gets too high (about 2GB).
MillhioreF
How do you get it that high? The Unforgiving peaks at ~700-800 MB for me, tops.
Topic Starter
Full Tablet

MillhioreF wrote:

How do you get it that high? The Unforgiving peaks at ~700-800 MB for me, tops.
I think it is mainly because of the amount of beat-maps I have:
Note: I am monitoring Virtual Memory use, not private memory of osu!.exe (which is usually about 0.5GB less than virtual).

Testing watching WWW's replay of the Unforgiving:
A) My current skin (with several elements skinned-out, no cursor trail), current beatmap database (over 70k maps). When the song started, virtual memory was about 1.5GB, it went up to ~1.85GB during the map, and then it crashed while loading the results screen (a error window that said "Unhandled Exception" appeared, and it closed itself before I could read it or screencap it).

B) Same as before, but with the default skin. When starting the song, memory is at 1.504GB, at the end of the song it was 1.953GB. At the results screen it went down to 1.521GB (it didn't crash that time). Watched the replay again, and that time memory use went up to 1.73GB, and 1.55GB at the results screen.

C) My current skin, with Unforgiving as only song, in a clean install folder. Virtual Memory goes from ~0.9GB to ~1.1GB.

D) Same as before, but with a cursortrail consisting of a 1 green pixel. Crash when Virtual Memory reached ~1.912GB halfway though the song
Please sign in to reply.

New reply