[boskid][1.1.81] Copy-paste randomly loses building recipes

This subforum contains all the issues which we already resolved.
Post Reply
evouga
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue May 02, 2023 7:38 am
Contact:

[boskid][1.1.81] Copy-paste randomly loses building recipes

Post by evouga »

See the screenshot here: https://imgur.com/rCG5Tgg

All three rows of buildings are pastes of the same copied source. Notice that the fifth hydro plant on the top row is randomly missing its recipe; so is the distillation plant in the bottom-left.

The blueprint itself is fine; all buildings have recipes assigned to them. But randomly the ghost pasted using ctrl+v doesn't have a recipe sometimes. If I paste the same blueprint again on top of the existing buildings, the recipe reappears.

I've only noticed the issue after the game has been running a while. After a fresh game reboot the pasting works fine.

The screenshot above is Nullius, but I've also noticed the same problem with Space Exploration.

Loewchen
Global Moderator
Global Moderator
Posts: 8321
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [1.1.81] Copy-paste randomly loses building recipes

Post by Loewchen »

Post a save and exact steps that reliably create the issue please, see 3638.

evouga
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue May 02, 2023 7:38 am
Contact:

Re: [1.1.81] Copy-paste randomly loses building recipes

Post by evouga »

Here is the save file: https://www.dropbox.com/s/73pqmrjkf86i0 ... s.zip?dl=0

I'd give exact, reliable steps if I knew them. Here's the best I can:

1. Load the save.
2. Wait a long time. May also require playing the game (moving around, building stuff? I don't know.)
3. Paste the blueprint at the bottom-right of the hotbar.
4. Look at the ghosts pasted from the blueprint; some of the buildings may be missing their recipes. Whether and which building is not predictable or reproducible, but the odds of the bug appearing seem to be related to how long the game has been running. See screenshot in the OP for examples of the bug occurring.

See also this Reddit thread where others users report the same bug happening in Seablock and vanilla (but no saves unfortunately).

robot256
Filter Inserter
Filter Inserter
Posts: 596
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [1.1.81] Copy-paste randomly loses building recipes

Post by robot256 »

One thing to keep track of when testing is if any of the recipes are locked behind technologies. I know that can cause blueprints to be funny sometimes, and if a mod does something unusual like re-lock a recipe even weirder things could happen.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.81] Copy-paste randomly loses building recipes

Post by Rseding91 »

I'm going to need better reproduction steps than "wait a long time" - sorry.

There are only 2 reasons I know of why a recipe would "fail to apply":

1. Something disabled the recipe after you made the blueprint (in which case you will see a red disabled circle in the blueprint preview)
2. A mod is listening to the entity-built event and removed the recipe/modified the entity after it was placed

If you have reproduction steps that aren't "wait an unknown amount of time" let us know and we can look into what is happening. But without that; everything I test and see in game works correctly.
If you want to get ahold of me I'm almost always on Discord.

evouga
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue May 02, 2023 7:38 am
Contact:

Re: [1.1.81] Copy-paste randomly loses building recipes

Post by evouga »

Is there something I can do while playing that would help you track down the bug? Would the log file immediately after I notice the bug happening help? Or a screen capture of the game, trimmed to around when the bug occurs?

Of course I understand you'd prefer a clean bug with exact reproduction steps, but the bug is what it is.

evouga
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue May 02, 2023 7:38 am
Contact:

Re: [1.1.81] Copy-paste randomly loses building recipes

Post by evouga »

> 1. Something disabled the recipe after you made the blueprint (in which case you will see a red disabled circle in the blueprint preview)

I can at least rule this out completely: the bug happens simply copy-pasting existing buildings with working recipes.

Loewchen
Global Moderator
Global Moderator
Posts: 8321
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [1.1.81] Copy-paste randomly loses building recipes

Post by Loewchen »

evouga wrote:
Tue May 02, 2023 8:52 pm
Of course I understand you'd prefer a clean bug with exact reproduction steps, but the bug is what it is.
That is not a thing though, the same input on the same save file will have the same result every single time, if you perceive as if it doesn't it just means it's an action you are just not aware of and therefore cannot share, making it almost impossible for anyone else to create even once.
Issues like this are often caused by people accidentally triggering features of mods they don't fully understand.

lyvgbfh
Fast Inserter
Fast Inserter
Posts: 165
Joined: Fri Jul 10, 2020 6:48 pm
Contact:

Re: [1.1.81] Copy-paste randomly loses building recipes

Post by lyvgbfh »

Do you regularly use the flip bind when working elsewhere? I'm wondering if viewtopic.php?p=584698#p584698 is relevant here, and somehow the buildings are being flipped where they otherwise shouldn't. If there's no reply before I'm off work I'll test myself :)

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.81] Copy-paste randomly loses building recipes

Post by boskid »

If you think the error is easily reproducible, then it would help if you could provide a save file with a replay data where i could observe what is happening under the hood.

