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

1.21.1 NeoForge crash: Unreported exception thrown! #224

Open
Daltaxy opened this issue Sep 22, 2024 · 17 comments
Open

1.21.1 NeoForge crash: Unreported exception thrown! #224

Daltaxy opened this issue Sep 22, 2024 · 17 comments
Labels
bug Something isn't working external Issue with another project

Comments

@Daltaxy
Copy link

Daltaxy commented Sep 22, 2024

Hello.

As your mod interacts with minecraft's sound engine and because I've seen a very recent bug that you fixed concerning a related topic (hash), I thought I'd post my case here
I was moving in a village when, after coming out from a house, sound started glitching and loud repeated noises of feathers falling played. I thought it was intentional until it crashed a few seconds later.

Logs don't seem to mention any mod other than the fact that it's related to Minecraft's sound engine?

latest.log: https://mclo.gs/cQVY5U8
debug.log: https://mclo.gs/rEPdqrw
crash report (probably the most important): https://mclo.gs/gWKhZqw

1.21.1 NeoForge 21.1.55
mod version: dynamic-fps-3.7.3+minecraft-1.21.0-neoforge.jar

@LostLuma LostLuma added bug Something isn't working external Issue with another project labels Sep 23, 2024
@LostLuma
Copy link
Collaborator

LostLuma commented Sep 23, 2024

Hello, this seems to be a similar thing to #220.

Another mod (I do not know which one) is playing or stopping sounds without doing so on the main thread.
As the sound instance gets added or removed from the map of active sounds anyone currently using this map on another thread (like Minecraft, or Dynamic FPS, which both do so on the main render thread) will run into this error and crash.

Could you maybe provide your full mod list here? Then we can maybe figure it out from the mods that overlap with the other report instead of combing through every single one.

Edit: I suppose the crash report has the mod list actually ..

@Daltaxy
Copy link
Author

Daltaxy commented Sep 23, 2024

Hello, this seems to be a similar thing to #220.

Another mod (I do not know which one) is playing or stopping sounds without doing so on the main thread. As the sound instance gets added or removed from the map of active sounds anyone currently using this map on another thread (like Minecraft, or Dynamic FPS, which both do so on the main render thread) will run into this error and crash.

Could you maybe provide your full mod list here? Then we can maybe figure it out from the mods that overlap with the other report instead of combing through every single one.

here is the mod list
https://mclo.gs/9IOx60t
it was already in the crash report so I just copy pasted it
as for what mods could be directly in cause, I can quote Extreme Sound Muffler, Sound Physics Remastered, and Biome Music maybe?
I doubt it's the first two because for now I haven't touched the muffler and I wasn't in a cave
the biome was Aspen Glade if that matters

@LostLuma
Copy link
Collaborator

Well looking through the mod list and some of the mods' sources I am not any smarter sadly.

What I did notice is that you are running both Dynamic FPS and FPS reducer, which both mostly serve the same purpose (Dynamic FPS can also reduce FPS while you're idling now, though you have to enable it), so you might want to remove one of them.

@Daltaxy
Copy link
Author

Daltaxy commented Sep 23, 2024

Well looking through the mod list and some of the mods' sources I am not any smarter sadly.

What I did notice is that you are running both Dynamic FPS and FPS reducer, which both mostly serve the same purpose (Dynamic FPS can also reduce FPS while you're idling now, though you have to enable it), so you might want to remove one of them.

thank you I didn't notice, I'll remove one of them now

@LostLuma
Copy link
Collaborator

Is this a modpack one can download by any chance? I'd like to do some testing but downloading 300 mods individually is kind of a lot of work lol ..

@Daltaxy
Copy link
Author

Daltaxy commented Sep 23, 2024

Is this a modpack one can download by any chance? I'd like to do some testing but downloading 300 mods individually is kind of a lot of work lol ..

no sadly it's my own (don't more people do this?)
I exported it if you want:
CurseForge: https://mega.nz/file/4FJyTJ4J#aZyeHosfUKqBNCAF_Frc1ZLDujfo-f2oCjJri3CZlh4
Modrinth: https://mega.nz/file/FJwBwaJT#HDkvFCrtbCi3L6y3YbnXt9Cj3HIGAHAqfxTaFHKtX6c
or
manifest.json: manifest.json

i just add more mods as they are updated to 1.21.1
the problem with public modpacks is that they lack some mods i NEED (like Mystical Agriculture) or they have constraints that I don't need or want. I'd rather be free and focus on each mod's goals via in-game achievements
note that i did remove FPS Reducer so you might wanna download that again

@LostLuma
Copy link
Collaborator

don't more people do this?

Probably 😄 It's just easier for me if I can download a whole pack to test :)
Pack export should be just as good though, thanks for providing those!

@Daltaxy
Copy link
Author

Daltaxy commented Sep 23, 2024

don't more people do this?

Probably 😄 It's just easier for me if I can download a whole pack to test :) Pack export should be just as good though, thanks for providing those!

whole folder except backups: https://mega.nz/file/hU4H2ZxS#uxiBSzWzOLKD8Gd1dFbMBntpZNv9J-DY51Tp96S3WJk
also this in the folder before if you need: instance.json

not sure if that's what you meant

@LostLuma
Copy link
Collaborator

Oh I was already happy with the links you provided above :)

@LostLuma
Copy link
Collaborator

Well I can not get any variation of your modpack to run sadly, NeoForge just crashes without a helpful error.


Instead what might be useful is that I've created a slightly modified version of Dynamic FPS which will log a warning whenever something does something potentially dangerous with the sound engine from another thread:

