Rocket Player "Randomly Stopping" Issues
Rocket Player 'Randomly Stops'
Recently, Rocket Player has been battling several different issues causing it to "Randomly Stop". Chris and I answer several emails a day where this is the case, and at this point, I'd like to cover this a little more in-depth. Before the deep dive, let me give you the quick summary.
- Update Rocket Player
- Many issues are solved by updating to Rocket Player 22.214.171.124 or higher. We hope to have this version fully rolled out be mid-August 2015. Join our beta program to get this version now.
- Rocket Player 126.96.36.199 has an issue with the "Duck" focus option. Please use the "Pause" focus option, which is the default, until your version is higher than 188.8.131.52.
- Android 5.0
- Android 5.0 seems to have some underlying issues that cannot always be solved. We've reproduced this issue in other music players. Samsung's own player isn't affected by this.
- Android 5.1
- So far, Android 5.1 with Rocket Player 184.108.40.206 or higher seems to perform much better than Android 5.0
- Device Memory
- Rocket Player can always be killed by the system when running in the background. How much free memory is always a factor. If you have a device such as a Moto G with 1GB of RAM and browse the web with 15 Chrome tabs, the system will eventually kill Rocket Player. Android makes no guarantees if you are not actively looking at an app.
- Battery Savers
- Rocket Player can be killed when a battery saver is used. Many device manufacturers have added this feature on Android 5.0 and later. Often times, your device will "switch to battery-saving mode" at a certain battery percentage. If you have a battery saving feature enabled, it can kill Rocket Player.
Rocket Player 220.127.116.11
Not much to say here. I made some mistakes and had bugs that shouldn't exist. For Rocket Player 18.104.22.168, I re-wrote a bunch of code to ensure that if Rocket Player randomly stops, it is because the Android system kills us, or an audio engine crash occurs. For the most part, I think this new code works. I've only found one new issue, which is with the alternative ducking focus.
Nothing to add either.
OK. Android 5.0. Galaxy S6. I'm looking at you. Why are you constantly out of memory? Using a USB cable and Android Debug Bridge (adb), I was constantly gathering data on my Galaxy S6 to figure out why after about 45 mins of playing, a notification would kill Rocket Player. Here is the command that I used "adb shell dumpsys activity processes > tmp.txt". This command generates a tmp.txt file with the system's priority for killing processes. From that information I could see two things. The first is that the system was always stressed. Most processes had a "trim level" of 15, which means the system has warned all processes that it is low on memory and heads will roll if memory usage isn't dropped. The second thing I noticed is that Rocket Player's priority was dropped below ten or fifteen processes. Despite being a foreground process actively playing music, the system decided that Rocket Player wasn't more important than Google Quick Search, Notification Reading Services, Google Play Services and much more. So after thirty plus minutes of playing music, a text message would come in a create memory pressure, then the system would say "hey, that Rocket Player app isn't important, let's kill it so that the text messaging app can load." I have concluded that this issue isn't my fault. I started other music players, and they were all ordered in the list with the same priority and they, like Rocket Player, would be killed once the system just ran out of RAM. The worst part of all this is that the S6 has tons of memory. Rebooting the phone is the only temporary work around I have for this issue.
Luckily, Android 5.1 seems to be doing much better, so I'm keeping my fingers crossed that the whole OS is just taking less RAM in Android 5.1. When I view the "adb shell dumpsys activity processes > tmp.txt" command with Android 5.1, Rocket Player is still lower in the priority list than I'd expect, BUT the system isn't under any stress, with all the same apps installed. Perhaps this will change when I don't reboot for a couple of weeks, but it is a good start.
Now for the sad, true part. No matter your version of Android, some Android apps (i.e. Chrome) set flags that give them access to tons and tons of RAM. If you run enough programs that take up enough RAM, Rocket Player can eventually be killed. That is just a fact of life. Now, to be perfectly clear, we want to hear from you. Email [email protected] if you are seeing Rocket Player randomly stop, don't assume that this is your issue. With a log file, we can usually diagnose what is happening, and if it isn't a low memory situation, we can see if I've just made another coding error. So let us know if you are still seeing Rocket Player randomly die while you are listening to music.-Justin