crackededed / Xtra

Xtra is a Twitch player and browser for Android.
GNU Affero General Public License v3.0
1.25k stars 48 forks source link

Bug: Do not let user save certain buffer settings that causes crashes. #582

Open Fjara-h opened 1 day ago

Fjara-h commented 1 day ago

There is no feedback from the app or system upon crashing or inputting values in the buffer settings that loading a stream with them cause problems. I only checked this via usb debugging using:

adb logcat --buffer=crash 

I've encountered the below exceptions, however more testing should be done to determine which other settings and values will cause this crash. These occured on different runs, the first was when Min Buffer was less than Buffer for playback, and the second was when Min Buffer was less than Rebuffer

java.lang.RuntimeException: Unable to create service com.github.andreyasadchy.xtra.ui.player.PlaybackService: java.lang.IllegalArgumentException: minBufferMs cannot be less than bufferForPlaybackMs

java.lang.RuntimeException: Unable to create service com.github.andreyasadchy.xtra.ui.player.PlaybackService: java.lang.IllegalArgumentException: minBufferMs cannot be less than bufferForPlaybackAfterRebufferMs

Alternatively changing the way the setting is chosen (like a two-sided slide bar) could help alleviate the need to do checking, but it may get too complicated with more than 2 settings it would affect.