OxygenCobalt / Auxio

A simple, rational music player for android
GNU General Public License v3.0
1.78k stars 117 forks source link

Freeze/crash when player is hot-reloaded #723

Closed 5x44 closed 2 months ago

5x44 commented 2 months ago

Describe the Bug/Crash

  1. Download Auxio;
  2. Download Automatag (or any tag editor);
  3. Open Auxio;
  4. Play a song after setting up the app;
  5. Open Automatag;
  6. Find the currently playing track, change a word in the artist name, and save;
  7. Open Auxio/settings/refresh or rescan music;
  8. Return to the main screen;
  9. Tap the playback window;
  10. Tap on the artist's name.\ \ The app will freeze but will continue playing the song or it will close.\ \ Edit: The same bug can be reproduced by adding a new song from an artist that is being played and refresh/rescan music

Describe the intended behavior

The app freezes after changing the artist name or metadata of a track while it is playing, I discovered the bug after modifying the name of the artist Grover Washington, Jr. on the track "In The Name of Love" as the app confuses the name as if it were from two artists.

What android version do you use?

Android 13

What device model do you use?

Samsung A32 - One UI 5.1

Bug report

File's too big, 27MB

Duplicates

OxygenCobalt commented 2 months ago

I am unable to reproduce this. I assume it's an issue with hot reloading exoplayer with a specific renderer, because OEM's can't make their media decoders work consistently. Can you please provide the bug report file `bugreport---.txt" file that is present in the bug report ZIP file @5x44?

OxygenCobalt commented 2 months ago

I was successfully able to reproduce the issue of changing artist tags and then clicking on the artist. However, I am not able to reproduce any freezing. At the same time though, I randomly also experienced a freezing issue without any changes to the music library, so there is an unrelated deadlock somewhere.

5x44 commented 2 months ago

I recreated the bug and it works again, one detail that i missed mention, i'm using Auxio 3.4.0 (F-Droid Build), i didn't find the "bugreport.txt" but i've finded "dumpcat.txt" through 'Interactive Report' here is the file: bugreport_only_dumpstate.zip

OxygenCobalt commented 2 months ago

Alright, I am getting a better grasp of the issue now. It's a consequence of some really bad state restore code. The freezing though I think is an entirely other deadlock issue stemming from the new state restore functionality.