[2.0.15] Crash "Error ParallelScenarioSaver.cpp:151: Saving scenario failed: bad allocation"

Place for things which are bugs but we have no idea how to solve them. Things related to hardware, libraries, strange setups, etc.
Keith69
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Oct 25, 2024 2:41 am
Contact:

[2.0.15] Crash "Error ParallelScenarioSaver.cpp:151: Saving scenario failed: bad allocation"

Post by Keith69 »

I don't think this crash was fixed in any new releases. It happened when I was tabbed off working on something else while factorio ran in the background. It crashed my entire video driver not just Factorio. It prompted me to open the attached file and post it on the forum.
Attachments
factorio-previous.log
(144.35 KiB) Downloaded 20 times
Loewchen
Global Moderator
Global Moderator
Posts: 9329
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [2.0.15] Crash "Error ParallelScenarioSaver.cpp:151: Saving scenario failed: bad allocation"

Post by Loewchen »

Looks like you genuinely ran out of memory at the moment of saving.
Keith69
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Oct 25, 2024 2:41 am
Contact:

Re: [2.0.15] Crash "Error ParallelScenarioSaver.cpp:151: Saving scenario failed: bad allocation"

Post by Keith69 »

I really don’t think I ran out of memory, I have 32 GB with 100 Gb swap. I have never ran out of memory doing anything. Even if I did, it should have been handled gracefully and not break stuff.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14403
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.15] Crash "Error ParallelScenarioSaver.cpp:151: Saving scenario failed: bad allocation"

Post by Rseding91 »

Factorio asks the operating system for memory and if it says "no" all we can do is abort what ever action we were going to do. In this case it did, but then it needed memory for something else which also failed and eventually something gives and the process crashes. I do not know of any way for a user-space process to crash your graphics drivers. Likely they also had an allocation fail which caused them to crash.
If you want to get ahold of me I'm almost always on Discord.
Keith69
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Oct 25, 2024 2:41 am
Contact:

Re: [2.0.15] Crash "Error ParallelScenarioSaver.cpp:151: Saving scenario failed: bad allocation"

Post by Keith69 »

I really dont think that is what happened because it would require me to have been using 132 gb of memory, which I was not.
khoek
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Nov 27, 2024 1:42 am
Contact:

Re: [2.0.15] Crash "Error ParallelScenarioSaver.cpp:151: Saving scenario failed: bad allocation"

Post by khoek »

Keith, not sure how much C++ programming experience you have so sorry if you already know this, but the exact text "bad allocation" was printed because part of the system standard library (not Factorio) threw an exception called `std::bad_alloc` (you can google this). The words "bad allocation" are returned by calling `e.what()` on the exception.

According to the C++ standard, `std::bad_alloc` is thrown when the standard library fails to allocate memory. It does this by asking the operating system for it. For some reason, on your computer the operating system refused; as you say, this could technically be for a reason other than running out of memory. But at any rate, at that point Factorio is out of luck.

Also, as one of the devs say, even though I'm sure you and I have both seen at various times games crash our graphics drivers, that's always always a bug in the graphics driver (and often they are actually associated with security vulnerabilities). Games can issue updates to work around those bugs, "fixing them", but it's always the driver author's fault.
Post Reply

Return to “1 / 0 magic”