In order to create a replay of an existing game, you would need to do following steps:
1/ in main menu, use `Map editor > Convert save` and select the save file in which you have all buildings prepared to show the issue
2/ go back to main menu, `Single player > New game` here you can select the new user scenario that was created in the previous step, IMPORTANT: here you have to check the "record replay" checkbox in the top right, then if the checkbox is checked, press "Play"
3/ do your steps that reproduce the issue
4/ once you confirm that the issue is there, save the game to a separate file
5/ send us that entire save file, it will contain state at the beginning of the replay (level-init.dat), the replay itself (replay.dat) and the final state of game (level.dat). From this it will be simple to tell what is causing the observed behavior.

lyvgbfh
Fast Inserter
Fast Inserter
Posts: 165
Joined: Fri Jul 10, 2020 6:48 pm
Contact:

Re: [1.1.81] Copy-paste randomly loses building recipes

Post by lyvgbfh »

Here's a replay-enabled save with it reproduced. Bug seems to xref with viewtopic.php?f=29&t=101836
repro-1-1.zip
Repro save. Just flib and editorextensions active.
(198.4 KiB) Downloaded 58 times
The caveat to reproduction seems to be both flipping and turning, but it took me a few tries to find the order.

edit: added log
Attachments
factorio-current.log
(14.17 KiB) Downloaded 43 times

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.81] Copy-paste randomly loses building recipes

Post by boskid »

lyvgbfh wrote:
Wed May 03, 2023 11:57 pm
Here's a replay-enabled save with it reproduced. Bug seems to xref with viewtopic.php?f=29&t=101836
repro-1-1.zip
The caveat to reproduction seems to be both flipping and turning, but it took me a few tries to find the order.

edit: added log
I am not seeing anything interesting in this replay file, at the beginning there are 3 chemical plants where the center one was not given any recipe and at the end after blueprint was placed the center chemical plant also has no recipe which was to be expected.

lyvgbfh
Fast Inserter
Fast Inserter
Posts: 165
Joined: Fri Jul 10, 2020 6:48 pm
Contact:

Re: [1.1.81] Copy-paste randomly loses building recipes

Post by lyvgbfh »

boskid wrote:
Thu May 04, 2023 8:09 am
lyvgbfh wrote:
Wed May 03, 2023 11:57 pm
Here's a replay-enabled save with it reproduced. Bug seems to xref with viewtopic.php?f=29&t=101836
repro-1-1.zip
The caveat to reproduction seems to be both flipping and turning, but it took me a few tries to find the order.

edit: added log
I am not seeing anything interesting in this replay file, at the beginning there are 3 chemical plants where the center one was not given any recipe and at the end after blueprint was placed the center chemical plant also has no recipe which was to be expected.
Did the (originally) left most plant not lose the recipe for you in the pasted version?

Edit: On reloading the replay, it doesn't lose the recipe for me either. Next up is a video recording or the psych ward, I guess.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.81] Copy-paste randomly loses building recipes

Post by boskid »

I have a really mixed feeling here. I was able to reproduce the issue with the Nullius mod only using following reproduction steps:
- place a ghost of "Hydro plant 1" with a recipe set
- place a real "Mecha 1" entity in a way that it has legs over the hydro plant
- place a real "Large beacon 2" nearby so the hydro plant ghost is in range.
With that set of steps the hydro plant ghost with a recipe set is destroyed and Nullius tries to restore that ghost but it fails to set a recipe. Reason is that Nullius spawns some hidden entities around the large beacon in order to enforce distance limitation but by doing so it triggers entity ghost revalidation if its still buildable and the ghost says it is not buildable because it collides with spider leg. I see this issue also happens in the 1.2 branch so it was not fixed even here. Fix should be relatively simple: when entity is built and it does not collide with ghost, it should not force the ghost to revalidate if its still buildable.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [boskid][1.1.81] Copy-paste randomly loses building recipes

Post by boskid »

Thanks for the report. Issue is now fixed for 1.1.82: when an entity is built it will not remove entity ghosts nearby that are failing on revive buildability check but pass on manual ghost buildability check.

evouga
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue May 02, 2023 7:38 am
Contact:

Re: [boskid][1.1.81] Copy-paste randomly loses building recipes

Post by evouga »

Thanks! Would the Space Exploration beacons also cause this bug? I've noticed the copy-paste issue with that mod too.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [boskid][1.1.81] Copy-paste randomly loses building recipes

Post by boskid »

evouga wrote:
Sun May 07, 2023 4:58 am
Thanks! Would the Space Exploration beacons also cause this bug? I've noticed the copy-paste issue with that mod too.
Unlikely, Space Exploration is not spawning hidden entities around beacons so if you have problems here that would be a separate issue for which a new set of details would be required (for example a save file with some reproduction steps).

robot256
Filter Inserter
Filter Inserter
Posts: 596
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [boskid][1.1.81] Copy-paste randomly loses building recipes

Post by robot256 »

evouga wrote:
Sun May 07, 2023 4:58 am
Thanks! Would the Space Exploration beacons also cause this bug? I've noticed the copy-paste issue with that mod too.
SE has a set of rules where some recipes work on some surfaces but not others, and some buildings/ghosts get swapped by scripts. You'll definitely need to investigate it separately.

Post Reply

Return to “Resolved Problems and Bugs”