Cataclysm-dda: The game won't launch on a 1GB RAM system

Created on 5 Nov 2016  路  10Comments  路  Source: CleverRaven/Cataclysm-DDA

After double-clicking at cataclysm-tiles.exe, a white blank window appears. About half a minute has past, it is still pure white. Then, suddenly, the process disappears.
2016-11-05 7 41 49

I traced it under GDB:
2016-11-05 8 34 56

On MSDN documentation (here) exception code 0xc0000017 seems to represent something like _out of memory_.

| 0xC0000017 |
|-|
| STATUS_NO_MEMORY |
| {Not Enough Quota} Not enough virtual memory or paging file quota is available to complete the specified operation. |


So the reason is that when loading the default tileset ChestHole, there's no enough memory, while retrodays10 works fine. But the problem is, for a fresh unzipped CDDA, there's no way to avoid the program to load ChestHole unless manually copy options.json from another computer.

Performance Info / User Interface Tiles / Sound

Most helpful comment

To avoid crashes like this, we should have something that prevents tileset loading until a game is loaded, or have some way of detecting out of memory errors. I think the tileset loading process has some functions that could notify about errors better. Separately, the texture duplication used for color filters could have an option to disable them for lower RAM systems. The texture memory usage could be lowered by using an openGL implementation with shaders, but compatibility could be an issue there.

All 10 comments

If you manually set the tileset in options.json to retrodays10 or retrodays20, does it load? Is there anything in debug.log?

debug.log is totally blank: 0KB

The game loads a tileset before the title screen appears, and the tileset memory usage will vary depending on the file size. My computer reports 200 MB RAM in use at the title screen using the smallest tileset, RetroASCII, and 600 MB RAM with ChestHole isometric. The wait before the program crashes is probably the memory manager trying to reserve memory and eventually running out.

retrodays10 loads fine.

To avoid crashes like this, we should have something that prevents tileset loading until a game is loaded, or have some way of detecting out of memory errors. I think the tileset loading process has some functions that could notify about errors better. Separately, the texture duplication used for color filters could have an option to disable them for lower RAM systems. The texture memory usage could be lowered by using an openGL implementation with shaders, but compatibility could be an issue there.

I started a branch to delay texture loading and show a progress bar about it but my knowledge of SDL/OpenGL/Graphics is too poor to complete it :( .

This is somewhat related to #16268.

@BrettDong This was recently (b192f47b1c138d79076fe54f3cffdea7d88e09d6) changed. The tileset is now loaded after the game data (the world) has been loaded, not upon game start.

Does the crash still happen?

Sorry, I am unable to test it easily now because the VM I was encountering the issue was two years ago and I鈥檝e deleted it long time ago.

@BrettDong https://github.com/BrettDong This was recently (b192f47 https://github.com/CleverRaven/Cataclysm-DDA/commit/b192f47b1c138d79076fe54f3cffdea7d88e09d6) changed. The tileset is now loaded after the game data (the world) has been loaded, not upon game start.

Does the crash still happen?

My system has 1 GB RAM, and the game is starting without problems. I'm closing this now, if this problem is still an issue, ping me.

Was this page helpful?
0 / 5 - 0 ratings