Dynamic Surroundings: Fabric Edition

Dynamic Surroundings: Fabric Edition

744k Downloads

[1.20.x] Crash due to concurrent access of randomizer

FaeWulf opened this issue ยท 4 comments

commented
commented

Pushed update 0.3.3 to CurseForge and Modrinth.

commented

What modpack, and how often does it occur?

commented

What modpack, and how often does it occur?

Lastest fabulously optimized.
I don't know what triggering it, not very often, it is very random (sometimes crashed while walking on ice berg, sometimes crashed while building base...)

P/s: I have read stacktrace but have no idea what triggers it.

commented

My mod is a client side mod, meaning my logic executes on the render thread (well, mostly). This crash is telling me that there is another thread that is trying to use a randomizer instance that I created for the render thread, which is something that should not be occurring. I would imagine this issue would be infrequent and occur randomly just as you are experiencing.

EDIT: I think I know what it is. In modern minecraft sounds now have a random instance associated with them. This random could be accessed by an "off thread" in the sound engine. I am using a shared random in the context. Need to rearrange code and add some defenses.