[14.22] Minor Migration error, Possible sollutions

This subforum contains all the issues which we already resolved.
Post Reply
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

[14.22] Minor Migration error, Possible sollutions

Post by Nexela »

Error is either a frozen loading save bar, or an actual error message Entity ID is not in dictionary

Reproduction ->

In mod Create an entity of any type
Create a game and place the entity in the world
Save
Change the entity to a different TYPE
Change mod version
Save won't load or loads and errors depending on how you try to migrate, no migration is just a loading bar freeze

*******
The problem is not that it isn't allowed, its that the only way to fix it is to either remove the mod or change the entity name or destroy() all before updating mods.
The solution that would be easiest as my best guess would be allowing us to migrate an entity to nothing (remove it from the save all together) allowing us to keep the same entity name for a different type
******

migration.json
{
"entity":
[
["my-name", ""]
]
}

To reproduce easily if needed
https://mods.factorio.com/mods/Nexela/N ... /downloads
download and install 1.7.0
build and place a roboport-interface
save
update to 1.7.3
Save won't load (stuck on loading bar)

Workaround for now is use a different entity name, internal migration will remove the old one

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

Re: [14.22] Minor Migration error, Possible sollutions

Post by Rseding91 »

What? I tested out your steps exactly and it loads perfectly.

We fully support migrating entity types with the same name to something else: the game simply removes the old entity and puts the new one in the same place.
If you want to get ahold of me I'm almost always on Discord.

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [14.22] Minor Migration error, Possible sollutions

Post by Nexela »

Ok you are correct about the migration part it should migrate without a problem,

however there is still a bug here and I think I narrowed it down (I disabled all events in my mod for testing)

I think it has to do with migrating from a NOT logistic_cell to a logistic_cell in an existing network

I changed the entity from a radar (1.7.0) to a roboport (1.7.3)

This is without a migration file
If I JUST place my "radar/combinator" entity the game migrates correctly as you said. However if I Add a roboport and my "radar with combinator" onto the map and upgrade the mod the map won't load

[edit] The only difference between migration 2 save and migration 3 save is the addition of a vanilla roboport.
Attachments
Nanobots_1.7.0.zip
Upgrading From
(1.18 MiB) Downloaded 110 times
Migration test 3.zip
Does Not migrate
(311.97 KiB) Downloaded 100 times
Migration test 2.zip
Migrates Correctly
(304.83 KiB) Downloaded 114 times
Nanobots_1.7.3.zip
Upgrade too
(2.97 MiB) Downloaded 102 times

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

Re: [14.22] Minor Migration error, Possible sollutions

Post by Rseding91 »

Thanks for the detailed steps and saves to reproduce the problem :)

I've reproduced it on my end and fixed it for the next version for 0.15.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”