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

Crash when reading some audio #960

Open
4 tasks done
e-zk opened this issue Jan 14, 2025 · 18 comments
Open
4 tasks done

Crash when reading some audio #960

e-zk opened this issue Jan 14, 2025 · 18 comments
Assignees
Labels
bug Something isn't working music Related to music loading

Comments

@e-zk
Copy link
Contributor

e-zk commented Jan 14, 2025

Describe the Bug/Crash

  1. Opened app after installing dev-4
  2. Upon rescanning media, around halfway through the app crashes.
  3. Following log is what appears in the error.
  4. Attempting to retry the rescan crashes the app again

Let me know what other details may help diagnose.

Describe the intended behavior

It should load media files.

What android version do you use?

Android 15

What device model do you use?

Pixel 6a (Android 15) (GrapheneOS)

Provide a sample file

No clue what audio is actually crashing the app.

Bug report

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:5084)
	at android.os.Parcel.readParcelable(Parcel.java:5066)
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3235)
	at android.os.Parcel.createException(Parcel.java:3224)
	at android.os.Parcel.readException(Parcel.java:3200)
	at android.os.Parcel.readException(Parcel.java:3142)
	at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7231)
	at android.app.Service.startForeground(Service.java:778)
	at org.oxycblt.auxio.AuxioService$$ExternalSyntheticLambda0.invoke(SourceFile:388)
	at org.oxycblt.auxio.AuxioService.updateForeground(SourceFile:202)
	at org.oxycblt.auxio.music.service.IndexingHolder.onIndexingStateChanged(SourceFile:5)
	at org.oxycblt.auxio.music.MusicRepositoryImpl.access$emitIndexingProgress(SourceFile:97)
	at org.oxycblt.auxio.music.MusicRepositoryImpl$emitIndexingProgress$1.invokeSuspend(Unknown Source:12)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:9)
	at kotlinx.coroutines.DispatchedTask.run(SourceFile:109)
	at androidx.core.app.ActivityRecreator$1.run(SourceFile:36)
	at kotlinx.coroutines.scheduling.TaskImpl.run(SourceFile:3)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:93)
	Suppressed: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service org.oxycblt.auxio/.AuxioService
		... 20 more

Auxio log 594b00a2af8a.txt

Duplicates

@e-zk e-zk added the bug Something isn't working label Jan 14, 2025
@e-zk
Copy link
Contributor Author

e-zk commented Jan 14, 2025

I only just now saw this mentioned earlier in #941.

My autoloading is disabled, turning it on doesn't help. It's this initial loading of media just will not happen for me.

Might be more useful log here
type: crash
osVersion: google/bluejay/bluejay:15/AP4A.250105.002/2025010700:user/release-keys
flags: dev options enabled
package: org.oxycblt.auxio:57, targetSdk 35
process: org.oxycblt.auxio
installer: com.android.packageinstaller

signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'JNI DETECTED ERROR IN APPLICATION: java_array == null

backtrace:
      #00 pc 00000000000638fc  /apex/com.android.runtime/lib64/bionic/libc.so (abort+156) (BuildId: 6da77815db33dd5f45155da4abb6f173)
      #01 pc 00000000008decf0  /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+464) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #02 pc 0000000000014500  /apex/com.android.art/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_0::__invoke(char const*)+80) (BuildId: 82fa459e65cf6a28433637745d4baad4)
      #03 pc 0000000000013a58  /apex/com.android.art/lib64/libbase.so (android::base::LogMessage::~LogMessage()+520) (BuildId: 82fa459e65cf6a28433637745d4baad4)
      #04 pc 0000000000434c34  /apex/com.android.art/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1252) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #05 pc 000000000086b5b8  /apex/com.android.art/lib64/libart.so (art::JNI<false>::GetArrayLength(_JNIEnv*, _jarray*)+408) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #06 pc 000000000005bcb4  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (JVMInputStream::readBlock(unsigned long)+68) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #07 pc 0000000000060704  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #08 pc 0000000000061310  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #09 pc 000000000006101c  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #10 pc 000000000005f880  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #11 pc 000000000005fb50  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #12 pc 00000000000bae00  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #13 pc 00000000000b9304  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #14 pc 00000000000b91a8  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #15 pc 000000000005b4a0  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (Java_org_oxycblt_musikr_metadata_TagLibJNI_openNative+64) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #16 pc 000000000009d2cc  /system/framework/arm64/boot.oat (art_jni_trampoline+124) (BuildId: 63cc7157a4d26b751c667cee9c0ce0dfb5318bda)
      #17 pc 0000000000c7f8f4  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.metadata.MetadataExtractorImpl$extract$2.invoke+612)
      #18 pc 000000000099b8a4  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (okio.Okio.startUndispatchedOrReturn+324)
      #19 pc 00000000009d9468  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.JobKt.withContext+1864)
      #20 pc 0000000000c9d864  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$metadata$1$1.invokeSuspend+628)
      #21 pc 0000000000c9d574  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$metadata$1$1.invoke+308)
      #22 pc 0000000000994d58  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlin.io.CloseableKt.wrap+584)
      #23 pc 0000000000c95c90  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$$inlined$mapNotNull$1$2.emit+768)
      #24 pc 00000000009f4f70  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.flow.FlowKt.emitAllImpl$FlowKt__ChannelsKt+912)
      #25 pc 00000000009f6024  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend+84)
      #26 pc 0000000000510b98  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith+152)
      #27 pc 00000000009c819c  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.DispatchedTask.run+1068)
      #28 pc 0000000000454e10  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (androidx.core.app.ActivityRecreator$1.run+1040)
      #29 pc 0000000000a1534c  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.scheduling.TaskImpl.run+60)
      #30 pc 0000000000a11514  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run+2452)
      #31 pc 000000000040c594  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #32 pc 0000000000244ea4  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #33 pc 00000000004cf794  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1092) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #34 pc 00000000004cf338  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #35 pc 0000000000075d34  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+132) (BuildId: 6da77815db33dd5f45155da4abb6f173)
      #36 pc 0000000000066890  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 6da77815db33dd5f45155da4abb6f173)
type: crash
osVersion: google/bluejay/bluejay:15/AP4A.250105.002/2025010700:user/release-keys
flags: dev options enabled
package: org.oxycblt.auxio:57, targetSdk 35
process: org.oxycblt.auxio
installer: com.android.packageinstaller

signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'JNI DETECTED ERROR IN APPLICATION: java_array == null

backtrace:
      #00 pc 00000000000638fc  /apex/com.android.runtime/lib64/bionic/libc.so (abort+156) (BuildId: 6da77815db33dd5f45155da4abb6f173)
      #01 pc 00000000008decf0  /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+464) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #02 pc 0000000000014500  /apex/com.android.art/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_0::__invoke(char const*)+80) (BuildId: 82fa459e65cf6a28433637745d4baad4)
      #03 pc 0000000000013a58  /apex/com.android.art/lib64/libbase.so (android::base::LogMessage::~LogMessage()+520) (BuildId: 82fa459e65cf6a28433637745d4baad4)
      #04 pc 0000000000434c34  /apex/com.android.art/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1252) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #05 pc 000000000086b5b8  /apex/com.android.art/lib64/libart.so (art::JNI<false>::GetArrayLength(_JNIEnv*, _jarray*)+408) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #06 pc 000000000005bcb4  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (JVMInputStream::readBlock(unsigned long)+68) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #07 pc 0000000000060704  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #08 pc 0000000000061310  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #09 pc 000000000006101c  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #10 pc 000000000005f880  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #11 pc 000000000005fb50  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #12 pc 00000000000bae00  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #13 pc 00000000000b9304  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #14 pc 00000000000b91a8  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #15 pc 000000000005b4a0  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (Java_org_oxycblt_musikr_metadata_TagLibJNI_openNative+64) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #16 pc 000000000009d2cc  /system/framework/arm64/boot.oat (art_jni_trampoline+124) (BuildId: 63cc7157a4d26b751c667cee9c0ce0dfb5318bda)
      #17 pc 0000000000c7f8f4  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.metadata.MetadataExtractorImpl$extract$2.invoke+612)
      #18 pc 000000000099b8a4  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (okio.Okio.startUndispatchedOrReturn+324)
      #19 pc 00000000009d9468  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.JobKt.withContext+1864)
      #20 pc 0000000000c9d864  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$metadata$1$1.invokeSuspend+628)
      #21 pc 0000000000c9d574  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$metadata$1$1.invoke+308)
      #22 pc 0000000000994d58  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlin.io.CloseableKt.wrap+584)
      #23 pc 0000000000c95c90  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$$inlined$mapNotNull$1$2.emit+768)
      #24 pc 00000000009f4f70  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.flow.FlowKt.emitAllImpl$FlowKt__ChannelsKt+912)
      #25 pc 00000000009f6024  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend+84)
      #26 pc 0000000000510b98  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith+152)
      #27 pc 00000000009c819c  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.DispatchedTask.run+1068)
      #28 pc 0000000000454e10  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (androidx.core.app.ActivityRecreator$1.run+1040)
      #29 pc 0000000000a1534c  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.scheduling.TaskImpl.run+60)
      #30 pc 0000000000a11514  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run+2452)
      #31 pc 000000000040c594  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #32 pc 0000000000244ea4  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #33 pc 00000000004cf794  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1092) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #34 pc 00000000004cf338  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #35 pc 0000000000075d34  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+132) (BuildId: 6da77815db33dd5f45155da4abb6f173)
      #36 pc 0000000000066890  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 6da77815db33dd5f45155da4abb6f173)

@dot166
Copy link
Contributor

dot166 commented Jan 14, 2025

how large is your library?, because mine is 200 songs and on the latest CI build there is no crash

@e-zk
Copy link
Contributor Author

e-zk commented Jan 14, 2025

Around 5000 if I recall correctly.

Edit: 5667

@VoxelPrismatic
Copy link

VoxelPrismatic commented Jan 14, 2025

Cannot reproduce with a library size of 1920 songs

@VoxelPrismatic
Copy link

I only just now saw this mentioned earlier in #941.

My autoloading is disabled, turning it on doesn't help. It's this initial loading of media just will not happen for me.

Might be more useful log here
type: crash
osVersion: google/bluejay/bluejay:15/AP4A.250105.002/2025010700:user/release-keys
flags: dev options enabled
package: org.oxycblt.auxio:57, targetSdk 35
process: org.oxycblt.auxio
installer: com.android.packageinstaller

signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'JNI DETECTED ERROR IN APPLICATION: java_array == null

backtrace:
      #00 pc 00000000000638fc  /apex/com.android.runtime/lib64/bionic/libc.so (abort+156) (BuildId: 6da77815db33dd5f45155da4abb6f173)
      #01 pc 00000000008decf0  /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+464) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #02 pc 0000000000014500  /apex/com.android.art/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_0::__invoke(char const*)+80) (BuildId: 82fa459e65cf6a28433637745d4baad4)
      #03 pc 0000000000013a58  /apex/com.android.art/lib64/libbase.so (android::base::LogMessage::~LogMessage()+520) (BuildId: 82fa459e65cf6a28433637745d4baad4)
      #04 pc 0000000000434c34  /apex/com.android.art/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1252) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #05 pc 000000000086b5b8  /apex/com.android.art/lib64/libart.so (art::JNI<false>::GetArrayLength(_JNIEnv*, _jarray*)+408) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #06 pc 000000000005bcb4  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (JVMInputStream::readBlock(unsigned long)+68) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #07 pc 0000000000060704  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #08 pc 0000000000061310  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #09 pc 000000000006101c  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #10 pc 000000000005f880  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #11 pc 000000000005fb50  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #12 pc 00000000000bae00  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #13 pc 00000000000b9304  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #14 pc 00000000000b91a8  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #15 pc 000000000005b4a0  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (Java_org_oxycblt_musikr_metadata_TagLibJNI_openNative+64) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #16 pc 000000000009d2cc  /system/framework/arm64/boot.oat (art_jni_trampoline+124) (BuildId: 63cc7157a4d26b751c667cee9c0ce0dfb5318bda)
      #17 pc 0000000000c7f8f4  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.metadata.MetadataExtractorImpl$extract$2.invoke+612)
      #18 pc 000000000099b8a4  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (okio.Okio.startUndispatchedOrReturn+324)
      #19 pc 00000000009d9468  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.JobKt.withContext+1864)
      #20 pc 0000000000c9d864  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$metadata$1$1.invokeSuspend+628)
      #21 pc 0000000000c9d574  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$metadata$1$1.invoke+308)
      #22 pc 0000000000994d58  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlin.io.CloseableKt.wrap+584)
      #23 pc 0000000000c95c90  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$$inlined$mapNotNull$1$2.emit+768)
      #24 pc 00000000009f4f70  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.flow.FlowKt.emitAllImpl$FlowKt__ChannelsKt+912)
      #25 pc 00000000009f6024  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend+84)
      #26 pc 0000000000510b98  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith+152)
      #27 pc 00000000009c819c  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.DispatchedTask.run+1068)
      #28 pc 0000000000454e10  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (androidx.core.app.ActivityRecreator$1.run+1040)
      #29 pc 0000000000a1534c  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.scheduling.TaskImpl.run+60)
      #30 pc 0000000000a11514  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run+2452)
      #31 pc 000000000040c594  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #32 pc 0000000000244ea4  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #33 pc 00000000004cf794  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1092) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #34 pc 00000000004cf338  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #35 pc 0000000000075d34  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+132) (BuildId: 6da77815db33dd5f45155da4abb6f173)
      #36 pc 0000000000066890  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 6da77815db33dd5f45155da4abb6f173)
type: crash
osVersion: google/bluejay/bluejay:15/AP4A.250105.002/2025010700:user/release-keys
flags: dev options enabled
package: org.oxycblt.auxio:57, targetSdk 35
process: org.oxycblt.auxio
installer: com.android.packageinstaller

signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'JNI DETECTED ERROR IN APPLICATION: java_array == null

