-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Every time I try to retrieve the values for a specific tag (LYRICS) via TagLib.getMetadataPropertyValues(), the app crashes at the native code level.
However, if I simply use TagLib.getMetadata(), I can access the desired tag normally using the obtained Metadata.propertyMap.
Code:
override suspend fun embeddedLyrics(song: Song, requirePlainText: Boolean): LyricsResult {
if (song.id != Song.emptySong.id) {
val lyrics = contentResolver.openFileDescriptor(song.mediaStoreUri, "r")?.use {
TagLib.getMetadataPropertyValues(it.dup().detachFd(), "LYRICS")?.firstOrNull()
}
if (requirePlainText && !lyrics.isNullOrBlank()) {
// Additional logic
}
return LyricsResult(song.id, plainLyrics = lyrics)
}
return LyricsResult(song.id)
}I don't know if it will help at all, but the log shows something like this:
crash_dump64 A Cmdline: com.mardous.booming.debug
crash_dump64 A pid: 11462, tid: 11545, name: DefaultDispatch >>> com.mardous.booming.debug <<<
crash_dump64 A #00 pc 000000000004c630 /data/app/~~93whcbrn5c9q89guxZlQcQ==/com.mardous.booming.debug-uvIJUOjZzNBUaq2AS3ME_g==/base.apk!libtaglib.so (offset 0xc08000)
crash_dump64 A #01 pc 0000000000053d68 /data/app/~~93whcbrn5c9q89guxZlQcQ==/com.mardous.booming.debug-uvIJUOjZzNBUaq2AS3ME_g==/base.apk!libtaglib.so (offset 0xc08000) (Java_com_kyant_taglib_TagLib_getMetadataPropertyValues+600)
crash_dump64 A #07 pc 000000000001aae4 <anonymous:7f74c17000> (com.mardous.booming.repository.RealLyricsRepository.embeddedLyrics+0)
crash_dump64 A #12 pc 000000000001a354 <anonymous:7f74c17000> (com.mardous.booming.repository.RealLyricsRepository.allLyrics+0)
crash_dump64 A #17 pc 000000000000c474 <anonymous:7f79d27000> (com.mardous.booming.viewmodels.lyrics.LyricsViewModel$updateSong$1$result$1.invokeSuspend+0)
Metadata
Metadata
Assignees
Labels
No labels