Page 1 of 1

[posila] [0.17.58] Crash disconnecting power network

Posted: Sat Jul 20, 2019 2:35 am
by Snoman314
I'm getting a consistent crash to desktop when placing or destroying power poles. It's not usually the first power pole to be disassembled, but if I load this save and start removing power poles, it crashes pretty quick:

https://drive.google.com/open?id=1DcijR ... VgzVmLMvv8

Log file:

https://drive.google.com/open?id=1uzxhc ... 4Z0iz80z4-

Re: Repeated crash to desktop when power networks connect

Posted: Sat Jul 20, 2019 4:40 am
by boskid
Yup, managed to crash using this save. Now i will test which of 86 mods can be disabled. (moderator request: move to bug reports as this is CTD?)

My log:
log
-- edit:
Deterministic reproduction:
  1. Open "24-tick-to-crash.zip" (tested with all mods enabled)
    24-tick-to-crash.zip
    (11.42 MiB) Downloaded 123 times
  2. In editor, press "tick once"
  3. Crash
    log wrote:269.606 Error ElectricEnergySource.cpp:207: Call to disconnect network that is not connected

Re: [0.17.58] Crash disconnecting power network

Posted: Sat Jul 20, 2019 8:37 am
by Snoman314
Yeah ack there are a lot of mods, but when I looked at the logs it didn't seem to mention any. Additionally the crash occurred when I deleted vanilla wooden power poles.

Re: [0.17.58] Crash disconnecting power network

Posted: Sat Jul 20, 2019 8:57 am
by Snoman314
OK, after your comments about mods I acted on a hunch and found turning off Realistic Electric Trains prevented the crash. I don't see why, as it doesn't seem to have anything to do with what's going on, but I'll post on that mod's mod portal page.

Re: [0.17.58] Crash disconnecting power network

Posted: Sat Jul 20, 2019 9:26 am
by boskid
Snoman314 wrote:
Sat Jul 20, 2019 8:57 am
OK, after your comments about mods I acted on a hunch and found turning off Realistic Electric Trains prevented the crash. I don't see why, as it doesn't seem to have anything to do with what's going on, but I'll most on that mod's mod portal page.
There are many mods that when disabled will prevent save from crashing. All of them have one thing in common: they change something in electric network (ex. disabling will remove some electric network connections) so game must rebuild electric network - this solves issue in this save. There is too many mods that when disabled will prevent it from crashing so i stopped searching - just open save with all mods

Re: [0.17.58] Crash disconnecting power network

Posted: Thu Aug 01, 2019 8:09 pm
by Black Platypus
I had crashes happen when deleting poles a couple of times, too: I do not have any mods installed.
This was on 0.17.59
Unfortunately, I didn't think to file bug reports until later when crashes started piling up

Re: [0.17.58] Crash disconnecting power network

Posted: Mon Aug 05, 2019 2:38 pm
by Klonan
I can't load the save in the latest version due to fluid connection overlap errors,

Can you reproduce the crash at all?

Re: [0.17.58] Crash disconnecting power network

Posted: Mon Aug 05, 2019 3:01 pm
by boskid
Using "24-tick-to-crash.zip" in [0.17.62] with up to date mods i have no fluid connection overlap erros, and bug is still reproducible with same steps (load, tick once, crash)
log

Re: [0.17.58] Crash disconnecting power network

Posted: Mon Aug 05, 2019 3:56 pm
by Jon8RFC
boskid wrote:
Mon Aug 05, 2019 3:01 pm
Using "24-tick-to-crash.zip" in [0.17.62] with up to date mods i have no fluid connection overlap erros, and bug is still reproducible with same steps (load, tick once, crash)
Same for me, whether I do tick once or remove any power pole manually.

Re: [0.17.58] Crash disconnecting power network

Posted: Wed Aug 07, 2019 7:04 pm
by Rseding91
boskid wrote:
Mon Aug 05, 2019 3:01 pm
Using "24-tick-to-crash.zip" in [0.17.62] with up to date mods i have no fluid connection overlap erros, and bug is still reproducible with same steps (load, tick once, crash)
log
I can't load the save file with the mods it has without the fluid-overlap check errors. Please provide a save file that actually loads in the latest experimental version of the game + the mods to make it load.

