Skip to content

Mapgen: "Unfinished" y-slices with num_emerge_threads > 1 #9357

@tuedel

Description

@tuedel
Minetest version

908e762
Bug has been around at least since 0.4.17

OS / Hardware

Operating system: Arch Linux
CPU: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz

Summary

When setting num_emerge_threads to a value greater than one (default chunksize), the mapgen sometimes generates strange y-slices where biome-specific nodes, ores and caves are missing, and decorations extending into them seem to be cut off above.
I've been able to reproduce this with several different mapgens (v7, valleys, carpathian) and map database backends (SQLite, PostgreSQL).

I am aware that using multiple emerge threads is considered somewhat experimental and advised against in the default config, but still have hope that someone with in-depth knowledge of the mapgen code (@paramat 😉) might be able to spot this one.

Steps to reproduce

Just start a game and fly around for a few minutes. The bug appears using the minimal game, but may be easier to spot in MTG because of the cut-off trees.

Above ground (valleys, minimal game):
screenshot_20200201_233705

Above ground (v7, MTG):
screenshot_20200202_082047

Above ground (valleys, MTG):
screenshot_20200201_222005

Caverns (valleys, MTG):
screenshot_20200201_223306

The slices always seem to appear at mapblock borders (see coordinates):
screenshot_20200202_062026
As far as I understand it, it always happens in (parts of) a mapchunk's topmost (Edit: or lowermost) y-slice.

When other mods try to place additional structures in an on_generated callback, they are cut off as well (in this case https://github.com/FaceDeer/settlements):
screenshot_20200125_151119

Metadata

Metadata

Assignees

No one assigned

    Labels

    @ MapgenBugIssues that were confirmed to be a bugNon-trivialA large amount of work is required to address this (sometimes to the point of being infeasible)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions