Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

River generator for valleys mapgen places c_stone instead of the defined stone #15643

Open
kromka-chleba opened this issue Jan 5, 2025 · 2 comments
Labels
@ Mapgen Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible

Comments

@kromka-chleba
Copy link
Contributor

kromka-chleba commented Jan 5, 2025

Luanti version

Luanti 5.10.0 (Linux)
Using LuaJIT 2.1.ROLLING
Built by GCC 11.4
Running on Linux/6.11.11 x86_64
BUILD_TYPE=RelWithDebInfo
RUN_IN_PLACE=0
USE_CURL=1
USE_GETTEXT=1
USE_SOUND=1
STATIC_SHAREDIR="/gnu/store/4dbiiflxqzx52lzl1nkc00njz64ajrad-minetest-5.10.0/share/luanti"
STATIC_LOCALEDIR="/gnu/store/4dbiiflxqzx52lzl1nkc00njz64ajrad-minetest-5.10.0/share/locale"

Operating system and version

Guix System

CPU model

No response

GPU model

No response

Active renderer

No response

Summary

Similar to this bug #9357 but appears to have a different cause, because it doesn't disappear after applying this fix: #15637
Basically mapgen places c_stone nodes at the bottom of a river even though it's not in the biome definition.

Pink c_stone nodes being placed in a river:

Screenshot_2025-01-06_00-12-26

Looks like it can get pretty ugly for oceans too:

Screenshot_2025-01-06_00-25-16

There's some c_water in caves too for some reason (the yellow nodes).
EDIT: c_water disappears from caves after setting node_cave_liquid to the proper water.

Steps to reproduce

  1. Download mapgen_test
  2. fly around, find a river, witness pink c_stone nodes that are placed at the bottom
@kromka-chleba kromka-chleba added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Jan 5, 2025
@kromka-chleba kromka-chleba changed the title River generator for valleys mapgen places c_stone instead of the defined stone River generator for valleys mapgen places c_stone instead of the defined stone with num_emerge_threads > 1 Jan 6, 2025
@Zughy Zughy added the @ Mapgen label Jan 6, 2025
@kromka-chleba kromka-chleba changed the title River generator for valleys mapgen places c_stone instead of the defined stone with num_emerge_threads > 1 River generator for valleys mapgen places c_stone instead of the defined stone Jan 11, 2025
@kromka-chleba
Copy link
Contributor Author

kromka-chleba commented Jan 11, 2025

Surprisingly the bug also happens with only 1 emerge thread:

Screenshot_2025-01-11_16-35-05

But it's way more common with more emerge threads.

@cosin15
Copy link
Contributor

cosin15 commented Jan 11, 2025

My theory:

The thing is that the value for stone is 0. And somewhere in the code memory is used after free, as soon this memory gets recycled and initialized you get stones. This could also happen with one thread. When memory gets allocated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Mapgen Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible
Projects
None yet
Development

No branches or pull requests

3 participants