[test-thread/WARN]: Potentially dangerous call to SoundEngine.play from non-main thread!
java.lang.Throwable: null
    at net.minecraft.class_1140.dynamic_fps$logOffThreadUsage(class_1140.java:2158) ~[transformed-mod-minecraft-v1.21.1.jar:?]
    at net.minecraft.class_1140.handler$zlm000$dynamic_fps$play(class_1140.java:2147) ~[transformed-mod-minecraft-v1.21.1.jar:?]
    at net.minecraft.class_1140.method_4854(class_1140.java) ~[transformed-mod-minecraft-v1.21.1.jar:?]
    at net.minecraft.class_1144.method_4873(class_1144.java:255) ~[transformed-mod-minecraft-v1.21.1.jar:?]
    at dynamic_fps.impl.DynamicFPSMod.playSoundOffthread(DynamicFPSMod.java:84) ~[dynamic-fps-3.7.3.i0:0/:?]
    at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]

As you can see in the example here I intentionally played a sound from a different thread, and it is pretty easy to pinpoint which mod caused this (this is not included in the jar below, I just did it for demonstration purposes).

If you'd like you can download and install it, then if you get this crash again or just happen to look at the log we should have some more useful information.

@LostLuma LostLuma changed the title 1.21.1 NeoForge crash: Unreported exception thrown! (hash related) 1.21.1 NeoForge crash: Unreported exception thrown! Sep 23, 2024
@Daltaxy
Copy link
Author

Daltaxy commented Sep 23, 2024

Well I can not get any variation of your modpack to run sadly, NeoForge just crashes without a helpful error.


Instead what might be useful is that I've created a slightly modified version of Dynamic FPS which will log a warning whenever something does something potentially dangerous with the sound engine from another thread:

[test-thread/WARN]: Potentially dangerous call to SoundEngine.play from non-main thread!
java.lang.Throwable: null
    at net.minecraft.class_1140.dynamic_fps$logOffThreadUsage(class_1140.java:2158) ~[transformed-mod-minecraft-v1.21.1.jar:?]
    at net.minecraft.class_1140.handler$zlm000$dynamic_fps$play(class_1140.java:2147) ~[transformed-mod-minecraft-v1.21.1.jar:?]
    at net.minecraft.class_1140.method_4854(class_1140.java) ~[transformed-mod-minecraft-v1.21.1.jar:?]
    at net.minecraft.class_1144.method_4873(class_1144.java:255) ~[transformed-mod-minecraft-v1.21.1.jar:?]
    at dynamic_fps.impl.DynamicFPSMod.playSoundOffthread(DynamicFPSMod.java:84) ~[dynamic-fps-3.7.3.i0:0/:?]
    at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]

As you can see in the example here I intentionally played a sound from a different thread, and it is pretty easy to pinpoint which mod caused this (this is not included in the jar below, I just did it for demonstration purposes).

If you'd like you can download and install it, then if you get this crash again or just happen to look at the log we should have some more useful information.

does it crash during the initial loading or on world creation? usually when it's on world creation or terrain loading, deleting config files fixes it

I'll try once I'm back home, though it's not recommended (since that virus outbreak) to run unverified mod files
o'well

@LostLuma
Copy link
Collaborator

Hmm ... If you'd like to verify the changes I've done I've pushed them here:
https://github.com/LostLuma/Dynamic-FPS/tree/1.21.0-debug
See the latest commit after the 1.21.0 backport (which also exists on this official repo).

You can download the mod from that commit by clicking on the green checkmark, clicking on details, then clicking on Summary in the top left. At the bottom of the page you're now on is a section called Artifacts which has a zip with the mod for all the mod platforms.

@Daltaxy
Copy link
Author

Daltaxy commented Sep 24, 2024

Hmm ... If you'd like to verify the changes I've done I've pushed them here:
https://github.com/LostLuma/Dynamic-FPS/tree/1.21.0-debug
See the latest commit after the 1.21.0 backport (which also exists on this official repo).

You can download the mod from that commit by clicking on the green checkmark, clicking on details, then clicking on Summary in the top left. At the bottom of the page you're now on is a section called Artifacts which has a zip with the mod for all the mod platforms.

thank you.
so far, no crash (obviously). i added fps reducer back as well.
we'll see, i'll keep you up.
you can close this issue if it bothers you

@LostLuma
Copy link
Collaborator

Hello, I know you've said that you haven't had any crashes, but if you've had any play sessions it might be worth looking into the log files to see if the debug logging has logged something regardless.

Could you see if you can find the string Potentially dangerous call to SoundEngine in any of your logs, or if you don't feel like it maybe zip up all your log files and send them here then I will do it really quick.

@Daltaxy
Copy link
Author

Daltaxy commented Oct 11, 2024

Hello, I know you've said that you haven't had any crashes, but if you've had any play sessions it might be worth looking into the log files to see if the debug logging has logged something regardless.

Could you see if you can find the string Potentially dangerous call to SoundEngine in any of your logs, or if you don't feel like it maybe zip up all your log files and send them here then I will do it really quick.

hey I haven't been able to play due to Oh the Biomes We've Gone crashing for a few weeks... the authors are looking for a solution
I'll try some more tonight

@Daltaxy
Copy link
Author

Daltaxy commented Oct 20, 2024

finally, after many crashes from other mods being fixed, here is one instance of a Potentially dangerous call to SoundEngine
right before I died, I was in a structure called Illager_fort, mod: DungeonsArise
4mb debug.log so I'll send it here, most websites won't be able to show it all
debug.log
line 22388

@LostLuma
Copy link
Collaborator

Hmm. I should've maybe been more careful with which calls to the sound engine are logged, as this instance of the warning reports on a mod reading information instead of changing anything, so it's not the cause of any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external Issue with another project
Projects
None yet
Development

No branches or pull requests

2 participants