Null pointer crash


About twice a day Audiorelay crases because of null pointer exception. Server is running on Win10 21H1 and client is an android phone. They are connected via a LAN and not USB tethered.

This started happening after I upgraded the Audiorelay server to the latest version.

Log excerpt:

2022-07-08 17:11:53,312 INFO Remote device connected:
2022-07-08 17:11:53,324 INFO Received client config, clientVersion: 0.25.5, os: ANDROID, osVersion: Android API 30
2022-07-08 17:11:53,336 INFO Asking backend to start capture. EventSync: true, ContinuousStream: true, AudioConfig: AudioConfig(sampleRate=48000, bits=16, channels=2), AudioDevice: Speakers (2- USB Audio CODEC ), 
2022-07-08 17:11:53,845 INFO Audio pipeline is emitting values
2022-07-08 17:36:22,399 ERROR Stopping the session due to an error
s40: null
	at r40.a(SourceFile:2) ~[audiorelay.jar:?]
	at FD0.a(SourceFile:52) ~[audiorelay.jar:?]
	at C90.b(SourceFile:5) [audiorelay.jar:?]
	at l90.a(SourceFile:112) [audiorelay.jar:?]
	at [audiorelay.jar:?]
	at [audiorelay.jar:?]
	at [audiorelay.jar:?]
	at [audiorelay.jar:?]
	at [audiorelay.jar:?]
2022-07-08 17:36:22,401 INFO Remote device disconnected:
2022-07-08 17:36:22,403 INFO Asking backend to stop capture...


Android 11
Xiaomi Redmi 5G
AudioRelay 0.25.5

Windows 10
AudioRelay 0.25.5

This exception is raised when there’s a network issue but, it shouldn’t be fatal. The Android app should automatically try to reconnect for a few minutes.

When you say crash, does that mean that the Desktop app completely shutdowns and, you have to restart it?
If so, isn’t there more logs than what you’ve posted?

If the Desktop app is still running, we could check why the Android app stops retrying to connect.
Getting the logs is a bit more involved:

The Android app doesn’t store log messages itself so using ADB is necessary.
You would need to do these steps:

  • Get ADB and enable USB debugging
  • Open a terminal
  • Confirm that your device is available via the command adb devices
  • Type adb logcat --clear to remove all the previous logs
  • Type adb logcat > logcat-output.txt to write the new logs to a file
  • In the Android App, connect normally
  • Wait until the Android app stops working
  • In the terminal, stop the log collection by doing CTRL C
  • Post the logcat-output.txt file here