Concurrent Chunk Management Engine (Fabric)

Concurrent Chunk Management Engine (Fabric)

231k Downloads

Random crash while mining with a CC:T turtle

vico93 opened this issue · 8 comments

commented

Describe the bug
Basically i was casually mining in my basement with a CC:Tweaked turtle (robot block, not the sea mob) and the game crashed. Don't know if this have some relation, honestly.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new world in singleplayer
  2. Place a CC:T turtle and make it dig a tunnel
  3. "Hopefully" it will crash

Runtime info (please complete the following information):

  • OS: Windows 11 x64
  • Minecraft version: 1.21
  • Mod version: 0.2.0+alpha.11.106+1.21 (from Modrinth)

Crash reports / logs
HERE

Other mods
Mod List

Checklist

  • I am using the official version of the mod.
  • I tried the latest development version but the issue persists.
  • I searched for similar open issues and could not find an existing bug report on this.
commented

@AViewFromTheTop @Treetrain1 sorry for another ping, but this is related to frozen lib

commented

It looks like frozenlib isn't compatible with allowThreadedFeatures. It can only be fixed on their side.

commented

It looks like frozenlib isn't compatible with allowThreadedFeatures. It can only be fixed on their side.

Awe, dangit lol
Do you know what exactly we should change?

commented

Do you know what exactly we should change?

Threaded world generation assumes that calls to the chunk generator is mostly side-effect-free. It basically means the chunk generator shouldn't modify any global state, such as most static final fields with mutable objects (public static final List<Object> thing = new ArrayList();), and static non-final fields (see below).

EasyNoiseSampler is violating this assumption.

commented

EasyNoiseSampler is violating this assumption.

Rip
How should we counter it?
This is used very frequently..

commented

I’d prefer to not create a new instance every single time a feature samples noise, it would be nice if there were a similar enough way to how we have it currently

commented

You can create a new instance without actually trashing the heap if the object never escapes the method.

Also in your current implementation you are creating several instances that is definitely going to end up in the heap when setSeed is called.

commented

I've just fixed this.
Thank you very much!