No specific user action causes the crash. OpenTTD crashes after between 5 and 20 minutes, more or less at random.
Laptop is a Lenovo T14s, i7-10510U with 16GB of RAM running Windows 11 21H2. Other browsers and productivity apps open, RAM usage at 90%. Windows should be paging out RAM to the swap file, I think, but maybe OpenTTD isn't being patient enough?
There's nothing we can do about the operating system (Windows) not being able to allocate memory for the process. If your system doesn't have free memory then it doesn't have free memory, and all bets are off.
Can you check in Task Manager, on the Performance tab, what the numbers for Committed say? It should be two figures, for me it right now reads 14.4/36.7 GB.
That's the current total memory allocation and the total memory available for Windows to allocate. The second figure is basically your RAM size + paging file size. If the first figure is too close to the second, you need to allocate a larger paging file, buy more RAM, or do something to free up memory.
But "being patient" isn't a question. When a program requests a memory allocation from Windows, and Windows has to swap things around to/from the paging file, it automatically pauses execution while doing the swapping. It's not something that can time out like that.
Thanks for the detailed reply. Committed is 14.4/49.3 GB. I sometimes notice performance issues when RAM utilization nears 90%, but other applications seem to just slow down, not crash. Is there a way to give the OpenTTD process RAM priority?
I typically have a lot of other processes running -- browsers, some productivity/office apps, and the normal host of background processes that seem to crop up in Windows. From a fresh boot I get Committed 7.4/49.5, and after launching OpenTTD it settles at 8.1/49.5 with utilization around 50%.
OpenTTD doesn't crash until RAM utilization gets to ~90% and Committed is around 15/49.
I had weird issue that might be connected to this. I run a server game, with just one user connected to it via network. When I logged off and let my friend continue to play, at about 2AM in the morning I saw there are dozens of OpenTTD processes runing, eating up all memory (I have 64Gigs) and crashing the whole PC. No idea what launched them and why. Windows 10, OpenTTD 12, JGR patch. Just in case it help you pinpoint the problem.