CraftWorksMC/Chora

java.lang.NullPointerException: thisBitrate must not be null

Closed this issue · 5 comments

Hi, thank you for publishing this project!

I wanted to give it a try, but unfortunately it immediately crashes upon launch. I am on LineageOS 18.1 (Android 11), using the latest version of Chora available in the PlayStore (1.11(11)). Let me know if you need more information.

01-18 16:50:53.189  5425  5425 D AndroidRuntime: Shutting down VM
01-18 16:50:53.190  5425  5425 E AndroidRuntime: FATAL EXCEPTION: main
01-18 16:50:53.190  5425  5425 E AndroidRuntime: Process: com.craftworks.music, PID: 5425
01-18 16:50:53.190  5425  5425 E AndroidRuntime: java.lang.NullPointerException: thisBitrate must not be null
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at k6.v.f(Unknown Source:247)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at k6.s.onActivityStarted(Unknown Source:222)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at android.app.Activity.dispatchActivityStarted(Activity.java:1352)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at android.app.Activity.onStart(Activity.java:1833)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1435)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at android.app.Activity.performStart(Activity.java:8018)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3457)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:223)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7664)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
01-18 16:50:53.190  5425  5425 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
01-18 16:50:53.193  1324  5370 W ActivityTaskManager:   Force finishing activity com.craftworks.music/.MainActivity

Are you using local storage or a Navidrome / Subsonic server?
Sorry i didn't notice your issue before, GitHub didn't send me a notification.

I want to use my Navidrome v0.50.1 server. However, I did not enter the server URL or anything, the crash happens earlier. Steps to reproduce:

  1. Download and install app
  2. A pop-up asks for photo and media permission, answer 'Allow'
  3. Go to settings inside Chora
  4. Tap on "Use Navidrome Server" -> The app crashes immediately.

After this point, it is not possible anymore to open the app without reinstalling it.

Mh, and if you disable media permissions in settings, does it still crash? i haven't been able to reproduce it on my phone (paranoid android rom, android 13). I'll get an android 11 device to test with

If I disable the media permission it doesn't crash anymore.

Alright, i might've tracked down the issue. tomorrow I'll release an update to the play store.