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

Fix SoundManager handling when no sound devices exist #226

Merged
merged 9 commits into from
Oct 18, 2024

Conversation

Ecdcaeb
Copy link
Contributor

@Ecdcaeb Ecdcaeb commented Oct 17, 2024

@Ecdcaeb Ecdcaeb changed the title port https://github.com/GTNewHorizons/lwjgl3ify/pull/173/files Fix SoundManager handling when no sound devices exist Oct 17, 2024
@Rongmario
Copy link
Member

Is this not the same as 3599136?

@Ecdcaeb Ecdcaeb closed this Oct 17, 2024
@Ecdcaeb Ecdcaeb reopened this Oct 18, 2024
@Ecdcaeb Ecdcaeb changed the base branch from main to experimental/foundation October 18, 2024 11:25
@Ecdcaeb
Copy link
Contributor Author

Ecdcaeb commented Oct 18, 2024

I compared GTNH and there was no difference.
I compared lwjgl2 and found that there was a missing destory for recycling when could not open the device.

I played on this build https://github.com/Ecdcaeb/Cleanroom/actions/runs/11402661127, click Single Player and enter the world normally.

#224 (comment)

@Ecdcaeb
Copy link
Contributor Author

Ecdcaeb commented Oct 18, 2024

At https://mclo.gs/kQaPCMJ (run.722)
I found something strange :

[19:15:48] [Sound Library Loader/INFO]: Starting up SoundSystem...
--
94 | [19:15:48] [Thread-5/ERROR]: Thread[#42,Thread-5,5,main]
95 | java.lang.NullPointerException: Cannot read field "context" because "org.lwjgl.openal.AL.alcContext" is null
96 | at org.lwjgl.openal.AL.destroy(AL.java:73) ~[AL.class:?]
97 | at paulscode.sound.libraries.LibraryLWJGLOpenAL.cleanup(LibraryLWJGLOpenAL.java:340) ~[LibraryLWJGLOpenAL.class:?]
98 | at paulscode.sound.SoundSystem.CommandNewLibrary(SoundSystem.java:1521) ~[SoundSystem.class:?]
99 | at paulscode.sound.SoundSystem.CommandQueue(SoundSystem.java:2572) ~[SoundSystem.class:?]
100 | at paulscode.sound.CommandThread.run(CommandThread.java:121) ~[CommandThread.class:?]

destroy have been applied in LibraryLWJGLOpenAL's cleanup, but failed.

@Ecdcaeb
Copy link
Contributor Author

Ecdcaeb commented Oct 18, 2024

works well https://mclo.gs/vnwWRq2
ready for rewiew

src/main/java/org/lwjgl/openal/AL.java Outdated Show resolved Hide resolved
@Rongmario Rongmario merged commit 516c4f1 into CleanroomMC:experimental/foundation Oct 18, 2024
1 check passed
@Ecdcaeb Ecdcaeb deleted the gtnh-fly-173 branch October 26, 2024 12:28
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

Successfully merging this pull request may close these issues.

2 participants