Forum rules - please read before posting.

Large amount of save files cause crash in build

Hello!

I recently started to encounter consistent crashes in my build on Windows when either:

  • starting a new game or
  • saving a game several times in quick success.

After a lot of digging I found out that my save folder has 75MB of save data (screenshots included), which seems to be the cause.
Now, I've increased the allowed number of saves to 105 and also noticed that some saves are as big as 1,5MB or so.

This, for some reason, causes AC to start consuming A LOT of memory when accessing save files. While testing I noticed that the memory usage increased by more than 1GB, which to me seems like a memory leak.
See images below which show before and after saving the game.

Before save:

Right after save:

AC reads all save files every time a new game is started or a save is written or overwritten. Is that necessary?

Steps to reproduce the bug:
1. Allow 100+ save files via AC settings
2. Add lots of save files (should amount to 75MB of total data, like in my case)
3. Create a build and load a save
4. Save the game to the loaded game or any other. The memory consumption should go up
5. Repeat several times to get a crash

Comments

  • edited August 2023

    Thanks for the report, I'll look into it.

    What are your AC/Unity versions, and have you noticed this occuring in the Editor as well?

    Is the 1.5Mb per-save including the screenshot texture? The filesizes involved do sound quite large - if you can PM me a sample save file + screenshot, it'll help understand the situation.

  • I'm using Unity version 2021.3.7f1 and AC version 1.75.4.

    In the Editor those memory spikes also occur but not the crash. I've managed to bump up the Editor memory consumption by 15GB my saving the game over and over again.

    The actual save file is 1.5MB in size, the screenshot file is only about 400 - 700KB.

    Sure, I'll send you the files on DM!

    Thank you for looking into it.

  • No problem. Are you using Unity's Profiler to detect such spikes? If so, enable "Deep Profile", and drill down to show the origin. Share a screenshot and I'll try to decipher.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.