Otherwise there's nothing we can do.

Re: [0.17.58] Crash disconnecting power network

Posted: Thu Aug 08, 2019 1:21 pm
by boskid
Rseding91 wrote:
Wed Aug 07, 2019 7:04 pm
boskid wrote:
Mon Aug 05, 2019 3:01 pm
Using "24-tick-to-crash.zip" in [0.17.62] with up to date mods i have no fluid connection overlap erros, and bug is still reproducible with same steps (load, tick once, crash)
log
I can't load the save file with the mods it has without the fluid-overlap check errors. Please provide a save file that actually loads in the latest experimental version of the game + the mods to make it load.

Otherwise there's nothing we can do.
Steps to reproduce:
  1. Download "24-tick-to-crash.zip" (from earlier)
  2. Sync mods with save (this is only to get mod list for update)
  3. Restart
  4. There will be some issues with mods, disable all of them
  5. Update all mods to newest version
  6. Sync mods with save
  7. Restart
  8. There will be some issues with 3 mods (space-exploration, assembler-pipe-passthrough and FluidFilter). Disable only this 3 mods (they are not important for reproduction)
  9. Now, having all mods updated and 3 of them disabled, load "24-tick-to-crash.zip" (from earlier)
  10. Tick once
  11. Crash
log
mods
-- edit:
Just in case, save with reduced set of mods: disabled some heavy mods and resaved. Crashes in [0.17.63]:
  1. Download 73458-tick-to-crash-c.zip
    73458-tick-to-crash-c.zip
    (4.87 MiB) Downloaded 118 times
  2. Sync mods with save
  3. Update mods
  4. Load 73458-tick-to-crash-c.zip
  5. Tick once
  6. Crash

Re: [0.17.58] Crash disconnecting power network

Posted: Mon Aug 26, 2019 10:38 am
by Jon8RFC
Just wanted to follow-up that this still crashes for me on 0.17.66.
I downloaded 73458-tick-to-crash-c.zip, clicked on the button to sync mods, loaded it up, removed the power pole, and it crashed.

Re: [posila] [0.17.58] Crash disconnecting power network

Posted: Wed Aug 28, 2019 7:19 am
by posila
Than you everybody for taking the time to report the bug.
Fixed for 0.17.67

After embarrassingly long investigation I found out the problem is a pump west of electric pole that is being deconstructed. The pump is within supply distance of Overhead line pole north of the pump, but the pump is not connected to the electric network and "unplugged" icon is flashing on it. This makes the game state inconsistent.
Cause of the inconsistency is that when the pump was placed, it was just barely outside of the supply distance of the electric pole, but when pipe was connected to it, its bounding box expanded and suddently became within the supply distance. Fix would be either to make pump recalculate electric network connections when its bounding box changes, or make the boundig box static. Because expanding bounding box doesn't seem needed for pump (and they always create fun issues like this), I chose the latter.

Re: [posila] [0.17.58] Crash disconnecting power network

Posted: Wed Aug 28, 2019 7:53 am
by BlueTemplar
Why was the bounding box expanding ?

Re: [posila] [0.17.58] Crash disconnecting power network

Posted: Wed Aug 28, 2019 8:14 am
by posila
BlueTemplar wrote:
Wed Aug 28, 2019 7:53 am
Why was the bounding box expanding ?
To create "tighter seal" (for collisions) with the pipe. Walls and pipes do this. Boilers used to do it until 0.15, I think (until boilers were made to 2x3 entity). If the question is, why is not bounding box always at its maximum size ... I think it is so that you can walk between wall/pipe and whatever is built next to it.

Re: [posila] [0.17.58] Crash disconnecting power network

Posted: Wed Aug 28, 2019 8:37 am
by BlueTemplar
Oh, right, I just did not expect an entity that didn't change graphically when connected to do it too...

Re: [posila] [0.17.58] Crash disconnecting power network

Posted: Wed Aug 28, 2019 9:46 am
by Jon8RFC
Nice find. Thanks for the interesting explanation, too!