Simple Voice Chat

Simple Voice Chat

337k Downloads

Native crash in opus_encoder_ctl

topsyandpip56 opened this issue · 35 comments

commented

Bug description
The game launches fine with the mod installed, and the mod successfully establishes a connection with the server. However, upon holding the key to talk the game will eventually crash. Upon attempting to test the microphone, I will hear it very briefly before the game will crash.

Steps to reproduce the issue

  1. Run the game
  2. Join a server with the mod enabled
  3. Attempt to talk

Expected behavior
Clearly, I expect the voice chat to function rather than cause a crash in native code.

Log files
https://gist.github.com/topsyandpip56/309d14e0cc7af592287371c51c6e55a5 (Java 11)
https://gist.github.com/topsyandpip56/e99bd3075eb17bc539c190484506a9c5 (Java 11)
https://gist.github.com/topsyandpip56/36ac95fb18d0224e04ddc1ce4af405c3 (Java 8)

Versions

  • 1.16.5
  • Forge version
  • Mod version is 2.2.32

Other mods
Pam's HarvestCraft 2
Macaws Roofs
Culinary Construct
Gravestone Mod
Comforts
CC-Tweaked
MrCrayFish Furniture Mod (+ More Furniture Mod)
Iron Chests
Journeymap
Mouse-tweaks
Chisel
Tinkers Construct
Immersive Engineering
Quark
Water Strainer
Advanced Chimneys
Just Enough Items
WTHIT Forge Edition
Rubidium (Forge port of Sodium)
Oclulus (Forge port of Iris)

Screenshots (Optional)
Screenshots of the issue.

commented

At the top of each of your log files there is a line starting with Core dump written please provide these files

These files are 3.2GiB each, would one suffice? It will take a long time to make this file available via my connection.

yes one will do can you please provide one from 1.18.2

Coredump taken from 1.18.2 with Java 18.
https://drive.google.com/file/d/1p2JlJa5Vmxd5KpRY1rV8wnjrkAzvN8jM/view?usp=sharing
Compressed 7z, will unpack to around 3.8GiB. Please let me know when you have it, so I can delete it.

commented

At the top of each of your log files there is a line starting with Core dump written please provide these files

These files are 3.2GiB each, would one suffice? It will take a long time to make this file available via my connection.

commented

also please try and cause this crash without talking at all (use push to talk and dont press ptt) and provide logs & core dump files

I am not able to replicate the issue without trying to talk, as it turns out. At least, not in one hour of playtime.

commented

At the top of each of your log files there is a line starting with Core dump written please provide these files

These files are 3.2GiB each, would one suffice? It will take a long time to make this file available via my connection.

yes one will do can you please provide one from 1.18.2

commented

Please try if this happens without any other mods.
Please also try if this also happens without MultiMC, since you can change the OpenGL and OpenAL version with that launcher, which might cause issues.

EDIT: Please also provide the latest.log file of that crash.

commented

I will test without other mods, testing without MultiMC may take some time but will attempt to do so also. A Java 8 log is already included, please see the third log listed.

Here is the latest.log:
https://gist.github.com/topsyandpip56/6d9762e3e5b8ceaa896efadefac056d2

commented

A Java 8 log is already included, please see the third log listed.

I know that's why I edited it out.

Which OS and CPU architecture are you using?

commented

Ah sorry, I replied looking at the email github sent out on original post!

Fedora 35 (5.16.18-lqx1.0.fc35.x86_64)
Standard x64 / amd64 architecture.

commented

Alright, thanks.
Just to make sure it isn't JNA 4.4, could you test running voice chat with Minecraft 1.18.2?

commented

Minecraft 1.18.2, Java 18 - same crash:
https://gist.github.com/topsyandpip56/27a596ae48b806bd30f0cae6d4ae8d2d

Minecraft 1.16.5, Java 11 - no other mods had same crash

In both cases, MultiMC was instructed to use the same LWJGL and OpenAL versions as stock though will still test later without MultiMC

commented

Alright, thank you!

We had similar issues with Linux in the past, but these issues were all resolved, so this seems to be something different...

I will also do some testing and will get back to you one I've found something.

commented

At the top of each of your log files there is a line starting with Core dump written please provide these files

commented

also please try and cause this crash without talking at all (use push to talk and dont press ptt) and provide logs & core dump files

commented

can you provide the hs_err_pid_xxx log that goes along side this coredump?

commented

I've just noticed something which looks particularly pertinent in the log;

Event: 35.868 Thread 0x00007f2d20161730 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b923ac98}: /natives/linux-x86-64/libopus.so: cannot open shared object file: No such file or directory> (0x00000000b923ac98) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.869 Thread 0x00007f2d20161730 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b923bc38}: /natives/linux-x86-64/libopus.so: cannot open shared object file: No such file or directory> (0x00000000b923bc38) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.894 Thread 0x00007f2d201625b0 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b4a19a30}: /natives/linux-x86-64/rnnoise.so: cannot open shared object file: No such file or directory> (0x00000000b4a19a30) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.894 Thread 0x00007f2d201625b0 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b4a1a938}: /natives/linux-x86-64/rnnoise.so: cannot open shared object file: No such file or directory> (0x00000000b4a1a938) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]

Does the mod expect these natives to be present on my system, or should they be included in the mod?

Edit: Actually I see that these files are indeed present in the jar file, so this issue just became especially strange.

commented

I have made a version of the jar file which works on my system, by replacing libopus.so and rmnoise.so with the most recent version of libopus.so from my OS, and the most recent version of rmnoise.so from github. It appears to be a version problem(?)

Working version of libopus is from opus-1.3.1-9.fc35.src.rpm, working version of rmnoise from v0.91.

commented

I've just noticed something which looks particularly pertinent in the log;

Event: 35.868 Thread 0x00007f2d20161730 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b923ac98}: /natives/linux-x86-64/libopus.so: cannot open shared object file: No such file or directory> (0x00000000b923ac98) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.869 Thread 0x00007f2d20161730 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b923bc38}: /natives/linux-x86-64/libopus.so: cannot open shared object file: No such file or directory> (0x00000000b923bc38) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.894 Thread 0x00007f2d201625b0 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b4a19a30}: /natives/linux-x86-64/rnnoise.so: cannot open shared object file: No such file or directory> (0x00000000b4a19a30) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.894 Thread 0x00007f2d201625b0 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b4a1a938}: /natives/linux-x86-64/rnnoise.so: cannot open shared object file: No such file or directory> (0x00000000b4a1a938) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]

Does the mod expect these natives to be present on my system, or should they be included in the mod?

Edit: Actually I see that these files are indeed present in the jar file, so this issue just became especially strange.

please run the game with -Djna.debug_load=true JVM argument

commented

I have made a version of the jar file which works on my system, by replacing libopus.so and rmnoise.so with the most recent version of libopus.so from my OS, and the most recent version of rmnoise.so from github. It appears to be a version problem(?)

Working version of libopus is from opus-1.3.1-9.fc35.src.rpm, working version of rmnoise from v0.91.

Please send me the logs of that run. My hunch is that your libs just break on loading opus and our software opus encoder is kicking in.

commented

Please send me the logs of that run. My hunch is that your libs just break on loading opus and our software opus encoder is kicking in.

https://gist.github.com/topsyandpip56/e3dea892946e07d6a299980f03f29b91

Verified working in-game with another player running Ubuntu 21.10 with me on Fedora 35.

17:59:54] [Thread-56/INFO] [voicechat/]: Initializing Opus decoder with sample rate 48000 Hz, frame size 960 bytes and max payload size 1024 bytes
[17:59:54] [VoiceChatConnectionThread/INFO] [voicechat/]: Creating audio channel for 075e2ff4-f615-4e8a-91fd-e1b2454b52a6

commented

Please send me the logs of that run. My hunch is that your libs just break on loading opus and our software opus encoder is kicking in.

https://gist.github.com/topsyandpip56/e3dea892946e07d6a299980f03f29b91

Verified working in-game with another player running Ubuntu 21.10 with me on Fedora 35.

Oh, nice, then the issue is the opus native version. I will look into that. Thanks for your help so far.

commented

No problem, it was worth the effort - it's a great mod! Do you want a copy of the patched jar for reference?

commented

I've just noticed something which looks particularly pertinent in the log;

Event: 35.868 Thread 0x00007f2d20161730 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b923ac98}: /natives/linux-x86-64/libopus.so: cannot open shared object file: No such file or directory> (0x00000000b923ac98) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.869 Thread 0x00007f2d20161730 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b923bc38}: /natives/linux-x86-64/libopus.so: cannot open shared object file: No such file or directory> (0x00000000b923bc38) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.894 Thread 0x00007f2d201625b0 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b4a19a30}: /natives/linux-x86-64/rnnoise.so: cannot open shared object file: No such file or directory> (0x00000000b4a19a30) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.894 Thread 0x00007f2d201625b0 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b4a1a938}: /natives/linux-x86-64/rnnoise.so: cannot open shared object file: No such file or directory> (0x00000000b4a1a938) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]

Does the mod expect these natives to be present on my system, or should they be included in the mod?
Edit: Actually I see that these files are indeed present in the jar file, so this issue just became especially strange.

please run the game with -Djna.debug_load=true JVM argument

sorry to be a bother but could you still do this? with the version that crashes i have a hunch your update is only a workaround for your setup

commented

I've just noticed something which looks particularly pertinent in the log;

Event: 35.868 Thread 0x00007f2d20161730 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b923ac98}: /natives/linux-x86-64/libopus.so: cannot open shared object file: No such file or directory> (0x00000000b923ac98) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.869 Thread 0x00007f2d20161730 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b923bc38}: /natives/linux-x86-64/libopus.so: cannot open shared object file: No such file or directory> (0x00000000b923bc38) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.894 Thread 0x00007f2d201625b0 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b4a19a30}: /natives/linux-x86-64/rnnoise.so: cannot open shared object file: No such file or directory> (0x00000000b4a19a30) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.894 Thread 0x00007f2d201625b0 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b4a1a938}: /natives/linux-x86-64/rnnoise.so: cannot open shared object file: No such file or directory> (0x00000000b4a1a938) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]

