[Dominik][0.17.12][Mod] Crash on rotate again with underground pipes

This subforum contains all the issues which we already resolved.
Post Reply
Staplergun
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Sun Mar 25, 2018 5:34 am
Contact:

[Dominik][0.17.12][Mod] Crash on rotate again with underground pipes

Post 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:

Image

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:
Image
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.
Attachments
factorio-current.log
(8.43 KiB) Downloaded 87 times
underground-pipe-pack_0.16.66.zip
(5.35 MiB) Downloaded 93 times
MOD TEST.zip
(3.29 MiB) Downloaded 75 times

Dominik
Former Staff
Former Staff
Posts: 658
Joined: Sat Oct 12, 2013 9:08 am
Contact:

Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes

Post by Dominik »

Wow that is a very detailed report, thanks! Will look into it.

Dominik
Former Staff
Former Staff
Posts: 658
Joined: Sat Oct 12, 2013 9:08 am
Contact:

Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes

Post 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.

Staplergun
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Sun Mar 25, 2018 5:34 am
Contact:

Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes

Post 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.

Dominik
Former Staff
Former Staff
Posts: 658
Joined: Sat Oct 12, 2013 9:08 am
Contact:

Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes

Post by Dominik »

By the way this crash you are getting means it gets into an infinite loop.
Related load crash 67749

Recon777
Filter Inserter
Filter Inserter
Posts: 267
Joined: Fri Jun 10, 2016 4:04 am
Contact:

Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes

Post 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!

User avatar
Harag
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sun Sep 30, 2018 9:49 am
Contact:

Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes

Post by Harag »

Image

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
Attachments
factorio-current.log
(12 KiB) Downloaded 84 times
factorio-dump-current.zip
(133.91 KiB) Downloaded 81 times

Dominik
Former Staff
Former Staff
Posts: 658
Joined: Sat Oct 12, 2013 9:08 am
Contact:

Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes

Post 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.

Dominik
Former Staff
Former Staff
Posts: 658
Joined: Sat Oct 12, 2013 9:08 am
Contact:

Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes

Post by Dominik »

An issue popped up, will have to postpone this fix.

Dominik
Former Staff
Former Staff
Posts: 658
Joined: Sat Oct 12, 2013 9:08 am
Contact:

Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes

Post 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.

Staplergun
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Sun Mar 25, 2018 5:34 am
Contact:

Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes

Post by Staplergun »

Oh that's awesome! Hopefully this is it!

User avatar
Harag
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sun Sep 30, 2018 9:49 am
Contact:

Re: [Dominik][0.17.12][Mod] Crash on rotate again with underground pipes

Post by Harag »

I checked the following scenarios on 0.17.17 and they are indeed fixed :D
  • 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

Post Reply

Return to “Resolved Problems and Bugs”