j-fbriere / squawker

An open-source privacy oriented Twitter/X client
MIT License
799 stars 16 forks source link

App crashes while trying to play a video - android.os.DeadObjectException #328

Open M4K14 opened 1 week ago

M4K14 commented 1 week ago

Checklist

Affected version

3.8.3

Steps to reproduce the bug

1.open the app

  1. play a video

Expected behavior

video should be played

Actual behavior

app crashes with an 'unfortunately the app has stopped' pop-up!

Screenshots/Screen recordings

No response

Logs

after using adb command adb logcat -b all -v time -d | grep exception -i it shows that there are some android.os.DeadObjectExceptions happening in the background.

Affected Android/Custom ROM version

Android 6

Affected device model

LG G4

Additional information

I tried clearing the app's data and cache and uninstalling it and installing it again, but the problem still persisted. After downgrading to the previous 3.8.2 version, the problem was solved!

M4K14 commented 1 week ago

I guess I could find the source of this problem! There's another open source app called "Infinity For Reddit" that suddenly started to show the same sign: crashes after playing a video. I did my research and I noticed that there were some "Exoplayer exceptions" in the ADB log as well.

After reading this dude and checking the commit that he mentioned, and the solution he suggested which is compiling the apk with def exoplayerVersion = "1.3.0-rc01" i'm now pretty sure that the same thing is happening with Squawker as well.

I hope it helps and the problem is fixed in the future releases

j-fbriere commented 1 week ago

Could you give the exact printout of your adb log with the exoplayer exceptions?

M4K14 commented 1 week ago

Sure

E/AndroidRuntime(15284): FATAL EXCEPTION: ExoPlayer:Playback
W/System.err( 2504): android.os.DeadObjectException
W/System.err( 2504): android.os.DeadObjectException
E/flutter (15812): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(VideoError, Video player had error t.n: Unexpected runtime error, null, null)
M4K14 commented 1 week ago

infinity solved its issue with a decoder fallback when playing videos in this update. you probably can consider a fallback as well to solve this issue