Plasmo Voice

Plasmo Voice

2M Downloads

NullPointerException when connected causes reconnect loop

zachbryant opened this issue ยท 2 comments

commented

PV version: 2.0.10
Java version: 21
Loader: Fabric 0.15.11 (mc 1.20.4)
Logfile: latest.log
Client config: client.toml.txt
Server config: config.toml.txt (uses 0.0.0.0, unable to connect with dedicated IP)

What I'm seeing is a successful connection followed by NPEs, disconnection, and reconnection. I haven't been able to get it to stay connected consistently due to this. My UDP ports are enabled. Another thing I noticed is how the microphone/headphones options alternate from the right value to "Not Available".

Here is a snippet of the error:

[17:17:01] [Voice Audio Capture/WARN]: Failed to fire an event:
[17:17:01] [Voice Audio Capture/INFO]: [STDERR]: java.lang.reflect.InvocationTargetException
[17:17:01] [Voice Audio Capture/INFO]: [STDERR]: 	at jdk.internal.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
[17:17:01] [Voice Audio Capture/INFO]: [STDERR]: 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[17:17:01] [Voice Audio Capture/INFO]: [STDERR]: 	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
[17:17:01] [Voice Audio Capture/INFO]: [STDERR]: 	at su.plo.voice.event.VoiceEventBus.lambda$register$1(VoiceEventBus.java:106)
[17:17:01] [Voice Audio Capture/INFO]: [STDERR]: 	at su.plo.voice.event.VoiceEventBus.call(VoiceEventBus.java:51)
[17:17:01] [Voice Audio Capture/INFO]: [STDERR]: 	at su.plo.voice.client.audio.capture.VoiceAudioCapture.run(VoiceAudioCapture.java:290)
[17:17:01] [Voice Audio Capture/INFO]: [STDERR]: 	at java.base/java.lang.Thread.run(Unknown Source)
[17:17:01] [Voice Audio Capture/INFO]: [STDERR]: Caused by: java.lang.NullPointerException: Cannot read the array length because "floats" is null
[17:17:01] [Voice Audio Capture/INFO]: [STDERR]: 	at su.plo.voice.api.util.AudioUtil.floatsToShorts(AudioUtil.java:60)
[17:17:01] [Voice Audio Capture/INFO]: [STDERR]: 	at su.plo.voice.client.audio.filter.NoiseSuppressionFilter.process(NoiseSuppressionFilter.java:56)
[17:17:01] [Voice Audio Capture/INFO]: [STDERR]: 	at su.plo.voice.client.audio.device.BaseAudioDevice.processFilters(BaseAudioDevice.kt:62)
[17:17:01] [Voice Audio Capture/INFO]: [STDERR]: 	at su.plo.voice.client.gui.settings.MicrophoneTestController.onAudioCaptureProcessed(MicrophoneTestController.java:82)
commented

Issue looks present in 2.0.8 as well. Can't downgrade any further

commented

NPEs are not the cause of reconnects but rather the result of them. Probably, reconnects are being handled poorly, causing everything to break. I'll try to investigate this issue. You can also try to test 2.1.0-SNAPSHOT, but I'm not sure it'll help

I can't say much about reconnects. Connection issues are hard to troubleshoot, and I usually don't help with them
My guess is that your hosting provider is blocking outgoing UDP packets for some reason, because the incoming packet from the client is being processed