Hi,
i am currently working on a mod and am encountering a reproduce-able game state corruption. I am seeing this in 0.17.9 and 0.17.0, i did not try intermediate versions. Also the mod needs 0.17.x so i cannot try it in 0.16.x
steps to reproduce:
add only one attached mod RepeatingIslands_0.1.1
start a new game
choose "island" from map type (mandatory, otherwise the mod doesn't work correctly)
change Island size to lowest 17% (not so relevant but should show the issue faster)
run the command
/c game.forces.player.chart(game.player.surface, {lefttop = {x = -2048, y = -2048}, rightbottom = {x = 2048, y = 2048}})
Wait, the corruption typically occurs within ~1-2 minutes. It is 100% reproduceable on my machine, i tried it at least 30 times while trying to narrow it down.
The mod creates a new surface with the island type in the background. once the island is completely generated it is copied over to nauvis, and another one is started.
The mod makes heavy use of the APIs is_chunk_generated/request_to_generate_chunks/force_generate_chunk_requests/count_tiles_filtered/clone_area/delete_surface.
I was not able to pin it down to one responsible call, but the combination in the current mod shows it the fastest for me.
I know the delete_surface call is not the cause since it happens also when i don't delete the surfaces and just use new ones.
[Rseding91] [0.17.9] Modded:Cannot save map: Detected corruption of the game state
-
- Inserter
- Posts: 35
- Joined: Fri Aug 24, 2018 7:42 pm
- Contact:
Re: [0.17.9] Modded:Cannot save map: Detected corruption of the game state
Can you post the log
Re: [0.17.9] Modded:Cannot save map: Detected corruption of the game state
Also if you want multiple islands you can just set multiple starting points to the nauvis surface
-
- Inserter
- Posts: 35
- Joined: Fri Aug 24, 2018 7:42 pm
- Contact:
Re: [0.17.9] Modded:Cannot save map: Detected corruption of the game state
i have attached the log:
- i have to know the number of islands in advance, but i want to use ships and don't know if i spend 10h,100h or 1000h on the map so i tried a generic approach
- maybe i got it wrong, i thought changing the map_gen_settings of nauvis does nothing as it would not be re-applied... i could create another surface with those settings but then mods that assume i am playing on nauvis would not work
the starting_points is almost what i wanted but it didn't quite fit.- i have to know the number of islands in advance, but i want to use ships and don't know if i spend 10h,100h or 1000h on the map so i tried a generic approach
- maybe i got it wrong, i thought changing the map_gen_settings of nauvis does nothing as it would not be re-applied... i could create another surface with those settings but then mods that assume i am playing on nauvis would not work
-
- Inserter
- Posts: 35
- Joined: Fri Aug 24, 2018 7:42 pm
- Contact:
Re: [0.17.9] Modded:Cannot save map: Detected corruption of the game state
i have found a workaround; if i ensure that the chunk exists before calling clone_area
(using calling is_chunk_generated+request_to_generate_chunks and waiting till that is done)
this corruption doesn't seem to happen
(using calling is_chunk_generated+request_to_generate_chunks and waiting till that is done)
this corruption doesn't seem to happen
Re: [Rseding91] [0.17.9] Modded:Cannot save map: Detected corruption of the game state
Thanks for the report. It's now fixed for the next version of 0.17.
If you want to get ahold of me I'm almost always on Discord.
-
- Inserter
- Posts: 35
- Joined: Fri Aug 24, 2018 7:42 pm
- Contact: