-
-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Large queues cause extreme lag/out-of-memory crashes #842
Comments
Sorry |
Where does it specifically lag @Wjxfi? |
everywhere, when I turn on music it lags and just interrupts constantly sometimes the application crashes altogether @OxygenCobalt |
Screen recording @Wjxfi? |
Ok soon |
it only starts if you wait a long time and only then click on the song, otherwise it crashes |
@OxygenCobalt for u :3 |
Is there an older version that doesnt do this @Wjxfi? |
Well, it didn't lag before, but I don't remember which version. Maybe it's because I added more songs. |
Can you try old versions @Wjxfi? Find the latest one that worked. |
Sorry, I can't roll back without losing playlist data and more. long correction: there are more than two dozen of them. I'm 90% sure that everything worked 95% better than in this version - in version 3.5.0. more likely. on 3.4.3 I think everything worked for sure. @OxygenCobalt |
Can you not export all of your playlists and try 3.4.3 just in case? |
Most likely it's a matter of the latest update. in f-droid after 3.5.0 comes 3.5.2 |
I cannot resolve your issue without a good idea of the changes that broke it. Please test older versions, just export your playlists. |
i have more than 45 playlists but i still decided to do it. and lol when i try to export at least one with both methods my app crashes |
I'm sure it's because of the last update and its changes. I could export normally before. @OxygenCobalt |
Can you take a bug report when these crashes happen @Wjxfi |
ok I'll try to do that |
I'm sure it's because of the last update and its changes. I could export normally before. @OxygenCobalt
export crash log |
You cannot export to the downloads folder, Auxio cannot handle those paths. Try another folder @Wjxfi |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Okey wait @OxygenCobalt |
into another regular folders it says that it is impossible to export |
Please stop spamming me to get my attention @Wjxfi. Does a folder like |
Most I can tell from your logs @Wjxfi is that Auxio is using a lot of memory and struggling to garbage collect. What phone do you use? Either Auxio has a memory leak or your phone has so little memory that it simply cannot keep your library in-memory. |
Yes |
Before the update everything worked and I have enough space. @OxygenCobalt |
Okay @Wjxfi, I will be sending you several APKs soon to test that will allow me to track when this issue developed. Please wait. |
I was slightly confused to see #825 set to duplicated of issue 842 here. Am I understanding correctly that the crash logs I sent in 825 have changed over the testing period? For me the behavior still feels like a crash. But maybe it is a lag (or rather memory issue), which is causing the crash? Do you have an idea how to tackle the remaining memory issue? Not a major issue, since I can fallback to album or artist view, but song view is mostly unusable currently. |
Yes @foss-, the issue changed from me failing to go foreground to something apparently allocating way too much memory. Since I cannot reproduce this, I must bisect and generate builds from various steps of the 3.5.0 development process (with the patched foreground behavior) so that I can see if the memory issue was introduced with media3 or not. Currently I don't know, since I'm 90% sure that pre-media3 debug build had the foreground glitch still in there. |
I tested old versions to check whether 3.4.3 worked reliable. It does play tracks from Songs Category and while working rather reliably, after having Auxio open over nighty and then selecting another track from Songs it also crashed. Not sure if that is the same problem though. But after re-opening playing tracks from Songs again was possible. |
Can you take a bug report if it happens again @foss-? It might be that memory issue. |
Android bug report contains a bit too much personal data for my taste and is impossible to sanitize. 3.4.3 crashing when tapping song from songs category:
3.5.2 crashing when tapping song from songs category (it crashed on first tap, while 3.4.3 played a few songs and only crashed when tapping speed was increased:
|
There's no crash in the 3.4.3 report, is there any error messages from |
How would I access that? I tried to find relevant bits in logcat but can retry if those are missing. I tried that as no crash log was presented.The app closed itself while tapping songs from songs category. |
Okay @foss-, that means:
|
fair, do you need additional debug output or is the 3.5.2 crash sufficient? |
No, I need a crash for 3.4.3 @foss-. Regardless, since it didn't insta-crash on playback that must mean something decided to start consuming way more memory in 3.5.0. My guess is media3, because media3 has had these issues before. |
Does this include the relevant part you are looking for? This is 3.4.3 closing while being in foreground, playing a track and selecting another track from songs category. Please download if so, will vanish in 1 week: https://bin.disroot.org/?5a8167083cd4e27c#DXBdmkyxjd65uX3s8bEzEErAySEqfDX7iKtCZM3FKnDJ |
So this has existed before @foss-. It seems to be a fundamental memory issue with ExoPlayer. I think I might need to benchmark Auxio's behavior on my end by multiplying out my songs library into a huge queue and seeing what happens. If you want, keep trying older versions until the memory issue disappears (if at all). This might help me track it down better. |
So I went and tested an artificial 16k-song queue on dev and it worked just fine @foss-, so either my phone just has more memory, I don't have enough songs, or there's something device specific going on. |
So, I think the fundamental issue I'm facing here is that at libraries of @foss- and @Wjxfi's scale, and on weak/janky enough devices, Auxio's idea of reducing latency through hosting everything in-memory completely and utterly breaks down, especially now that I have to mirror everything through Media3 and how it can stack even more of it's own memory use on. The fundamental issue though is that moving to a latency-first model also is pretty bad, it destroys any idea of snappiness unless I put an obscene amount of hours into UI retooling. And Media3 will always be a crazy memory and CPU hog until they somehow fix that or I force-revert to MediaBrowserService (which is actually extremely tempting given how poorly the Media3 move has gone so far...) I frankly have no clue what to do here. |
3.5.3 crashes (expected) Randomly tested 3.1.1 by just picking an old build and found response when playing tracks from Songs category is overall much more responsive. No choppy or briefly stuck sound, no lag after selecting a track for a few seconds before playback begins. I am unable to provoke a crash when quickly tapping various tracks from songs category AND I am unable to provoke a crash when using shuffle in the songs category. |
Okay @foss-, can you keep trying newer versions (3.2, 3.3) until things destabilize? This will get me a good idea of what the problem actually is. |
I heard from others that ExoPlayer's gapless playback support might also cause OOMs since big MediaItem queues can trigger way too many pending tasks. In that case I might have to make that a toggle. |
3.5.x: NOT OK |
Yep. It's gapless playback @foss-. That was the entire issue. The entire time. Probably @Wjxfi's problem too. Still going to dumpster Media3's session functionality since I really dislike working with it and it provides zero tangible benefits. I need to check if there's any natural mitigation for this from the Media3 developers. Otherwise I'm going to have to either make gapless playback a setting, or dynamically turn it off when a queue is bigger than some arbitrary amount. |
Okay, judging by discussions with maintainers I will need to make a setting for gapless playback to resolve the instability issue, at least until the media maintainers can introduce a paging-capable player. |
Rolling into #957. |
remove the lags please, it's impossible to use, okie ? optimize
The text was updated successfully, but these errors were encountered: