Skip to content
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

MUSIC LOADING FAILED #823

Closed
4 tasks done
foss- opened this issue Jul 9, 2024 · 7 comments
Closed
4 tasks done

MUSIC LOADING FAILED #823

foss- opened this issue Jul 9, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@foss-
Copy link

foss- commented Jul 9, 2024

DISABLE SETTINGS -> CONTENT -> INTELLIGENT SORTING TO FIX THIS ISSUE, RESOLUTION IS COMING ASAP

Describe the Bug/Crash

  1. update to 3.5.1
  2. re-scan library
  3. run into error Music loading failed with More showing below report and Retry continuously failing

The error happens after the scan is almost finished and all tracks have been scanned.

Describe the intended behavior

Scan should not fail. The scan failure seems to be a regression introduced in 3.5.1 or an existing error did not lead to a failure in 3.5.0 and earlier.

What android version do you use?

Android 13

What device model do you use?

lisa w ArrowOS 13.1

Provide a sample file

N/A

Bug report

java.lang.Exception: DeviceLibrary creation failed: java.lang.IllegalArgumentException: Comparison method violates its general contract!
	at java.util.TimSort.mergeHi(TimSort.java:903)
	at java.util.TimSort.mergeAt(TimSort.java:520)
	at java.util.TimSort.mergeCollapse(TimSort.java:448)
	at java.util.TimSort.sort(TimSort.java:245)
	at java.util.Arrays.sort(Arrays.java:1495)
	at java.util.ArrayList.sort(ArrayList.java:1470)
	at java.util.Collections.sort(Collections.java:206)
	at kotlin.collections.CollectionsKt__MutableCollectionsJVMKt.sortWith(Unknown Source:12)
	at org.oxycblt.auxio.list.sort.Sort$Mode$ByAlbum.sortSongs(SourceFile:76)
	at org.oxycblt.auxio.list.sort.Sort.songs(SourceFile:14)
	at org.oxycblt.auxio.image.extractor.Cover$Companion.order(SourceFile:8)
	at org.oxycblt.auxio.music.device.ArtistImpl.<init>(SourceFile:381)
	at okio.Path$Companion.create(SourceFile:13)
	at org.oxycblt.auxio.music.device.DeviceLibraryFactoryImpl$create$1.invokeSuspend(Unknown Source:16)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
	at kotlinx.coroutines.DispatchedTask.run(Unknown Source:94)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:92)

	at org.oxycblt.auxio.music.MusicRepositoryImpl$indexImpl$deviceLibraryJob$1.invokeSuspend(SourceFile:88)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
	at kotlinx.coroutines.DispatchedTask.run(Unknown Source:94)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:92)

Duplicates

@foss- foss- added the bug Something isn't working label Jul 9, 2024
@OIRNOIR
Copy link

OIRNOIR commented Jul 9, 2024

+1 (Google Pixel 8a running GrapheneOS)
I have had to downgrade to 3.5.0 to use my music library.

@sgreenden
Copy link

Same issue, makes the app unusable

@OxygenCobalt
Copy link
Owner

Please report error in the APK from this ZIP file @OIRNOIR @sgreenden @foss-

Auxio_SortTrace.zip

@OxygenCobalt OxygenCobalt pinned this issue Jul 10, 2024
@OxygenCobalt OxygenCobalt changed the title music scan failing MUSIC LOADING FAILED Jul 10, 2024
@OxygenCobalt
Copy link
Owner

Can you guys try out this APK @foss- @sgreenden @OIRNOIR
Auxio_Sort2.zip

@foss-
Copy link
Author

foss- commented Jul 10, 2024

Thanks for looking into this. Installed Auxio_Sort2.zip and the scan went through without failure.

There still seem to be issues though. Played a track and after a few seconds the app crashes. When re-opening the app I was back to the failure screen with the two options Retry and More.

Did another re-scan. Played another track and issue is reproducible. Track plays a few seconds, audio is choppy i.e. it has small gpas when playing like stuttering, then app crashes.

This is the More output, which looks like maybe a permission issue. If so, should Auxio be asking for permissions? It did at first after installing and I allowed that request.

android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service org.oxycblt.auxio/.AuxioService
	at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:54)
	at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:50)
	at android.os.Parcel.readParcelableInternal(Parcel.java:4816)
	at android.os.Parcel.readParcelable(Parcel.java:4778)
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3006)
	at android.os.Parcel.createException(Parcel.java:2995)
	at android.os.Parcel.readException(Parcel.java:2978)
	at android.os.Parcel.readException(Parcel.java:2920)
	at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6114)
	at android.app.Service.startForeground(Service.java:743)
	at org.oxycblt.auxio.AuxioService.updateForeground(SourceFile:232)
	at org.oxycblt.auxio.music.service.IndexerServiceFragment.onIndexingStateChanged(SourceFile:9)
	at org.oxycblt.auxio.music.MusicRepositoryImpl.emitIndexingProgress(Unknown Source:94)
	at org.oxycblt.auxio.music.MusicRepositoryImpl$emitIndexingProgress$1.invokeSuspend(SourceFile:13)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
	at kotlinx.coroutines.DispatchedTask.run(Unknown Source:94)
	at androidx.core.app.ActivityRecreator$1.run(SourceFile:40)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Unknown Source:2)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:92)

@OxygenCobalt
Copy link
Owner

Alright, seems to work then.

I've been attempting to track down the foreground issue, it's something to do with Media3. It doesn't seem to be much of an issue in production.

@foss-
Copy link
Author

foss- commented Jul 10, 2024

Follow-up for remaining playback problem: #825

@OxygenCobalt OxygenCobalt unpinned this issue Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants