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]: on startup (out of memory, couldn't allocate ~~~ bytes) #12257

Closed
sheepdeets opened this issue Mar 10, 2024 · 5 comments
Closed

[Crash]: on startup (out of memory, couldn't allocate ~~~ bytes) #12257

sheepdeets opened this issue Mar 10, 2024 · 5 comments

Comments

@sheepdeets
Copy link

Version of OpenTTD

13.4 (0) Windows 11

Steps to reproduce

  1. Start the game from steam

Also I got the Out of memory message in the game the second time I booted up.
I don't have issues while playing the game.

This isn't an old computer (using Win11)

Upload crash files

crash20240310124203.zip

@TrueBrain
Copy link
Member

Would you mind trying 14.0-RC1, see if that works? If not, please do attach the json.log 14.0-RC1 will generate. Tnx.

@James103
Copy link
Contributor

Also, how much RAM does your computer have?

@TheMowgliMan

This comment was marked as off-topic.

@TrueBrain
Copy link
Member

Also, how much RAM does your computer have?

@James103: for your context, this kind of information is now in the crash logs since 14.0. Also the reason why I am asking for one, so we can actually see what kind of system it runs on. Also what GRFs are loaded, etc :)

Backtrace:

 	openttd.exe!raise(int signum=22) Line 547	C++
 	openttd.exe!abort() Line 71	C++
 	openttd.exe!error(const char * s=0x00007ff7f1930730, ...) Line 149	C++
 	openttd.exe!MallocError(unsigned __int64 size) Line 20	C++
 	[Inline Frame] openttd.exe!CallocT(unsigned __int64 num_elements=1937288) Line 95	C++
 	openttd.exe!Blitter_32bppAnim::PostResize() Line 536	C++
 	openttd.exe!VideoDriver_Win32Base::ClientSizeChanged(int w, int h, bool force) Line 916	C++
>	openttd.exe!VideoDriver_Win32OpenGL::Start(const std::vector<std::string,std::allocator<std::string>> & param={...}) Line 1350	C++
 	openttd.exe!DriverFactoryBase::SelectDriverImpl(const std::string & name, Driver::Type type=DT_VIDEO) Line 152	C++
 	openttd.exe!DriverFactoryBase::SelectDriver(const std::string & name={...}, Driver::Type type=DT_VIDEO) Line 96	C++
 	openttd.exe!openttd_main(int argc, char * * argv=0x000000ba6813fa50) Line 755	C++
 	openttd.exe!WinMain(HINSTANCE__ * hInstance=0x000000000000000a, HINSTANCE__ * hPrevInstance=0x0000000000000000, char * lpCmdLine=0x0000000000000000, int nCmdShow=-584646656) Line 416	C++

So on-start we already run out of memory, by just allocating the video-buffers. So yeah, very curious to see what 14.0 thinks about this :)

@TrueBrain
Copy link
Member

An out-of-memory error means exactly that: OpenTTD tried to allocate memory that wasn't available on your system. Mostly this is caused by having too little memory free to run the game. OpenTTD normally runs with ~100MB of RAM or so, but depending on what you have loaded this can increase. Especially when 32bpp sets are loaded, it can consume more than 1GB of RAM. And when playing a 4k x 4k map, that can boom to ~2GB or so.

Mostly what we see is that users also have software like Chrome active, with many many many open tabs, which drain their available memory. So if this error persists, my suggestion would be to check how much free memory is available, and see what hogs the memory the most. It is not likely to be OpenTTD, at least, we see no evidence of it using an absurd amount of memory.

If you still have this problem, please get back to us with a crash.json.log from 14.0 :)

Hope this helps!

@TrueBrain TrueBrain closed this as not planned Won't fix, can't repro, duplicate, stale Mar 16, 2024
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