[2.0.55] Crash setting production in electric energy interface "ElectricNetwork.cpp:101: !std::isnan(demand.leftOver)"

This subforum contains all the issues which we already resolved.
Urumasi
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Jun 21, 2025 8:13 am
Contact:

[2.0.55] Crash setting production in electric energy interface "ElectricNetwork.cpp:101: !std::isnan(demand.leftOver)"

Post by Urumasi »

I was messing with the Electric energy interface in sandbox mode, I set the buffer size to a very large number (1e9999 which turned into infinity) which worked, but when I started typing 1e99... into the power production box, the game immediately crashed.
6wePeOu252.jpg
6wePeOu252.jpg (1.25 MiB) Viewed 991 times
I have attached game logs, they also contain me playing on a server beforehand.

Code: Select all

Factorio crashed. Generating symbolized stacktrace, please wait ...
C:\Users\build\AppData\Local\Temp\factorio-build-kBP7qd\src\Util\ReleaseAssert.cpp(7): ReleaseAssertFailed
C:\Users\build\AppData\Local\Temp\factorio-build-kBP7qd\src\Energy\ElectricNetwork.cpp(133): ElectricNetwork::update
C:\Users\build\AppData\Local\Temp\factorio-build-kBP7qd\src\Energy\ElectricNetworkManager.cpp(120): ElectricNetworkManager::update
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\functional(822): std::_Func_impl_no_alloc<``Map::createMultiThreadedUpdateRunner'::`2'::<lambda_1>::operator()'::`2'::<lambda_1>,void>::_Do_call
C:\Users\build\AppData\Local\Temp\factorio-build-kBP7qd\src\Util\WorkerThread.cpp(71): WorkerThread::loop
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\thread(56): std::thread::_Invoke<std::tuple<void (__cdecl SoundLibrary::AsyncLoader::*)(void),SoundLibrary::AsyncLoader *>,0,1>
minkernel\crts\ucrt\src\appcrt\startup\thread.cpp(97): thread_start<unsigned int (__cdecl*)(void *),1>
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFAD5777374)
00007FFAD5777374 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFAD74BCC91)
00007FFAD74BCC91 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
6974.949 Error ElectricNetwork.cpp:101: !std::isnan(demand.leftOver) was not true
6974.949 Error CrashHandler.cpp:643: Received 22
Logger::writeStacktrace skipped.
6974.949 Error CrashHandler.cpp:190: Map tick at moment of crash: 17991
6975.000 Info CrashHandler.cpp:318: Executable CRC: 1581257683
6975.000 Error Util.cpp:95: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.
Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.
7009.367 Uploading log file
7009.379 Error CrashHandler.cpp:270: Heap validation: success.
7009.380 Creating crash dump.
7009.703 CrashDump success
Attachments
eei-crash.log
Crash logs
(36.74 KiB) Downloaded 10 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 15791
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.55] Crash setting production in electric energy interface "ElectricNetwork.cpp:101: !std::isnan(demand.leftOver

Post by Rseding91 »

I think the fix for this will be limiting the electric energy interface values to some sane but large number.
If you want to get ahold of me I'm almost always on Discord.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4012
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.55] Crash setting production in electric energy interface "ElectricNetwork.cpp:101: !std::isnan(demand.leftOver

Post by boskid »

Starting from 2.0.58, electric energy interface will ignore all values that are not finite.
Post Reply

Return to “Resolved Problems and Bugs”