CappielloAntonio / tempo

An open source and lightweight music client for Subsonic, designed and built natively for Android.
GNU General Public License v3.0
1.06k stars 49 forks source link

Consistently crashing #21

Closed gradation0746 closed 1 year ago

gradation0746 commented 1 year ago

Pixel 7 - GrapheneOS Version: 2023072600 Tempo Release v.3.4.7

Part of my music library is in WAV format which seems to cause the app to crash. I've attempted to play several WAV tracks and the app will crash, I go to reopen the app and it will immediately crash again. I will uninstall, reinstall, and successfully play an MP3 track. As soon as I attempt to play a WAV track, the app will crash again.

Here is the crash report I get:

type: crash
osVersion: google/panther/panther:13/TQ3A.230705.001/2023072600:user/release-keys
package: com.cappielloantonio.tempo:14
process: com.cappielloantonio.tempo
processUptime: 144314 + 392 ms
installer: com.android.packageinstaller

java.lang.NullPointerException: Attempt to read from field 'androidx.media3.common.n$b[] androidx.media3.common.n.k' on a null object reference in method 'void o5.f.b0(androidx.media3.common.y)'
    at o5.f.b0(MediaService.kt:74)
    at p1.q.b(R8$$SyntheticClass:38)
    at j1.l.run(R8$$SyntheticClass:189)
    at j1.m.b(ListenerSet.java:58)
    at p1.y.p1(ExoPlayerImpl.java:893)
    at c0.g.run(R8$$SyntheticClass:941)
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7940)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ExecInit.main(ExecInit.java:49)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)
CappielloAntonio commented 1 year ago

Hello, if i pass you an unsigned apk could you reproduce the crash and give me the crash log? Unfortunately with the signed apk also the log information is obfuscated and in this state it is of little use to me.

app-tempo-debug.zip

gradation0746 commented 1 year ago

Sure thing. Installed, same behavior. Here's the crash log:

type: crash
osVersion: google/panther/panther:13/TQ3A.230705.001/2023072600:user/release-keys
package: com.cappielloantonio.tempo:14
process: com.cappielloantonio.tempo
processUptime: 2070 + 144 ms
installer: com.android.packageinstaller

java.lang.NullPointerException: Attempt to invoke virtual method 'int androidx.media3.common.Metadata.length()' on a null object reference
    at com.cappielloantonio.tempo.util.ReplayGainUtil.getReplayGains(ReplayGainUtil.java:41)
    at com.cappielloantonio.tempo.util.ReplayGainUtil.setReplayGain(ReplayGainUtil.java:18)
    at com.cappielloantonio.tempo.service.MediaService$initializePlayerListener$1.onTracksChanged(MediaService.kt:250)
    at androidx.media3.exoplayer.ExoPlayerImpl.lambda$updatePlaybackInfo$17(ExoPlayerImpl.java:2061)
    at androidx.media3.exoplayer.ExoPlayerImpl$$ExternalSyntheticLambda3.invoke(Unknown Source:4)
    at androidx.media3.common.util.ListenerSet$ListenerHolder.invoke(ListenerSet.java:339)
    at androidx.media3.common.util.ListenerSet.lambda$queueEvent$0(ListenerSet.java:223)
    at androidx.media3.common.util.ListenerSet$$ExternalSyntheticLambda1.run(Unknown Source:6)
    at androidx.media3.common.util.ListenerSet.flushEvents(ListenerSet.java:245)
    at androidx.media3.exoplayer.ExoPlayerImpl.updatePlaybackInfo(ExoPlayerImpl.java:2115)
    at androidx.media3.exoplayer.ExoPlayerImpl.handlePlaybackInfo(ExoPlayerImpl.java:1948)
    at androidx.media3.exoplayer.ExoPlayerImpl.lambda$new$1$androidx-media3-exoplayer-ExoPlayerImpl(ExoPlayerImpl.java:331)
    at androidx.media3.exoplayer.ExoPlayerImpl$$ExternalSyntheticLambda15.run(Unknown Source:4)
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7940)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)
CappielloAntonio commented 1 year ago

Thank you so much, you've been really helpful. Now the log is more "talkative". And as we can see there is some problem with the ReplyGain.

To your knowledge the track is properly tagged?

However, a check on the presence of tags does not hurt.

gradation0746 commented 1 year ago

Thank you so much, you've been really helpful. Now the log is more "talkative". And as we can see there is some problem with the ReplyGain.

To your knowledge the track is properly tagged?

However, a check on the presence of tags does not hurt.

Are you referring to metatags?

CappielloAntonio commented 1 year ago

Could you kindly test this version of the application? If it's a problem to uninstall the previous version I can pass you a new app with a different signature.

And yes, I was referring to track meta tags.

app-tempo-debug.zip

gradation0746 commented 1 year ago

Could you kindly test this version of the application? If it's a problem to uninstall the previous version I can pass you a new app with a different signature.

And yes, I was referring to track meta tags.

app-tempo-debug.zip

This version is playing tracks correctly.

CappielloAntonio commented 1 year ago

Thanks so much for your patience.