Page 1 of 1
[Dominik][0.17.12][Mod] Crash on rotate again with underground pipes
Posted: Thu Mar 14, 2019 10:34 pm
by Staplergun
Alright, so new issue. This seems to be focused around (I'll try to explain it the best I can and give you a save with testable examples in place) underground connections that have a potential to...overlap on rotate.
I don't have a dump for you because the process ended itself without a bug report
So, take this below:
This is a L connector. When put in place the first time (Dropped where it connects the two pipes), the game works ok. When you rotate it once, the game works ok. Rotate it twice more and you get to this position above. Rotate it again and the game crashes so hard it doesn't even bug splat.
What it seems to be is, if pipe 1 is connected to pipe 2 via an underground connection, and you rotate pipe 1 into any position where another underground connection from pipe 1 will immediately take it's place pointed at pipe 2, the game crashes.
1.) Open the save attached to this post using the mod underground-pipe-pack from the original post.
2.) just above the start point to the left or somewhere near the spawn point should be the L bend pipe and the four way pipe already pre-made. Just rotate either one to test and narrow down the bug I speak of here.
This happens with the underground L, T, and X connectors.
I've tested the rest of everything such as the four to four pipe, and made this concoction:
That's 8 fluid box connections. That works great.
Also, I greatly appreciate making pumps and pipes (and really all fluid boxes) show their underground connections if they have them. That's amazing and I always wanted it.
Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes
Posted: Fri Mar 15, 2019 10:53 am
by Dominik
Wow that is a very detailed report, thanks! Will look into it.
Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes
Posted: Fri Mar 15, 2019 12:46 pm
by Dominik
Normal connections having any influence seems strange.
This is like a puzzle game on it's own.
@Staplergun - what exactly is behind that ctrl-r rotation? It seems like it is changing the prototype on the run. That sounds dangerous.
Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes
Posted: Fri Mar 15, 2019 12:51 pm
by Staplergun
It destroys the old entity and replaces it with a new entity. Oddly enough when that happens, then game doesn't crash in certain cases where you'd expect it to.
Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes
Posted: Fri Mar 15, 2019 1:39 pm
by Dominik
By the way this crash you are getting means it gets into an infinite loop.
Related load crash
67749
Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes
Posted: Sat Mar 16, 2019 5:00 am
by Recon777
Dominik wrote: ↑Fri Mar 15, 2019 10:53 am
Wow that is a very detailed report, thanks! Will look into it.
Very glad to help!
Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes
Posted: Mon Mar 18, 2019 11:18 pm
by Harag
Rotating this T-pipe crashes the game with the following stacktrace:
Code: Select all
0.001 2019-03-18 23:58:02; Factorio 0.17.15 (build 43864, win64, steam)
0.001 Operating system: Windows 10 (version 1803)
<snip>
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-z2hre9\libraries\stackwalker\stackwalker.cpp (924): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-build-z2hre9\src\util\logger.cpp (376): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-build-z2hre9\src\util\logger.cpp (527): Logger::logStacktrace
c:\cygwin64\tmp\factorio-build-z2hre9\src\util\logging.cpp (89): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-build-z2hre9\src\util\logging.cpp (83): Logging::logAndAbortOrThrow
c:\cygwin64\tmp\factorio-build-z2hre9\src\entity\pipetoground.cpp (212): PipeToGround::updateFluidBoxPointer
c:\cygwin64\tmp\factorio-build-z2hre9\src\fluid\fluidbox.cpp (500): FluidBox::FluidBox
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\vector (1843): std::vector<FluidBox,std::allocator<FluidBox> >::_Umove_if_noexcept
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\vector (968): std::vector<FluidBox,std::allocator<FluidBox> >::_Emplace_reallocate<FluidBox>
c:\cygwin64\tmp\factorio-build-z2hre9\src\fluid\fluidsystem.cpp (134): FluidSystem::add
c:\cygwin64\tmp\factorio-build-z2hre9\src\entity\pipetoground.cpp (178): PipeToGround::setDirection
c:\cygwin64\tmp\factorio-build-z2hre9\src\entity\entity.cpp (1600): Entity::rotate
c:\cygwin64\tmp\factorio-build-z2hre9\src\manualbuilder.cpp (160): ManualBuilder::rotateEntity
c:\cygwin64\tmp\factorio-build-z2hre9\src\gameactionhandler.cpp (321): GameActionHandler::actionPerformed
c:\cygwin64\tmp\factorio-build-z2hre9\src\input\inputhandler.cpp (61): InputHandler::flushActions
c:\cygwin64\tmp\factorio-build-z2hre9\src\gameactionhandler.cpp (364): GameActionHandler::update
c:\cygwin64\tmp\factorio-build-z2hre9\src\mainloop.cpp (1098): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-build-z2hre9\src\mainloop.cpp (970): MainLoop::gameUpdateLoop
c:\cygwin64\tmp\factorio-build-z2hre9\src\util\workerthread.cpp (42): 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 RouterBase::*)(void),ClientRouter *>,std::default_delete<std::tuple<void (__cdecl RouterBase::*)(void),ClientRouter *> > > >::_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: 00007FFC7D8D3DC4)
00007FFC7D8D3DC4 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFC7E723691)
00007FFC7E723691 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
116.944 Error PipeToGround.cpp:212: this->fluidBox == oldAddress was not true
Logger::writeStacktrace skipped.
116.944 Error CrashHandler.cpp:175: Map tick at moment of crash: 180140
116.944 Error Util.cpp:97: 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.
123.117 Uploading log file
123.123 Error CrashHandler.cpp:197: Heap validation: success.
123.125 Creating crash dump.
123.341 CrashDump success
Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes
Posted: Tue Mar 19, 2019 1:31 pm
by Dominik
This issue was simple to solve, just a dumb tiny mistake I made before.
I have moved recon's post to a thread that is about that issue (
67722).
About those pumps and such - Bilka is biting my ass here to do mod support and at this point it needs to be this generic. Btw what also works now is removing straight pipes along all the connections.
I still don't know if everything would still work if you make a pump with 8 underground and overground connections (I am pretty sure it won't) but reasonable stuff should be ok.
Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes
Posted: Tue Mar 19, 2019 2:56 pm
by Dominik
An issue popped up, will have to postpone this fix.
Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes
Posted: Wed Mar 20, 2019 6:10 pm
by Dominik
The bug causing this was very tiny, problem was that the bug was masking a much bigger issue with ghosts so I had to do some big changes. But they simplified the fluidboxes quite a lot so I am happy about it.
Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes
Posted: Wed Mar 20, 2019 9:33 pm
by Staplergun
Oh that's awesome! Hopefully this is it!
Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes
Posted: Fri Mar 22, 2019 5:14 pm
by Harag
I checked the following scenarios on 0.17.17 and they are indeed fixed
- re-establishing pipe connections on the same rotation works, above and below ground
- fast-replacing works
- all with and without flowing fluid
Tested scenarios:
https://imgur.com/a/iybzAnW