Does the mod expect these natives to be present on my system, or should they be included in the mod?
Edit: Actually I see that these files are indeed present in the jar file, so this issue just became especially strange.

please run the game with -Djna.debug_load=true JVM argument

sorry to be a bother but could you still do this? with the version that crashes i have a hunch your update is only a workaround for your setup

As requested:
https://gist.github.com/topsyandpip56/94f1527be401b26891ddee90f3ef6582

commented

I've just noticed something which looks particularly pertinent in the log;

Event: 35.868 Thread 0x00007f2d20161730 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b923ac98}: /natives/linux-x86-64/libopus.so: cannot open shared object file: No such file or directory> (0x00000000b923ac98) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.869 Thread 0x00007f2d20161730 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b923bc38}: /natives/linux-x86-64/libopus.so: cannot open shared object file: No such file or directory> (0x00000000b923bc38) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.894 Thread 0x00007f2d201625b0 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b4a19a30}: /natives/linux-x86-64/rnnoise.so: cannot open shared object file: No such file or directory> (0x00000000b4a19a30) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.894 Thread 0x00007f2d201625b0 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b4a1a938}: /natives/linux-x86-64/rnnoise.so: cannot open shared object file: No such file or directory> (0x00000000b4a1a938) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]

Does the mod expect these natives to be present on my system, or should they be included in the mod?
Edit: Actually I see that these files are indeed present in the jar file, so this issue just became especially strange.

please run the game with -Djna.debug_load=true JVM argument

sorry to be a bother but could you still do this? with the version that crashes i have a hunch your update is only a workaround for your setup

As requested: https://gist.github.com/topsyandpip56/94f1527be401b26891ddee90f3ef6582

and the log output from the console in multimc if you can

commented

I've just noticed something which looks particularly pertinent in the log;

Event: 35.868 Thread 0x00007f2d20161730 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b923ac98}: /natives/linux-x86-64/libopus.so: cannot open shared object file: No such file or directory> (0x00000000b923ac98) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.869 Thread 0x00007f2d20161730 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b923bc38}: /natives/linux-x86-64/libopus.so: cannot open shared object file: No such file or directory> (0x00000000b923bc38) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.894 Thread 0x00007f2d201625b0 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b4a19a30}: /natives/linux-x86-64/rnnoise.so: cannot open shared object file: No such file or directory> (0x00000000b4a19a30) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]
Event: 35.894 Thread 0x00007f2d201625b0 Exception <a 'java/lang/UnsatisfiedLinkError'{0x00000000b4a1a938}: /natives/linux-x86-64/rnnoise.so: cannot open shared object file: No such file or directory> (0x00000000b4a1a938) 
thrown [src/hotspot/share/prims/jni.cpp, line 535]

Does the mod expect these natives to be present on my system, or should they be included in the mod?
Edit: Actually I see that these files are indeed present in the jar file, so this issue just became especially strange.

please run the game with -Djna.debug_load=true JVM argument

sorry to be a bother but could you still do this? with the version that crashes i have a hunch your update is only a workaround for your setup

As requested: https://gist.github.com/topsyandpip56/94f1527be401b26891ddee90f3ef6582

and the log output from the console in multimc if you can

https://gist.github.com/topsyandpip56/c64f0be4cca079f0d0ff1268d88de165

commented

@topsyandpip56 please test this version of the mod and send me the logs:
voicechat-fabric-1.18.2-2.2.33-pre1.zip

commented

Perfect, thanks for helping us with this!

commented
commented

No problem - thanks for fixing it! There's plenty of devs out there who will assign a Linux specific bug the lowest possible priority or simply throw out a "you're on your own".

commented

@mjwells2002 is using linux, so linux issues are treated equally to windows.
I also think linux is a great operating system and with neglecting these issues, the current linux desktop situation won't improve :D

commented

No problem - thanks for fixing it! There's plenty of devs out there who will assign a Linux specific bug the lowest possible priority or simply throw out a "you're on your own".

this is also the second time we have seen this exact same crash & we were not able to solve it that time sadly

commented

We encountered a similar problem running the mod on an OS X system that is limited to OS X 10.13. We happily run the mod across a variety of architecture, but this particular system kept throwing an error related to opus, despite the system trundling along happily playing 1.18.2, Fabric, and pretty much every other mod we throw at it.

Our solution has been to revert that one computer to 2.2.32 (i.e. pre-opus upgrade) and it's been happy since, and the voice chat is confirmed working in local and networked environments with voice activation.

commented

The problem you are describing is not related to this issue. It's this one: #398

You can completely ignore that error, since the mod is falling back to a non-native opus implementation.
Unfortunately we can't build opus for an older MacOS version, since the GitHub runners don't have any older versions.

commented

Ah, didn't see that bug, but that does look more like it. Thanks for the quick response.