vhaudiquet / BladePlayer

Android music player that plays from multiple sources
Apache License 2.0
187 stars 14 forks source link

App crashing all the time #36

Open primski opened 10 months ago

primski commented 10 months ago

Hello, I love this app, truly one of the best out there but I have a problem on my phone, it keeps crashing, i'd like to learn why.

The things i suspect are either RAM related since my phone isn't the best, it only has 4GB of RAM or network, maybe it doens't prebuffer all that well and crashes if network runs out? Even though, it happens both on 4G and wifi.

I tried cloning your repo locally and opening it up in Android Studio and then used the DEBUG tool to install the debug version and to see the logs, but it didn't work .. it didn't want to add sources, perhaps there are some settings missing?

Anyway, if there's any ideas out there, i'd appreciate it.

my phone: Moto G13 Android 13

I use Spotify source

I have enabled "unoptimized" battery for this app so it "shouldn't" kill it but who knows what Android is doing under the hood

when it crashes, i open it back up and then it says "No sources available" when you press play ... so then I have to go out of the app and go into "App Info", Force close it, reopen and then play ... and this happens only after a few songs. Sometimes quicker sometimes takes a bit longer ...

not sure what else to check? thanks!

vhaudiquet commented 9 months ago

Hello,

I tried cloning your repo locally and opening it up in Android Studio and then used the DEBUG tool to install the debug version and to see the logs, but it didn't work .. it didn't want to add sources, perhaps there are some settings missing?

This is normal, the Spotify API has very strict rules about APK signatures : only the packages signed by my key can access the API. If you want to debug yourself and add a source, you must create a Spotify developer account, create a project for this, and add your debug key to this project. It really is complicated, and I can't do anything about it, sorry :(

The things i suspect are either RAM related since my phone isn't the best, it only has 4GB of RAM

In theory, it should work fine (and my phone only has 6Gb)

However, i guess that if it works fine while you're on the app, but crashes when you put it in background, then that is the cause of the crash.

To be honest, I never understood how to notify well to the system that it shouldn't kill the app while it is playing music. I've never done Android development professionally, and I'm not the most experienced developer with that. I can always test on my phone, but it never crashes like this. I don't have many test equipment or automatic bug report sending, so it is really difficult for me to debug that.

Like you said :

I have enabled "unoptimized" battery for this app so it "shouldn't" kill it but who knows what Android is doing under the hood

I wish I could help you more, but nowadays I don't really have much time to spend on the app, sorry :(

I plan to make a safer/cleaner rewrite when I get the time though, which should help me get rid of the issues of this version :) I don't have a timeline at all though.

primzele commented 8 months ago

hey thanks a lot for the info!

i've debugged this a bit further and here are my findings ...

i tried one of them "keep screen on" apps so i can keep the app running at all times

it still hangs though with "this app closed unexpectedly" after a while. sometimes sooner sometimes later.

also happens when connected to home wifi so network shouldn't be an issue.

i will open spotify dev account next and see if i can get some logs out of it, maybe it's something obvious...

anyway, thanks again, have a nice day.