Closed dukewuzhao closed 1 year ago
Thanks for creating this issue. That exception is not normal. Can you try with the latest LTS version we have: 5.1.0
?
crash log:
Input #0, mp3, from '/var/mobile/Containers/Data/Application/A7096AE5-7176-492A-B5E3-61A428602719/Documents/music/当阳常志此心丹.mp3':
Metadata:
artist : null
Duration: 00:01:59.82, start: 0.025057, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : LAME3.98r
Side data:
replaygain: track gain - -5.700000, track peak - unknown, album gain - unknown, album peak - unknown,
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16be (native))
Press [q] to stop, [?] for help
Output #0, s16be, to '/var/mobile/Containers/Data/Application/A7096AE5-7176-492A-B5E3-61A428602719/Documents/music/当阳常志此心丹.pcm':
Metadata:
artist : null
encoder : Lavf59.27.100
Stream #0:0: Audio: pcm_s16be, 16000 Hz, mono, s16, 256 kb/s
Metadata:
encoder : Lavc59.37.100 pcm_s16be
Side data:
replaygain: track gain - -5.700000, track peak - unknown, album gain - unknown, album peak - unknown,
size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
size= 3743kB time=00:01:59.77 bitrate= 256.0kbits/s speed= 481x
video:0kB audio:3743kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
size=N/A time=00:01:59.77 bitrate=N/A speed= 480x
video:0kB audio:3743kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Platform: iOS Version:ffmpeg_kit_flutter_full: 5.1.0-LTS Source branch: main
It's still crashing, it's still in the same place, but it's just this piece of music that crashes, the others are ok, I'm a little confused, this is the crashing music 当阳常志此心丹.mp3.zip
Thanks for the example file. I managed to reproduce the issue.
It seems like we cannot properly read some of the fields inside that file. I'm not 100 % sure, but I suspect some ID3 tags have an encoding that we cannot process. When that happens we generate null
log messages. That's why you have this issue.
The crash comes from the iOS
library. I pushed a commit on the development
branch to prevent it.
Unfortunately, it's not very easy to use this fix on flutter
. You need to build the iOS
library from the development
branch and replace the original ffmpeg-kit
iOS
dependency of the flutter
plugin with it. Or wait until we publish a new release.
I manually modified the ID3
tags and cleared the artist tag of that file. After that, tested in ffmpeg-kit
again. This time the file didn't receive any errors. That proves my theory. The encoding of ID3
tags is the issue for that file.
Fixed in flutter v6.0.0
.
my code:
Platform: iOS Version:ffmpeg_kit_flutter_audio: 4.5.1-LTS Source branch: main
crash log: Loading ffmpeg-kit. Loaded ffmpeg-kit-audio-arm64-4.5.1-lts-20220114 flutter: Loaded ffmpeg-kit-flutter-ios-audio-arm64-4.5.1-lts. Input #0, mp3, from '/var/mobile/Containers/Data/Application/7CED271E-5BAD-4EEE-A814-19282368D3E8/Documents/music/当阳常志此心丹.mp3': Metadata: artist : null Duration: 00:01:59.82, start: 0.025057, bitrate: 128 kb/s Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s Metadata: encoder : LAME3.98r Side data: replaygain: track gain - -5.700000, track peak - unknown, album gain - unknown, album peak - unknown, [mp3float @ 0x101eb2ef0] The "sub_text_format" option is deprecated: Deprecated, does nothing Stream mapping: Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16be (native)) Press [q] to stop, [?] for help Output #0, s16be, to '/var/mobile/Containers/Data/Application/7CED271E-5BAD-4EEE-A814-19282368D3E8/Documents/music/当阳常志此心丹.pcm': Metadata: artist : null encoder : Lavf59.10.100 Stream #0:0: Audio: pcm_s16be, 16000 Hz, mono, s16, 256 kb/s Metadata: encoder : Lavc59.15.102 pcm_s16be Side data: replaygain: track gain - -5.700000, track peak - unknown, album gain - unknown, album peak - unknown, size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
size= 3743kB time=00:01:59.77 bitrate= 256.0kbits/s speed= 460x
video:0kB audio:3743kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000% Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString appendString:]: nil argument' First throw call stack: (0x1905d8d78 0x1a923d734 0x1906e35d0 0x19067ec20 0x19055c530 0x101682d74 0x100fe4620 0x100fe1064 0x108bf195c 0x108742130 0x108abeafc 0x1089ec214 0x1089eff6c 0x1905ee168 0x190572144 0x19056c8f0 0x19054afa0 0x19055e6b8 0x1ac5f8374 0x192ec3e88 0x192c455ec 0x100f9963c 0x101219ce4) libc++abi: terminating with uncaught exception of type NSException
__pthread_kill + 8 libsystem_kernel.dylib
__pthread_kill: -> 0x1c7fd3b78 <+8>: b.lo 0x1c7fd3b98 ; <+40> 0x1c7fd3b7c <+12>: pacibsp 0x1c7fd3b80 <+16>: stp x29, x30, [sp, #-0x10]! 0x1c7fd3b84 <+20>: mov x29, sp Target 0: (Runner) stopped. Lost connection to device.What's the reason