Created attachment 183574 [details] macOS crash log SUMMARY kdenlive version 25.04.3 MacOS melt render crash at arbitrary frame number in the same project. Example below was near the start but have had attempts get >20000 frames in STEPS TO REPRODUCE 1. The project is 27m19s long, has one main video and audio track and a few non-animated text titles 2. Renders at 37-46 fps until crash 3. I have another project with videos and audio taken from the exact same camera and phone, slightly shorter at 15 minutes, renders every time OBSERVED RESULT Crashes arbitrarily, crash log attached EXPECTED RESULT No crash SOFTWARE/OS VERSIONS macOS: 12.7.6 ADDITIONAL INFORMATION Render log: Started render process: /Applications/kdenlive.app/Contents/MacOS/melt -loglevel error -progress2 /private/var/folders/8t/460wy1xj7y1_1ghx0fnk_z0w0000gn/T/kdenlive-tpBwsd-1.mlt Detected locale "C" with character encoding "US-ASCII", which is not UTF-8. Qt depends on a UTF-8 locale, and has switched to "UTF-8" instead. If this causes problems, reconfigure your locale. See the locale(1) manual for more information.16 492 1 31 983 2 43 1476 3 Rendering of /Users/rich/Documents////Video2-hearing1.mp4 aborted, resulting video will probably be corrupted. Frame: 1476
Created attachment 183576 [details] another crash log A second crash log
The project has an mp4 (video track, audio removed) and m4a audio track and video track with a couple of title texts There is only one video clip and one audio clip and an image at the end of the project
Created attachment 183578 [details] much more successful crash log: 32931 frames Render log ending: 813 32438 66 826 32931 67 Rendering of /Users/rich/Documents////Video2-hearing1.mp4 aborted, resulting video will probably be corrupted. Frame: 32931
Created attachment 183579 [details] render log for last attempt Full render log
Always seems to crash at a call to localeconv_l I also get this error in the Job Error Log which seems related: Detected locale "C" with character encoding "US-ASCII", which is not UTF-8. Qt depends on a UTF-8 locale, and has switched to "UTF-8" instead. If this causes problems, reconfigure your locale. See the locale(1) manual for more information. How do I set that?
It appears the latest kdenlive comes shipped with a blank or incorrect launch environment on macOS causing locale issues. 1. Tried modifying the LaunchAgent: environment.plist - did not work 2. Tried modifying Info.plist in the app bundle and re-signing - did not work 3. Tried supplying the environment directly to the app execution: LANG=en_GB.UTF-8 LC_ALL=en_GB.UTF-8 /Applications/kdenlive.app/Contents/MacOS/kdenlive - did not work Related discussion: https://discuss.kde.org/t/kdenlive-crashes-while-rendering-on-mac-m2/12821/8
The thread suggests it is related to free hard disk space. So I freed several GB of disk space and it crashed faster than ever
It doesn't seem to make any difference if I split the one long 25 min clip into two halves on different tracks
Git commit e9ce43dcdedf3ac97fb5b198114271c9d7b94d14 by Jean-Baptiste Mardelle. Committed on 28/07/2025 at 01:47. Pushed by mardelle into branch 'release/25.08'. Try to workaround Qt locale issue on Mac M +6 -3 renderer/renderjob.cpp M +0 -1 renderer/renderjob.h M +20 -0 src/main.cpp https://invent.kde.org/multimedia/kdenlive/-/commit/e9ce43dcdedf3ac97fb5b198114271c9d7b94d14
Thanks for your detailed report. I just pushed a possible fix for this issue, mostly backported from Shotcut. Could you test the development builds to see if it fixes your problem ? The packages with my patch are available here: https://cdn.kde.org/ci-builds/multimedia/kdenlive/release-25.08/ Thanks in advance for your feedback
With your latest dev build from your link reporting version 25.07.90 And launching from the normal icon I get the same crash cause but a slightly different error log: Detected locale "C" with character encoding "US-ASCII", which is not UTF-8. Qt depends on a UTF-8 locale, and has switched to "UTF-8" instead. If this causes problems, reconfigure your locale. See the locale(1) manual for more information. IFFChunk::innerFromDevice: unkwnown chunk "\x89PNG" IFFChunk::innerFromDevice: unkwnown chunk "\x89PNG"
So looks like it is trying to load some metadata using ASCII which has the unicode character "Character Tabulation with Justification (HTJ)" in it. I also tried launching using "LANG=en_GB.UTF-8 LC_ALL=en_GB.UTF-8 /Applications/kdenlive.app/Contents/MacOS/kdenlive" but still crashed the same way. I imagine one of my images has an unusual string embedded in it, but doesn't really explain why it crashes arbitrarily unless there is some lazy loading pre-caching going on
ChatGPT suggests setting the locale specifically in libmlt: setlocale(LC_ALL, "en_GB.UTF-8"); I'll try editing the Info.plist Then a special dylib to see if it fixes it
Modifying Info.plist did not fix it This did fix it: force_locale.c : #include <locale.h> #include <stdlib.h> __attribute__((constructor)) void force_locale() { setenv("LANG", "en_GB.UTF-8", 1); setenv("LC_ALL", "en_GB.UTF-8", 1); setlocale(LC_ALL, "en_GB.UTF-8"); } $$ clang -dynamiclib -o force_locale.dylib force_locale.c $$ DYLD_INSERT_LIBRARIES=$PWD/force_locale.dylib /Applications/kdenlive.app/Contents/MacOS/kdenlive
If you can provide another dev build with this fix I will test it with the same project to confim
Git commit 7f3b6a2d7b2ce9fd1ebabfaf8b22291daa2600ed by Jean-Baptiste Mardelle. Committed on 29/07/2025 at 06:01. Pushed by mardelle into branch 'release/25.08'. Fix possible locale issue on render in Mac/Windows M +6 -3 src/lib/localeHandling.cpp https://invent.kde.org/multimedia/kdenlive/-/commit/7f3b6a2d7b2ce9fd1ebabfaf8b22291daa2600ed
Can you please test today's builds that include my latest fix ? https://cdn.kde.org/ci-builds/multimedia/kdenlive/release-25.08/ Thanks
Tested and working, many thanks Jean!!