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

Elytra Crash [1.12] #44

Closed
DarianLStephens opened this issue Oct 3, 2020 · 2 comments
Closed

Elytra Crash [1.12] #44

DarianLStephens opened this issue Oct 3, 2020 · 2 comments

Comments

@DarianLStephens
Copy link

I can't be 100% certain, but it seems this mod is causing a crash after you use the Elytra too many times, or perhaps just at random?
You also seem to lack the Elytra sound, but perhaps that's due to interference from another mod?

Investigating this crash online, Sound Physics has been the sole mod shared between each report, and so appears to be the most likely cause.

No crash report, unfortunately, as the world simply hangs and saves, then never responds again, forcing me to kill the process (I've left the game running for 5+ minutes after it hanged, and it never recovered).

Apologies if this ends up being a false-positive, but I'm not sure where else to look.

@djpadbit
Copy link
Owner

djpadbit commented Oct 4, 2020

Sound Physics doesn't handle moving sounds yet so it's normal that the elytra sound isn't processed.
For the hanging, I managed to recreate the problem very easily actually which is quite the problem. From what i'm seeing, it's a deadlock between the chunk renderer threads and the sound system thread (where Sound Physics's on play sound hook is run). They are both stuck on the player's EntityDataManager's read lock inside getEyeHeight because that function checks if the player is in a elytra which is a value stored inside the data manager. But it shouldn't deadlock as they all want to read and not write and a ReentrantReadWriteLock should let them all read fine. This is probably gonna take a bit of time to figure out so i'll try to keep this updated as i'm working on it.

Update: It's playing the elytra sound when updating the data manager so the write lock is held and Sound Physics tries to get a read lock which is what is causing the deadlock. But the problem is why is it trying to evaluate the elytra sound ? I'm guessing the main thread plays a sound which overrides the last sound info in Sound Physics and it thinks it's a sound it should process

Update 2: Actually it's deadlocked when sending the new source command for the elytra to the sound system when it's processing a normal sound playing. So the data manager is locked and it waits for the sound system to finish the play sound command but inside, Sound Physics tries to read the data manager's value and ends up in a deadlock with both theads waiting for each other.

@djpadbit
Copy link
Owner

djpadbit commented Oct 4, 2020

It should be fixed now. Since it's a pretty important bug, i made a patch release that you can download here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants