Closed OxygenCobalt closed 1 year ago
Additional people: @e-zk @Gateway31
yes, will get to it soon when im on wifi and not cellular
@OxygenCobalt after selecting "refresh music" in settings I get a "Music Loading Failed" message box. When I hit the "Retry" button it does the scanning thing and nothing changes, the error message stays.
Force stop and reopen doesn't fix it.
Doing a complete rescan by selecting "rescan music" however seems to get the message box to go away.
So seems like "refresh music" is just broken on my device?
Definitely seems like the cache is broken. Can't reproduce on my device. Care to get a stack trace @e-zk?
If you don't know how, you can follow these steps:
If I were to guess, it's because I'm putting the cache data in the cache directory for my app, which may be unstable. If that's the case, I'll have to move it to app storage, which is not "correct" but also the only way I'll get it working.
@OxygenCobalt relevant lines from my logcat:
12-30 13:26:13.943 7532 19098 E Auxio.Indexer: Music indexing failed
12-30 13:26:13.943 7532 19098 E Auxio.Indexer: java.lang.NumberFormatException: For input string: ""
12-30 13:26:13.943 7532 19098 E Auxio.Indexer: at java.lang.Integer.parseInt(Integer.java:757)
12-30 13:26:13.943 7532 19098 E Auxio.Indexer: at java.lang.Integer.parseInt(Integer.java:865)
12-30 13:26:13.943 7532 19098 E Auxio.Indexer: at org.oxycblt.auxio.music.extractor.ParsingUtilKt.parseId3v1Genre(ParsingUtil.kt:10)
12-30 13:26:13.943 7532 19098 E Auxio.Indexer: at org.oxycblt.auxio.music.Song.<init>(Music.kt:1126)
12-30 13:26:13.943 7532 19098 E Auxio.Indexer: at org.oxycblt.auxio.music.system.Indexer$buildSongs$2.invokeSuspend(Indexer.kt:35)
12-30 13:26:13.943 7532 19098 E Auxio.Indexer: at org.oxycblt.auxio.music.system.Indexer$buildSongs$2.invoke(Indexer.kt:13)
12-30 13:26:13.943 7532 19098 E Auxio.Indexer: at org.oxycblt.auxio.music.extractor.MetadataExtractor.parse(MetadataExtractor.kt:270)
12-30 13:26:13.943 7532 19098 E Auxio.Indexer: at org.oxycblt.auxio.music.extractor.MetadataExtractor$parse$1.invokeSuspend(Unknown Source:12)
12-30 13:26:13.943 7532 19098 E Auxio.Indexer: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
12-30 13:26:13.943 7532 19098 E Auxio.Indexer: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:107)
12-30 13:26:13.943 7532 19098 E Auxio.Indexer: at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:12)
12-30 13:26:13.943 7532 19098 E Auxio.Indexer: at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:3)
12-30 13:26:13.943 7532 19098 E Auxio.Indexer: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:82)
12-30 13:26:13.993 7532 7532 W View : requestLayout() improperly called by android.widget.LinearLayout{5e4304f V.E...... ......ID 0,607-1080,3007 #7f0a0203 app:id/queue_sheet} during layout: running second layout pass
12-30 13:26:13.993 7532 7532 W View : requestLayout() improperly called by androidx.coordinatorlayout.widget.CoordinatorLayout{2ee3aae V.E...... ......ID 0,607-1080,3007 #7f0a01ee app:id/playback_sheet} during layout: running second layout pass
12-30 13:26:14.027 7532 19040 W Auxio.Covers: Unable to extract album cover due to an error: kotlinx.coroutines.JobCancellationException: DeferredCoroutine was cancelled; job=DeferredCoroutine{Cancelling}@bc86c01
12-30 13:26:14.027 7532 19117 W Auxio.Covers: Unable to extract album cover due to an error: kotlinx.coroutines.JobCancellationException: DeferredCoroutine was cancelled; job=DeferredCoroutine{Cancelling}@f047aa6
12-30 13:26:14.027 7532 19117 W Auxio.Covers: Unable to extract album cover due to an error: kotlinx.coroutines.JobCancellationException: DeferredCoroutine was cancelled; job=DeferredCoroutine{Cancelling}@f047aa6
12-30 13:26:14.027 7532 19117 W Auxio.Covers: Unable to extract album cover due to an error: kotlinx.coroutines.JobCancellationException: DeferredCoroutine was cancelled; job=DeferredCoroutine{Cancelling}@f047aa6
12-30 13:26:14.027 7532 19117 W Auxio.Covers: Unable to extract album cover due to an error: kotlinx.coroutines.JobCancellationException: DeferredCoroutine was cancelled; job=DeferredCoroutine{Cancelling}@f047aa6
12-30 13:26:14.027 7532 19117 W Auxio.Covers: Unable to extract album cover due to an error: kotlinx.coroutines.JobCancellationException: DeferredCoroutine was cancelled; job=DeferredCoroutine{Cancelling}@f047aa6
12-30 13:26:14.027 7532 19117 W Auxio.Covers: Unable to extract album cover due to an error: kotlinx.coroutines.JobCancellationException: DeferredCoroutine was cancelled; job=DeferredCoroutine{Cancelling}@f047aa6
12-30 13:26:14.027 7532 19117 W Auxio.Covers: Unable to extract album cover due to an error: kotlinx.coroutines.JobCancellationException: DeferredCoroutine was cancelled; job=DeferredCoroutine{Cancelling}@f047aa6
12-30 13:26:14.027 7532 19117 W Auxio.Covers: Unable to extract album cover due to an error: kotlinx.coroutines.JobCancellationException: DeferredCoroutine was cancelled; job=DeferredCoroutine{Cancelling}@f047aa6
12-30 13:26:14.027 7532 19117 W Auxio.Covers: Unable to extract album cover due to an error: kotlinx.coroutines.JobCancellationException: DeferredCoroutine was cancelled; job=DeferredCoroutine{Cancelling}@f047aa6
12-30 13:26:14.027 7532 19117 W Auxio.Covers: Unable to extract album cover due to an error: kotlinx.coroutines.JobCancellationException: DeferredCoroutine was cancelled; job=DeferredCoroutine{Cancelling}@f047aa6
12-30 13:26:14.029 7532 19104 W Auxio.Covers: Unable to extract album cover due to an error: kotlinx.coroutines.JobCancellationException: DeferredCoroutine was cancelled; job=DeferredCoroutine{Cancelling}@7864094
12-30 13:26:14.049 991 991 E MetadataRetrieverClient: failed to extract an album art
12-30 13:26:14.049 3088 3234 E MediaMetadataRetrieverJNI: getEmbeddedPicture: Call to getEmbeddedPicture failed.
12-30 13:26:14.053 3088 3234 W MediaProvider: java.io.IOException: No album art found
12-30 13:26:14.053 3088 3234 W MediaProvider: at android.media.ThumbnailUtils.createAudioThumbnail(ThumbnailUtils.java:201)
12-30 13:26:14.053 3088 3234 W MediaProvider: at com.android.providers.media.MediaProvider$7.getThumbnailBitmap(MediaProvider.java:6858)
12-30 13:26:14.053 3088 3234 W MediaProvider: at com.android.providers.media.MediaProvider$Thumbnailer.ensureThumbnail(MediaProvider.java:6826)12-30 13:26:14.053 3088 3234 W MediaProvider: at com.android.providers.media.MediaProvider.ensureThumbnail(MediaProvider.java:8059)
12-30 13:26:14.053 3088 3234 W MediaProvider: at com.android.providers.media.MediaProvider.openFileCommon(MediaProvider.java:7942)
12-30 13:26:14.053 3088 3234 W MediaProvider: at com.android.providers.media.MediaProvider.openTypedAssetFileCommon(MediaProvider.java:8037)
12-30 13:26:14.053 3088 3234 W MediaProvider: at com.android.providers.media.MediaProvider.openTypedAssetFile(MediaProvider.java:7981)
12-30 13:26:14.053 3088 3234 W MediaProvider: at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:561)
12-30 13:26:14.053 3088 3234 W MediaProvider: at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:327)
12-30 13:26:14.053 3088 3234 W MediaProvider: at android.os.Binder.execTransactInternal(Binder.java:1307)
12-30 13:26:14.053 3088 3234 W MediaProvider: at android.os.Binder.execTransact(Binder.java:1265)
12-30 13:26:14.054 7532 18900 W Auxio.Covers: Unable to extract album cover due to an error: java.io.FileNotFoundException: No album art found
Very weird issue @e-zk.
Something like this is seemingly occurring:
[""]
""
value is interpreted as numeric""
string, so it crashes entirelyI really don't know how the cache is returning [""]
. It should be null
, so perhaps there's some garbage elsewhere in the extractor. But otherwise I can band-aid the symptom by fixing the bugged numeric genre logic and adding some extra validation to the cache.
I encountered the "Music Loading Failed" error as well. Here are the steps to reproduce it 100% on my side:
Tapping retry won't fix it. Go to settings and do a full re-scan would fix it, though.
Also noticed two typos in the doc/wiki:
CHANGELOG.md : reciever -> receiver
https://github.com/OxygenCobalt/Auxio/wiki/Advanced-Functionality#musicbrainz-ids A common issue with large music libraries is an inability to separate different items that have the same time. same time -> same name?
Reproduced the issue. Seems to be caused by genres consisting of nothing but space values. When these are restored from the cache, the whitespace is removed, leaving only empty strings that cause the parser to crash.
I've managed to band-aid this issue. In a future version I will need to handle this better.
Here's a new debug APK before I go to sleep. It should have the genre fix. You can unzip the file in order to find the APK.
Note that the original was a release APK since I decided to do a testing period last-minute. This new build will be a unoptimized debug build that is easier for me to identify issues with, so the app will run slower than normal. Do not be concerned by this.
@e-zk @bodayw @KraXen72
If you have issues, please remember to attach a stack trace.
That was quick 👍
And yes I can confirm that I don't write "genre" tags in my music library.
Some logcat lines:
> adb -d logcat | select-string "[DWE] Auxio"
12-30 11:48:03.180 27484 2539 E Auxio.Indexer: Music indexing failed
12-30 11:48:03.185 27484 2539 E Auxio.Indexer: java.lang.NumberFormatException: For input string: ""
12-30 11:48:03.185 27484 2539 E Auxio.Indexer: at java.lang.Integer.parseInt(Integer.java:627)
12-30 11:48:03.185 27484 2539 E Auxio.Indexer: at java.lang.Integer.parseInt(Integer.java:650)
12-30 11:48:03.185 27484 2539 E Auxio.Indexer: at org.oxycblt.auxio.music.extractor.ParsingUtilKt.parseId3v1Genre(ParsingUtil.kt:10)
12-30 11:48:03.185 27484 2539 E Auxio.Indexer: at org.oxycblt.auxio.music.Song.<init>(Music.kt:1126)
12-30 11:48:03.185 27484 2539 E Auxio.Indexer: at org.oxycblt.auxio.music.system.Indexer$buildSongs$2.invokeSuspend(Indexer.kt:35)
12-30 11:48:03.185 27484 2539 E Auxio.Indexer: at org.oxycblt.auxio.music.system.Indexer$buildSongs$2.invoke(Indexer.kt:13)
12-30 11:48:03.185 27484 2539 E Auxio.Indexer: at org.oxycblt.auxio.music.extractor.MetadataExtractor.parse(MetadataExtractor.kt:270)
12-30 11:48:03.185 27484 2539 E Auxio.Indexer: at org.oxycblt.auxio.music.extractor.MetadataExtractor$parse$1.invokeSuspend(Unknown Source:12)
12-30 11:48:03.185 27484 2539 E Auxio.Indexer: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
12-30 11:48:03.185 27484 2539 E Auxio.Indexer: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:107)
12-30 11:48:03.185 27484 2539 E Auxio.Indexer: at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:12)
12-30 11:48:03.185 27484 2539 E Auxio.Indexer: at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:3)
12-30 11:48:03.185 27484 2539 E Auxio.Indexer: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:82)
Yep. Same issue. Perhaps some metadata formats or taggers somehow write empty genre names to whitespace or an empty string, even when I specifically attempt to filter those out when parsing. Ugh.
Definitely priority in a future version to properly handle the many ways tags can be "empty" without actually being empty.
Awesome work! The accuracy+quality of the tags in my music library varies greatly.
The music I get from Bandcamp always has nice tags but I have some old files from years ago that has some pretty shoddy tagging - tagging that I probably did myself manually all those years ago.
The issue no longer appears.
Confirming as well that the R2 apk doesn't have the issue.
@OxygenCobalt yes this is a great idea. Anyways, I've been building from dev
every few days for the last few months and filing bugs as I see them. I can't think of any issues right now. :+1:
Thanks so much for your work - very excited about v3! Will have to find the time to test. Would it be an option to release pre-releases via F-Droid? That may increase size of test group and make running a pre-release simple while keeping it optional via the Suggested
release tag.
@e-zk @bodayw Thanks for confirming that it works.
@alanorth Great.
@foss- Perhaps. I don't think it would be on F-Droid though since the process of getting an app update through is really annoying. I could periodically make pre-releases on github however if I change my workflow.
I think this will be good for release now. If there are any more issues, they will be released in a 3.0.1 patch.
Version 3.0.0 of Auxio.
Test APK: Auxio_3.0.0.zip
@Kraxen72 @foss- @alanorth @illdeletethis Care to test this before I merge? I want to start making a habit out of having a preliminary testing period like NewPipe so I can avoid really bad issues from working their way into the release.