[1.1.41] Crash switching wires on power switch "this->powerSwitchConnectionID != WireConnectionID(-1) was not true"

This subforum contains all the issues which we already resolved.
Post Reply
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Aug 30, 2021 2:47 pm

[1.1.41] Crash switching wires on power switch "this->powerSwitchConnectionID != WireConnectionID(-1) was not true"

Post by Semenar »

First reported to the Space Exploration bug reports thread, got sent to the forums.

The following sequence of actions results in a crash to desktop in Space Exploration mod (https://mods.factorio.com/mod/space-exploration):
1. Start a new Sandbox save.
2. Place a power pole and a power switch close to each other.
3. Enter Navigation Satellite view.
4. Pick a red wire and connect power pole with a power switch using it. Start with the power pole.
5. Without doing anything else, pick a copper wire from crafting menu. At this step, the copper wire should be connected to the power switch.
6. Click on the power pole.

Here is how the result should look like:

Here is a log example:

Code: Select all

Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\xmemory0 (879): std::_Default_allocator_traits<std::allocator<ElectricPole::PowerSwitchConnection> >::construct<ElectricPole::PowerSwitchConnection,PowerSwitch * &,unsigned char &>
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\vector (962): std::vector<ElectricPole::PowerSwitchConnection,std::allocator<ElectricPole::PowerSwitchConnection> >::_Emplace_reallocate<PowerSwitch * &,unsigned char &>
c:\cygwin64\tmp\factorio-build-rzq52c\src\entity\powerswitch.cpp (401): PowerSwitch::connectPole
c:\cygwin64\tmp\factorio-build-rzq52c\src\controller\controller.cpp (648): Controller::tryConnectWire
c:\cygwin64\tmp\factorio-build-rzq52c\src\gameactionhandler.cpp (2868): GameActionHandler::tryToWireDrag
c:\cygwin64\tmp\factorio-build-rzq52c\src\gameactionhandler.cpp (2894): GameActionHandler::wireDragging
c:\cygwin64\tmp\factorio-build-rzq52c\src\gameactionhandler.cpp (369): GameActionHandler::actionPerformed
c:\cygwin64\tmp\factorio-build-rzq52c\src\input\inputhandler.cpp (61): InputHandler::flushActions
c:\cygwin64\tmp\factorio-build-rzq52c\src\gameactionhandler.cpp (411): GameActionHandler::update
c:\cygwin64\tmp\factorio-build-rzq52c\src\mainloop.cpp (1247): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-rzq52c\src\mainloop.cpp (1119): MainLoop::gameUpdateLoop
c:\cygwin64\tmp\factorio-build-rzq52c\src\util\workerthread.cpp (49): WorkerThread::loop
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\thr\xthread (230): std::_LaunchPad<std::unique_ptr<std::tuple<void (__cdecl WorkerThread::*)(void),WorkerThread *>,std::default_delete<std::tuple<void (__cdecl WorkerThread::*)(void),WorkerThread *> > > >::_Go
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\thr\xthread (209): std::_Pad::_Call_func
minkernel\crts\ucrt\src\appcrt\startup\thread.cpp (115): thread_start<unsigned int (__cdecl*)(void * __ptr64)>
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFCE1C57034)
00007FFCE1C57034 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFCE2D62651)
00007FFCE2D62651 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
 576.267 Error ElectricPole.cpp:1538: this->powerSwitchConnectionID != WireConnectionID(-1) was not true
The vanilla sandbox mode does not seem to exhibit this behaviour (specifically, at the stage 5, the copper wire does not start connected to the power switch).

Attached here are the save (with stages 1-2 completed; the rocket silo is used to unlock the Navigation Satellite view) and the log file.
Wire bug save.zip
(2.75 MiB) Downloaded 144 times
Log file
(51.58 KiB) Downloaded 144 times

User avatar
Factorio Staff
Factorio Staff
Posts: 1789
Joined: Thu Dec 14, 2017 6:56 pm

Re: [1.1.41] Crash switching wires on power switch "this->powerSwitchConnectionID != WireConnectionID(-1) was not true"

Post by boskid »

Thanks for the report. Issue is now fixed for 1.1.43

Post Reply

Return to “Resolved Problems and Bugs”