Mithion / Mana-And-Artifice

Ars Magica 3: Mana and Artifice
51 stars 7 forks source link

1.20.1 LegacyRandomSource error #693

Closed dawntreader03 closed 7 months ago

dawntreader03 commented 7 months ago

Hello. Casual gamer here. Would just like to report a possible bug with the mod.

Describe the bug -Throwing an IllegalStateException error with accessing legacyrandomsource from multiple threads. Had multiple instances when this error occurred. One was whenever I play on any difficulty other than peaceful, with deathcaps involved most of the time. Another was when using the frost burst ability of the AllFather's Axe.

To Reproduce Steps to reproduce the behavior:

  1. Play on any difficulty other than peaceful
  2. Fight mobs
  3. Crash
  4. See error below

This is with deathcaps usually, but occurs also with Skeleton Assasins. crash-2024-01-30_22.33.17-server.txt crash-2024-01-31_09.12.14-server.txt

The other:

  1. Use the AllFather's Axe via right-click
  2. Use the frost burst by left-clicking the AllFather's Will
  3. Crash
  4. See error below crash-2024-02-03_10.22.18-server.txt

I think the error involves particles (frost, dust, etc).

Expected behavior No crashes with fighting mobs and using items from the mod

Version Information (please complete the following information):

Additional context Disclaimer: I usually play on singleplayer only but with a large modpack.

Any help would be appreciated. I love this mod, even from its AM1 and AM2 days and I commend the team for their work.

Mithion commented 7 months ago

This doesn't just happen with M&A; so I'm thinking it's likely a conflict with another mod. Embeddium perhaps? I would try removing that and see if the issue persists.

If that doesn't work, I found a mod that might help narrow it down: https://www.curseforge.com/minecraft/mc-mods/uwrad-forge

Try installing that, recreate the crash, and post updated logs.

dawntreader03 commented 7 months ago

Thank you for this! Will post an update.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Mithion @.> Sent: Thursday, February 8, 2024 9:45:42 AM To: Mithion/Mana-And-Artifice @.> Cc: dawntreader03 @.>; Author @.> Subject: Re: [Mithion/Mana-And-Artifice] 1.20.1 LegacyRandomSource error (Issue #693)

This doesn't just happen with M&A; so I'm thinking it's likely a conflict with another mod. Embeddium perhaps? I would try removing that and see if the issue persists.

If that doesn't work, I found a mod that might help narrow it down: https://www.curseforge.com/minecraft/mc-mods/uwrad-forge

Try installing that, recreate the crash, and post updated logs.

— Reply to this email directly, view it on GitHubhttps://github.com/Mithion/Mana-And-Artifice/issues/693#issuecomment-1933235751, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BFQSJC7GH5EG6VVSUIDDXQTYSQU4NAVCNFSM6AAAAABCXTPFQ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZTGIZTKNZVGE. You are receiving this because you authored the thread.Message ID: @.***>

the-pandoran commented 7 months ago

This doesn't just happen with M&A

On 1.19.2 with forge 43.3.7, it does. Crash report attached, all mods installed are either dependencies of M&A or part of forge. crash-2024-02-08_21.32.49-server.txt

the-pandoran commented 7 months ago

After further testing, it seems that the bug only appears when Particles is set to Decreased, in singleplayer only; the Decreased particle setting uses a LegacyRandomSource (through level.random) to decide whether to actually spawn a particle, and one of the threads involved in the crash is the client thread, while the other is the integrated singleplayer server thread.

Perhaps ensuring that particle creation code does not get run on the server will be sufficient to fix the issue?

the-pandoran commented 7 months ago

And now I have another crash report with (just) M&A and Unsafe World Random Access Detector crash-2024-02-11_14.18.17-server.txt Should be reproducible by sprinting / jumping around with full demon armor in singleplayer This one appears to be sound-related rather than anything with particles, though again client-side code is being called on the server thread - in this case, LocalPlayer.playSound is being called from DemonArmorItem.addDelayedRunSpeed

Mithion commented 7 months ago

That's the weird part...it is checked so as to not run clientside. I don't get the Mojang LegacyRandomSource changes. It's literally a carbon copy of Java's built in Random class, but with safe multithreading explicitly removed. This bug has absolutely no reason to exist. Frustrating.

I'll see what I can do.

Mithion commented 7 months ago

I went in and removed every single reference I could find to RandomSource in the particles for the mod. I ran around on decreased with the demon armor for about 5 minutes in third person without issue. I believe this issue to be fixed in 1.20.1.

Mithion commented 7 months ago

This was fixed in version 3.0.0.8.

drakray commented 5 months ago

I got a very similar crash today, https://pastebin.com/prn56sLY Using: Minecraft 1.20.1 NeoForge 47.1.102 MNA 3.0.0.11 ManyOtherMods™, listed in the crashlogs, including ModerFix, TwilightForest and Create/Flywheel, which are mentionned somewhere in the log

It seems to be related to Deathcap's Heart particle?