ffmpeg-kit
ffmpeg-kit copied to clipboard
FFMpegKit crash with xHE-AAC
Description FFmpegkit crash when trying to use xHE-AAC files (FFProbe for example)
Expected behavior It should not crash the app and just return an error
Current behavior The app crash
12:53:23.995 libc app.symfonik.music.player.debug A FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x7808cef028)
12:53:23.996 libc app.symfonik.music.player.debug A Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 12453 (RenderThread), pid 12366 (ic.player.debug)
Strangely there's no dump or anything more in logcat.
To Reproduce Try to use ffprobe on any of the mp4 file from https://www2.iis.fraunhofer.de/AAC/xhe-aac.html
Screenshots If applicable, add screenshots to help explain your problem.
Logs
12:53:23.995 libc app.symfonik.music.player.debug A FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x7808cef028)
12:53:23.996 libc app.symfonik.music.player.debug A Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 12453 (RenderThread), pid 12366 (ic.player.debug)
Environment
- Platform:
Android - Architecture:
arm64-v8a - Version: 6.0.2
- flutter doctor:
- react-native info:
Other Add any other context about the problem here.
@tanersener So after tons of time lost to try to understand WTF was happening on Android the issue are the few exit(1); still present in fftools_ffprobe.c those trigger the crash. You have removed most of them everywhere so I guess it's just a small forget.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Installé it's still to be fixed
ffprobe 6.1.1 (linux, fedora, x86_64) outputs a bunch of stuff but mainly
[aac @ 0x7fbb1200f440] Audio object type 42 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
could this throw an error with toyr implementation ?
No this is a bug in ffmpegkit when it encounters those errors it runs exit(1); that triggers the OS crash.
@tanersener knows that since most of the other exit() calls have been removed for this purpose, just 3 leftovers that are reached with those kind of media.
For example https://github.com/arthenica/ffmpeg-kit/blob/main/android/ffmpeg-kit-android-lib/src/main/cpp/fftools_ffprobe.c#L3387
Those must be exit_program to avoid the crash.
Thanks a lot for reporting the bug and providing the fix @Tolriq. The fix is pushed to the development branch now.