[0.18.32] Crash iterating through all chunks: "LuaHelper::pushTilePosition"
Posted: Thu Jun 18, 2020 4:19 pm
After creating a ChunkIterator with LuaSurface.get_chunks(), reading all the chunks from it (so that it returns nil), then generating new chunk and trying to read it again causes a game (not script) crash. Specifically, it looks like the new chunks have to be to the south-east, as just south or east doesn't seem cause a crash. Waiting for the chunk generator doesn't prevent the crash, so it doesn't appear to have to do with that.
Steps to recreate:
Steps to recreate:
- Start a new map, ideally in sandbox
- run a command to create a new iterator and read all the chunks
Code: Select all
/c iterator = game.player.surface.get_chunks() while iterator() do end
- move far south-east to generate new chunks, about 10 chunks southeast of the initially-charted area works reliably
- run a command to access the iterator
Code: Select all
/c iterator()