[boskid][2.0.34] Crash using clone tool in editor/sandbox between surfaces (TransportLine check fails)

This subforum contains all the issues which we already resolved.
evanrinehart
Inserter
Inserter
Posts: 42
Joined: Fri Jul 31, 2020 11:16 pm
Contact:

[boskid][2.0.34] Crash using clone tool in editor/sandbox between surfaces (TransportLine check fails)

Post by evanrinehart »

Basically I tried to clone a small factory from nauvis to gleba using the /editor.

Edit: I can reproduce it now.
Edit: No I can't, not reliably. I just triggered it a few times and not other times. Maybe it has to do with the cloned factory's exact state when you do the pause step. Note that it is actively processing spoilage not idle.

Version: 2.0.34

Mods enabled: space age, elevated rails, quality

Game mode: sandbox

Steps leading up to the crash:
  1. After loading the sandbox3 save, enter editor mode.
  2. Go to time tab, select the Pause button to pause time. When trying to reproduce the crash, I had to remember to do this step.
  3. In clone tab, select area, and select a particular factory on nauvis. I will screenshot the exact factory once I finish the bug report and upload the log.
  4. In the surfaces tab click generate planets.
  5. In the surfaces tab select gleba surface.
  6. In the clone tab the area selection is still active. Click somewhere to paste the factory onto newly generated gleba surface.
  7. See error message about reporting the crash and uploading log.
Attachments: current log, previous log, save file right after crash.

Here is the area that I was attempting to clone, which isn't exactly in the save because of lost progress. Sorry about that.
02-14-2025, 10-01-31.png
02-14-2025, 10-01-31.png (3.68 MiB) Viewed 751 times
Attachments
sandbox3.zip
(5.19 MiB) Downloaded 7 times
factorio-previous.log
(9.67 KiB) Downloaded 9 times
factorio-current.log
(10.79 KiB) Downloaded 11 times
evanrinehart
Inserter
Inserter
Posts: 42
Joined: Fri Jul 31, 2020 11:16 pm
Contact:

Re: [2.0.34] crash when using clone tool in editor / sandbox between surfaces

Post by evanrinehart »

While trying to get a reliable reproduction I noticed something odd.

When it crashes, it happens shortly after pasting the cloned factory onto gleba the first and only time before crashing.

If it doesn't crash upon pasting, I can paste again many times with no problems. But every paste after the first doesn't include the nauvis decorative patches which don't seem to belong on gleba.
02-14-2025, 11-04-02.png
02-14-2025, 11-04-02.png (4.36 MiB) Viewed 726 times
Included an updated save which is paused with the completed factory ready to clone, and gleba is not yet generated. Using the save you can start from step 3 and get a crash sometimes. Since it's paused that rules out the exact state of the running factory mattering.

Still not sure how to make it crash reliably.
Attachments
sandbox3-bughunt-1.zip
(5.27 MiB) Downloaded 8 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3503
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [boskid][2.0.34] Crash using clone tool in editor/sandbox between surfaces (TransportLine check fails)

Post by boskid »

From looking at the reproductions, from the first save file i was unable to reproduce anything, however from the second save file i was able to reproduce this specific issue using following steps:
0/ Load sandbox3-bughunt-1.zip
1/ In time editor, update for 44 ticks (using "Play for limited time")
2/ With clone tool and area select, select just the underground belts where the carbon is being dropped
3/ Clone those entities anywhere nearby on the same surface
4/ Crash

Surfaces are not relevant for the reproduction steps as transport lines logic does not know anything about surfaces. Looking at this problem more, the issue is caused by the clone of the underground belt when 2 conditions are met: a/ there is an item on the underground section and b/ clone only covers the input underground belt. Issue here is that when underground belt is cloned, all items on the underground section are also cloned however clone items logic fails here because the output underground belt is missing causing input underground belt to become disconnected, this means underground lines are left disconnected with a default length of 1, and clone logic tries to insert items into that transport line at the out of bounds position causing consistency failure.

When trying to reproduce i also found other cases where the issue also shows up like when cloning a turning transport belt full of items in a place where it would get an extra side connection which forces the turning belt to become a straight one, here again the transport lines will have different length and when items are being cloned they are incorrectly inserted causing consistency issue.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3503
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [boskid][2.0.34] Crash using clone tool in editor/sandbox between surfaces (TransportLine check fails)

Post by boskid »

Thanks for the report. Issue is now fixed for 2.0.35.
evanrinehart
Inserter
Inserter
Posts: 42
Joined: Fri Jul 31, 2020 11:16 pm
Contact:

Re: [boskid][2.0.34] Crash using clone tool in editor/sandbox between surfaces (TransportLine check fails)

Post by evanrinehart »

Confirmed your steps in 2.0.34 reproduce the crash.
Confirmed the steps don't crash in 2.0.35!

And I tried some more aggressive versions of the original clone to gleba, waiting for the carbon to be in the underground as per description. Clone success every time.

Truly epic thanks
Post Reply

Return to “Resolved Problems and Bugs”