backtrace:
      #00 pc 00000000000638fc  /apex/com.android.runtime/lib64/bionic/libc.so (abort+156) (BuildId: 6da77815db33dd5f45155da4abb6f173)
      #01 pc 00000000008decf0  /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+464) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #02 pc 0000000000014500  /apex/com.android.art/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_0::__invoke(char const*)+80) (BuildId: 82fa459e65cf6a28433637745d4baad4)
      #03 pc 0000000000013a58  /apex/com.android.art/lib64/libbase.so (android::base::LogMessage::~LogMessage()+520) (BuildId: 82fa459e65cf6a28433637745d4baad4)
      #04 pc 0000000000434c34  /apex/com.android.art/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1252) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #05 pc 000000000086b5b8  /apex/com.android.art/lib64/libart.so (art::JNI<false>::GetArrayLength(_JNIEnv*, _jarray*)+408) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #06 pc 000000000005bcb4  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (JVMInputStream::readBlock(unsigned long)+68) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #07 pc 0000000000060704  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #08 pc 0000000000061310  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #09 pc 000000000006101c  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #10 pc 000000000005f880  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #11 pc 000000000005fb50  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #12 pc 00000000000bae00  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #13 pc 00000000000b9304  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #14 pc 00000000000b91a8  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #15 pc 000000000005b4a0  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/base.apk!libtagJNI.so (offset 0x27c000) (Java_org_oxycblt_musikr_metadata_TagLibJNI_openNative+64) (BuildId: c1c2d61527b50e2add135ff91f18fbea9662ff37)
      #16 pc 000000000009d2cc  /system/framework/arm64/boot.oat (art_jni_trampoline+124) (BuildId: 63cc7157a4d26b751c667cee9c0ce0dfb5318bda)
      #17 pc 0000000000c7f8f4  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.metadata.MetadataExtractorImpl$extract$2.invoke+612)
      #18 pc 000000000099b8a4  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (okio.Okio.startUndispatchedOrReturn+324)
      #19 pc 00000000009d9468  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.JobKt.withContext+1864)
      #20 pc 0000000000c9d864  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$metadata$1$1.invokeSuspend+628)
      #21 pc 0000000000c9d574  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$metadata$1$1.invoke+308)
      #22 pc 0000000000994d58  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlin.io.CloseableKt.wrap+584)
      #23 pc 0000000000c95c90  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$$inlined$mapNotNull$1$2.emit+768)
      #24 pc 00000000009f4f70  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.flow.FlowKt.emitAllImpl$FlowKt__ChannelsKt+912)
      #25 pc 00000000009f6024  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend+84)
      #26 pc 0000000000510b98  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith+152)
      #27 pc 00000000009c819c  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.DispatchedTask.run+1068)
      #28 pc 0000000000454e10  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (androidx.core.app.ActivityRecreator$1.run+1040)
      #29 pc 0000000000a1534c  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.scheduling.TaskImpl.run+60)
      #30 pc 0000000000a11514  /data/app/~~ACE99E0_HR_0NDWZNr332A==/org.oxycblt.auxio-PE5E9VUZ6g85oYCSd3aJcA==/oat/arm64/base.odex (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run+2452)
      #31 pc 000000000040c594  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #32 pc 0000000000244ea4  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #33 pc 00000000004cf794  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1092) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #34 pc 00000000004cf338  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+8) (BuildId: fc424f836eeda90497b5ec1cf5df3035)
      #35 pc 0000000000075d34  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+132) (BuildId: 6da77815db33dd5f45155da4abb6f173)
      #36 pc 0000000000066890  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 6da77815db33dd5f45155da4abb6f173)

I don't want to spoil anything (because I am not an android dev), but that libart looks like it has to do with album covers, not the size of your library.

If you could identify the offending album and upload a sample file for us, that would help a lot.

Move albums out of all scanned Music folders until the app stops crashing

@OxygenCobalt
Copy link
Owner

I don't want to spoil anything (because I am not an android dev), but that libart looks like it has to do with album covers, not the size of your library.

Nope! libart is the Android RunTime that is actually managing the JVM (and native code working with the JVM), cover loading is done within the libtagJNI bundled with the app @VoxelPrismatic.

The problem is that one of the JNI calls throws an error, which then cascades and brings down the entire app since I wind up passing a nullptr to another method that isn't expecting it. Working on a fix right now.

@VoxelPrismatic
Copy link

Fascinating. I guess I have to stay out of your hair.

@OxygenCobalt
Copy link
Owner

Can you test and take logs on this @e-zk? Should I think report the errors I'm getting in the console instead of crashing.

Auxio_Canary.zip

@e-zk
Copy link
Contributor Author

e-zk commented Jan 14, 2025

Hmm seems to have crashed again.
There seems to be two places where it crashes, with different errors.

  1. On a fresh install, when it first tries to scan media.
  2. After 1, after I open the app again and hit retry in the dialog.

This is what's reported in the error dialog when I re-open the app (after crash 1 from above):

android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service org.oxycblt.auxio.debug/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:5084)
	at android.os.Parcel.readParcelable(Parcel.java:5066)
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3235)
	at android.os.Parcel.createException(Parcel.java:3224)
	at android.os.Parcel.readException(Parcel.java:3200)
	at android.os.Parcel.readException(Parcel.java:3142)
	at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7231)
	at android.app.Service.startForeground(Service.java:778)
	at org.oxycblt.auxio.AuxioService.updateForeground$lambda$2(AuxioService.kt:159)
	at org.oxycblt.auxio.AuxioService.$r8$lambda$8zoHeh9zw9kcW0pXXX3N05EG1ng(Unknown Source:0)
	at org.oxycblt.auxio.AuxioService$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass:0)
	at org.oxycblt.auxio.music.service.IndexingHolder.createNotification(IndexingHolder.kt:123)
	at org.oxycblt.auxio.music.service.MusicServiceFragment.createNotification(MusicServiceFragment.kt:100)
	at org.oxycblt.auxio.AuxioService.updateForeground(AuxioService.kt:157)
	at org.oxycblt.auxio.music.service.IndexingHolder.onIndexingStateChanged(IndexingHolder.kt:144)
	at org.oxycblt.auxio.music.MusicRepositoryImpl.emitIndexingProgress(MusicRepository.kt:415)
	at org.oxycblt.auxio.music.MusicRepositoryImpl.access$emitIndexingProgress(MusicRepository.kt:235)
	at org.oxycblt.auxio.music.MusicRepositoryImpl$emitIndexingProgress$1.invokeSuspend(Unknown Source:15)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:823)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)
	Suppressed: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service org.oxycblt.auxio.debug/org.oxycblt.auxio.AuxioService
		... 28 more

When I hit "retry" the app closes. When I re-open the app, it's started the media rescan process. It goes just under halfway then crashes with the following logcat (this is crash 2):

type: crash
osVersion: google/bluejay/bluejay:15/AP4A.250105.002/2025010700:user/release-keys
flags: dev options enabled
package: org.oxycblt.auxio.debug:57, targetSdk 35
process: org.oxycblt.auxio.debug
processUptime: 74876 + 170 ms
installer: com.android.packageinstaller

java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 193632 free bytes and 189KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
	at android.content.res.AssetFileDescriptor$1.createFromParcel(AssetFileDescriptor.java:744)
	at android.content.res.AssetFileDescriptor$1.createFromParcel(AssetFileDescriptor.java:742)
	at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:817)
	at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:2068)
	at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1883)
	at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1714)
	at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1660)
	at org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$fds$1$1$1.invokeSuspend(ExtractStep.kt:107)
	at org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$fds$1$1$1.invoke(Unknown Source:8)
	at org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$fds$1$1$1.invoke(Unknown Source:4)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:42)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:164)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
	at org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$fds$1$1.invokeSuspend(ExtractStep.kt:106)
	at org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$fds$1$1.invoke(Unknown Source:8)
	at org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$fds$1$1.invoke(Unknown Source:4)
	at org.oxycblt.musikr.pipeline.PipelineExceptionKt.wrap(PipelineException.kt:57)
	at org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$$inlined$mapNotNull$1$2.emit(Emitters.kt:224)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt(Channels.kt:33)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt.access$emitAllImpl$FlowKt__ChannelsKt(Channels.kt:1)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(Unknown Source:14)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:823)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)
	Suppressed: org.oxycblt.musikr.pipeline.PipelineException: Error while processing File @ Path(volume=InternalVolumeImpl(storageVolume=StorageVolume: Internal shared storage), components=Music/Four Tet/2001 - No More Mosquitoes/01 - No More Mosquitoes.flac): kotlinx.coroutines.JobCancellationException: Parent job is Cancelling; job=ScopeCoroutine{Cancelling}@5b77521
Caused by: java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 193632 free bytes and 189KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
	at android.content.res.AssetFileDescriptor$1.createFromParcel(AssetFileDescriptor.java:744)
	at android.content.res.AssetFileDescriptor$1.createFromParcel(AssetFileDescriptor.java:742)
	at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:817)
	at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:2068)
	at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1883)
	at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1714)
	at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1660)
	at org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$fds$1$1$1.invokeSuspend(ExtractStep.kt:107)
	at org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$fds$1$1$1.invoke(Unknown Source:8)
	at org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$fds$1$1$1.invoke(Unknown Source:4)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:42)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:164)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
	at org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$fds$1$1.invokeSuspend(ExtractStep.kt:106)
	at org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$fds$1$1.invoke(Unknown Source:8)
	at org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$fds$1$1.invoke(Unknown Source:4)
	at org.oxycblt.musikr.pipeline.PipelineExceptionKt.wrap(PipelineException.kt:57)
	at org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$$inlined$mapNotNull$1$2.emit(Emitters.kt:224)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt(Channels.kt:33)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt.access$emitAllImpl$FlowKt__ChannelsKt(Channels.kt:1)
	at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(Unknown Source:14)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:823)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)

		at org.oxycblt.musikr.pipeline.PipelineExceptionKt.wrap(PipelineException.kt:59)
		at org.oxycblt.musikr.pipeline.ExtractStepImpl$extract$$inlined$mapNotNull$2$2.emit(Emitters.kt:224)
		... 11 more
	Caused by: kotlinx.coroutines.JobCancellationException: Parent job is Cancelling; job=ScopeCoroutine{Cancelled}@5b77521
	Caused by: [CIRCULAR REFERENCE: java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 193632 free bytes and 189KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.]
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@ba643ff, Dispatchers.IO]

Looks like OOM?

@OxygenCobalt
Copy link
Owner

Weird, I think that's actually a memory leak @e-zk.

Going to switch approaches and instead handle exceptions in Kotlin rather than CPP. Will get back soon.

@OxygenCobalt OxygenCobalt changed the title Crash when loading large library Crash when reading some audio Jan 15, 2025
@OxygenCobalt OxygenCobalt added the music Related to music loading label Jan 15, 2025
@OxygenCobalt
Copy link
Owner

Okay, turns out Musikr's native code is full of memory leaks. It probably is an OOM on your library.

@OxygenCobalt
Copy link
Owner

Try this @e-zk?

Auxio_Canary.zip

@e-zk
Copy link
Contributor Author

e-zk commented Jan 19, 2025

@OxygenCobalt okay so I get further and I don't crash.

It gets stuck at 2332/5676. And it just stays there (it's been like 6+ hrs I've left it running). The application is still responsive, there's no crash anymore. So I think there is a file in my library causing this?

Is there a way to log the filename of each file as the scan progresses? That way I can see which file it's getting stuck on.

If not, I'll try and narrow this down by moving folders to/from my music dir and rescanning. and get back as soon as I can (free time permitting - with how huge my library is this may take a bit).

@OxygenCobalt
Copy link
Owner

@OxygenCobalt okay so I get further and I don't crash.

It gets stuck at 2332/5676. And it just stays there (it's been like 6+ hrs I've left it running). The application is still responsive, there's no crash anymore. So I think there is a file in my library causing this?

Is there a way to log the filename of each file as the scan progresses? That way I can see which file it's getting stuck on.

If not, I'll try and narrow this down by moving folders to/from my music dir and rescanning. and get back as soon as I can (free time permitting - with how huge my library is this may take a bit).

Try this new APK, it should actually the file an error occurs on and I think fix one of the circumstances causing the loading bar to get stuck @e-zk

Auxio_Canary.zip

@e-zk
Copy link
Contributor Author

e-zk commented Jan 24, 2025

Hey @OxygenCobalt

Sorry for late response.
This APK doesn't seem to be failing with any error. It acts the same as the other build; it gets stuck at some file and just stays that way without anything new in the logs. App is still responsive, etc.

I think I do need to buckle down and just find out what file is causing this but I'm lacking in free time at the moment.

@OxygenCobalt
Copy link
Owner

Okay, that's really confusing to be honest @e-zk. It seems like the pipeline is actually getting stuck and not just failing to report progress. Not sure what to do here until you can identify the problem file or if someone else reports it with an identified root cause.

@VoxelPrismatic
Copy link

VoxelPrismatic commented Jan 26, 2025

@e-zk could you share your audio library via Google Drive / Mega / Proton? Or, at least share what albums & formats.

I want to find the root cause, either being a specific format (FLAC, Opus, etc), file count, or a specific file.

WHat I do know is that the image size in FLACs don't matter, as all of mine have 3mb+ album covers embedded.

@OxygenCobalt
Copy link
Owner

Hi again @e-zk, I've managed to squash a pretty big memory leak that might have been causing your issues. Care to try this new APK?

Auxio_Canary.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working music Related to music loading
Projects
None yet
Development

No branches or pull requests

4 participants