Constant memory-related crashes post-update

Issue Type (Required):

Crash - During Play

Issue Description (Required):

After the recent update the game is absolutely insufferable, borderline unplayable due to constant memory-related crashes. At some days I cannot complete a single expedition run without it crashing to desktop. I have 64GB of RAM half of which is free while game is running. My pagefile isn’t limited by size and there is enough space on its HDD. According to Windows’ performance monitor it doesn’t even utilize half of my VRAM either.

Then what’s going on? It was crashing quite often before update, but at least I could play 2-3 games normally earlier. How does it happen that each update makes it even worse, despite it never ever even was at a state of a proper release version, always reminding a beta version in terms of stabilty? Ain’t 3 years enough to fix it?

[PC] Do You Use Mods? (Optional):

Yes, and I’ve tried disabling them

Reproduction Rate (Required):

Often (<75%)

Platform (Required):

PC - Steam

[PC] Crash Report (Optional):

GUID: e2409dea-8046-4aab-a89d-ad512f907ad0
Log File: 
Info Type: 
-----------------------------------------------
[Engine Error]: Page allocator 'page_allocator' failed allocating 524288 bytes, total 2981167104, last error: `The paging file is too small for this operation to complete.
`, error code: 1455

Assertion failed `ptr` at `D:\a\d\e2af82edaa31c93c6098ffbd561125ed\b0be1561439953a6\stingray\runtime\foundation\memory\page_allocator_win.cpp:187` in function `stingray::PageAllocator::allocate_vmemory`

-----------------------------------------------
[Crash Link]:
crashify://e2409dea-8046-4aab-a89d-ad512f907ad0

I’ve went ahead and added another pagefile on another drive. It still keeps crashing, here is another error it throws:

GUID: ce5b31e5-9550-4b8f-964b-72b9dd1d651d
Log File: 
Info Type: 
-----------------------------------------------
[Engine Error]: Not enough memory reserved for heap 'lua_heap', reserved: 1073741824, required: 1075838976, size: 2097152

Assertion failed `size + commited <= heap->_reserved` at `D:\a\d\e2af82edaa31c93c6098ffbd561125ed\b0be1561439953a6\stingray\runtime\foundation\memory\heap_allocator.cpp:242` in function `stingray::HeapAllocator::add_area_cb`

-----------------------------------------------
[Crash Link]:
crashify://ce5b31e5-9550-4b8f-964b-72b9dd1d651d

Please ensure your ‘Virtual Memory’ in Windows is set to ‘Automatically Manage Paging File Size for All Drives’ by:

  1. Navigate to Control Panel > System and Security
  2. Select ‘System’
  3. Select ‘Advanced system settings’
  4. Under the ‘Advanced’ tab, select the ‘Settings’ button underneath ‘Performance’
  5. Select the ‘Advanced’ tab
  6. Select the ‘Change’ button underneath ‘Virtual memory’
  7. Ensure the ‘Automatically Manage Paging File Size for All Drives’ checkbox is marked
  8. Restart your PC

Hi, @FatsharkJulia

Thank you for reaching back to me. I can’t set it for all drives, as I only have page file on two of them - I would like to keep it like that, as the rest of them are used for other tasks and I wouldn’t like them to be additionally stressed by paging. The two drives which are already used for paging have more than enough free space on them, so that shouldn’t be an issue. And for those two that setting already was set like you suggest.

After I added the 2nd drive (before that I only had paging file on my SSD system drive), I noticed the frequency of crashes went down significantly (no idea why, as the initial drive had enough free space for page file to grow, again). But they still happen sometimes, what I can’t really understand - how can it happen on a system with about 35-40GB of free RAM at the moment when I launch the game, and with two pagefiles with plenty of disk space for them to grow? It doesn’t seem like it just consumes all that RAM/space too.

@FatsharkJulia, I’m pretty sure this is lua_heap related, not windows page file related. DT by default allocates 1GB of memory to the lua heap. If you play with enough mods this can be exhausted. Allocating 2 GB seems to fix the issue for players with this error.

Here’s a link describing how to increase the allocation to 2 GB. Out of memory due to heap size - #3 by Gideon404

Also, keep in mind that after 1.11 it is impossible to allocate more than 2GB, as game don’t start and crashes with the error message (prior to 1.11 it was OK to allocate i.e. 4GB)

My bad, I seem to have only looked at the 1st crash :face_with_peeking_eye:

Yes, previously I had 4096mb set for lua heap, and I believe those crashes were much more infrequent. Now it only allows you to have 2048, I can’t even set it to the previous value.

And btw, it still keeps crushing with the 1st kind of errors too, despite me having now 2 pagefiles on different drives. Though it feels like it now happens less frequently.

@FatsharkJulia My bad too, I did the same thing you did but I focused on the second error listed…

How large are the page files currently?

I can only see it displaying the total size and it’s 22GB right now, with the game running. On both drives there is also free space of 70GB in total, and both pagefiles are set to “System managed”.

That should be more than enough.

After you made the page file changes, what does the error look like now? Mainly interested in the number of bytes, is it still something near 2981167104 (~3GB)? or is it showing something similar to 22000000000 (~22 GB)

Having them a lot today, can’t play for a hour without game crashing with OOM error.

GUID: 4a6fc776-923a-4a0f-859a-ce50c483e69f
Log File: 
Info Type: 
-----------------------------------------------
[Engine Error]: Page allocator 'render_page_allocator' failed allocating 1310720 bytes, total 1014693888, last error: `The paging file is too small for this operation to complete.
`, error code: 1455

Assertion failed `ptr` at `D:\a\d\e2af82edaa31c93c6098ffbd561125ed\b0be1561439953a6\stingray\runtime\foundation\memory\page_allocator_win.cpp:187` in function `stingray::PageAllocator::allocate_vmemory`

-----------------------------------------------
[Crash Link]:
crashify://4a6fc776-923a-4a0f-859a-ce50c483e69f

I don’t know what this string starting with “D:\a\d..” letters refers to in the error message above, but it looks a bit like a path to a file on disk? Just for the record, I don’t have pagefile on disk D: in Windows, they are on drives C: and E: only

What are your system specs, and have you made manual edits to the config file?

Also don’t worry about the D:\ stuff, that’s just for debugging and isn’t referencing files on your computer.

Would you be willing to experiment with the ‘Automatically Manage Paging File Size for All Drives’ option for troubleshooting purposes? I’d be curious to know whether the same crashes persist with this enabled.