Jump to content

Game crashes when saving (errno = 12)


carolus
 Share

Recommended Posts

Hello everyone,

When I save a match I've been playing for a while now, it crashes more often than not, and I lose my progress. I'll write the error message below, and I'll attach the logs. If anything else is needed, I will quickly reply.

Thanks to everyone in advance.

Much to our regret we must report the program has encountered an error.

Please let us know at https://trac.wildfiregames.com/ and attach the crashlog.txt and crashlog.dmp files.
You may find paths to these files at https://trac.wildfiregames.com/wiki/GameDataPaths

Details: unhandled exception (Access violation writing 0x0000002C)

Location: unknown:0 (?)

Call stack:

(error while dumping stack: No stack frames found)
errno = 12 (Not enough memory)
OS error = 0 (no error code was set)

 

mainlog.html system_info.txt userreport_hwdetect.txt crashlog.dmp crashlog.txt interestinglog.html

  • Like 2
Link to comment
Share on other sites

Based on system_info.txt, you're using Windows 10. Realize that the Windows version of 0ad can allocate a maximum of only 4 GB of RAM because it's a 32-bit process. The developers plan to improve that in the future by making a 64-bit build for Windows, probably for the alpha 27 release. But, for now, 0ad on Windows is limited to 4 GB.

Additional observations that contribute to the hypothesis that 0ad ran out of memory: the game went on for a long time, the problem was triggered by saving the game, and the errno was 12 (Not enough memory). I find that after about 40 minutes the game uses close to 4 GB of RAM. When you save the game then it doesn't buy you time. It actually consumes the maximum amount of RAM significantly earlier than otherwise.

You can test the hypothesis by using Task Manager to watch how much memory pyrogenesis has allocated at the point that it crashes. If it has close to 4 GB allocated just before it crashes then that confirms that it's crashing due to insufficient memory. If you avoid saving then you might have a bit more play time before it eventually crashes anyway.

If you install Linux, or buy a Mac, or Hackintosh a Mac, then 0ad can allocate almost all of the RAM that your computer has free, because it's a 64-bit process on those operating systems. The game should then run almost forever, as it is unlikely to run out of memory.

Note that mainlog.html appears to be a brief start and successful stop of the game. Realize that each time you start the game, mainlog.html is erased and started from scratch. It seems that you started the game after the crash but before retrieving mainlog.html.

Edited by Norse_Harold
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Hi Norse_Harold, thank you very much for your answer!

38 minutes ago, Norse_Harold said:

Realize that the Windows version of 0ad can allocate a maximum of only 4 GB of RAM because it's a 32-bit process. The developers plan to improve that in the future by making a 64-bit build for Windows, probably for the alpha 27 release.

I understand. Does this mean that I will have to wait for the alpha 27 release to be able to play this match again? Will I be able to open the .0adsave files of alpha 26 on the alpha 27 version?

38 minutes ago, Norse_Harold said:

When you save the game then it doesn't buy you time. It actually consumes the maximum amount of RAM significantly earlier than otherwise.

Thanks for letting me know! I actually did think that it bought me time and that's why I saved so often. So you recommend not saving this often?

38 minutes ago, Norse_Harold said:

Realize that each time you start the game, mainlog.html is erased and started from scratch. It seems that you started the game after the crash but before retrieving mainlog.html.

That is exactly right. I kept restarting the game after many crashes. Only recently I read on the website that you should immediately report a bug when 0 A.D. crashes. Is it an issue right now that the first mainlog.html has been erased?

Thanks a lot again!

Edited by carolus
Link to comment
Share on other sites

On 22/01/2024 at 10:39 AM, carolus said:

Does this mean that I will have to wait for the alpha 27 release to be able to play this match again? Will I be able to open the .0adsave files of alpha 26 on the alpha 27 version?

Save files are very unlikely to work from one version to another. I think they're even stored in separate folders so that they aren't visible to a different version of the game.

If you consider the save game very important then I advise installing Linux or running a Live Linux OS from the DVD or USB memory stick in order to load the save game. It will be a 64-bit process, and it will be able to allocate more than 4 GB of RAM.

On 22/01/2024 at 10:39 AM, carolus said:

So you recommend not saving this often?

Assuming that reaching the 4 GB limit for memory allocation is the problem, yes, I advise that you not save when 0ad uses close to the 4GB limit on Windows. How "close" to the limit will need to be determined through trial and error. If you save every 10 minutes then you can restore the game with however far back in time still works. You can keepo a watch on memory usage before you save each time and eventually determine how much memory usage is still safe for saving.

On 22/01/2024 at 10:39 AM, carolus said:

Is it an issue right now that the first mainlog.html has been erased?

Not really. We have a good guess about what the cause of the problem is. And, it is apparently reproducible, so you can post a mainlog.html file if/when it happens again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...