Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Crash]: Repeated Out Of Memory crashes #9706

Open
rob9283 opened this issue Nov 17, 2021 · 7 comments
Open

[Crash]: Repeated Out Of Memory crashes #9706

rob9283 opened this issue Nov 17, 2021 · 7 comments

Comments

@rob9283
Copy link

@rob9283 rob9283 commented Nov 17, 2021

Version of OpenTTD

12.1 (0), Windows 11 21H2

Steps to reproduce

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?

Upload crash files

OpenTTD.zip

@nielsmh
Copy link
Contributor

@nielsmh nielsmh commented Nov 17, 2021

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.

@rob9283
Copy link
Author

@rob9283 rob9283 commented Nov 17, 2021

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?

@James103
Copy link
Contributor

@James103 James103 commented Nov 17, 2021

What other processes are you also running on your computer at the same time as OpenTTD?
If you had other process running, can you please retry reproduction with the following steps?

  1. Completely shut down and restart your computer.
  2. Start OpenTTD.
  3. Open Task Manager.
  4. In Task Manager, go to the Performance tab, Memory section.
  5. Wait (and watch the memory indicators, especially Committed).

@rob9283
Copy link
Author

@rob9283 rob9283 commented Nov 19, 2021

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.

@James103
Copy link
Contributor

@James103 James103 commented Nov 19, 2021

Can you please try disabling all startup apps? To do so,

  1. Open Task Manager.
  2. Go to the Startup tab.
  3. Click on every enabled startup process and disable it.
  4. To confirm, completely shut down and restart your computer.

@rob9283
Copy link
Author

@rob9283 rob9283 commented Nov 19, 2021

Fresh boot with no startup apps comes to 3.9/49.5.

@RadekHavelka
Copy link

@RadekHavelka RadekHavelka commented Nov 23, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants