SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** Whenever I try to run the automatic scene detection to create labels at the scene edges, kdenlive crashes after the process finishes. (And I am sorry, if the details are not helpful, I am a bit new to creating crash reports) STEPS TO REPRODUCE 0. set your system to German (de_AT.UTF-8), with LANG=C it seems to work fine, just switching the language in the UI is not enough) 1. open kdenlive 2. open a video file 3. select Clip Job -> Automatic Scene split 4. make sure "Add clip markers" is enabled (if I select "Cut scenes" instead, everything works fine) 5. wait until ffmpeg has finished OBSERVED RESULT After a line starting with `GOR RESULTS` is printed to the log (with timestamps that might be reasonable output, making me think that the ffmpeg output is parsed correctly), kdenlive crashes (unfortunately with different messages each time). Now that I try to properly reproduce this for the bug report, I also notice that sometimes kdenlive doesn't crash, but just freeze. This is the most helpful backtrace I can achieve: GOR RESULTS: (120.9, 120.967, 153.633, 153.733, 197, 197.067, 377.9, 404.833, 404.867, 493.967, 494, 576.267, 624.233, 624.3, 662.567, 687.7, 687.767, 722.467, 722.6, 862.033, 862.133, 961.867, 962.133, 1071.37, 1090.3, 1317.13, 1317.17, 1336.23, 1633.43, 1633.7, 1724.47, 1724.63, 1835.7, 1912.2, 1912.27, 1912.43, 1954.4, 1954.67, 2005.8, 2856.87) ========= QMutex: destroying locked mutex malloc(): unsorted double linked list corrupted Thread 49 "Thread (pooled)" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffed3fff640 (LWP 23937)] SceneSplitTask::run (this=0x5555658344c0) at ./src/jobs/scenesplittask.cpp:185 Download failed: Das Argument ist ungültig. Continuing without source file ./obj-x86_64-linux-gnu/src/./src/jobs/scenesplittask.cpp. 185 ./src/jobs/scenesplittask.cpp: Datei oder Verzeichnis nicht gefunden. (gdb) bt #0 SceneSplitTask::run (this=0x5555658344c0) at ./src/jobs/scenesplittask.cpp:185 #1 0x00007ffff4ccee81 in QThreadPoolThread::run (this=0x55555ceff3f0) at thread/qthreadpool.cpp:100 #2 0x00007ffff4ccbcd1 in QThreadPrivate::start (arg=0x55555ceff3f0) at thread/qthread_unix.cpp:329 #3 0x00007ffff448784a in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442 #4 0x00007ffff450b2cc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 scenesplittask.cpp:185 seems indeed to be related to creating the markers, so that might be a clue. EXPECTED RESULT The clip markers are added at the expected position SOFTWARE/OS VERSIONS I am using kdenlive 22.08.2 from Debian testing, but the crash also happens with the 22.08.2 appimage. KDE Frameworks Version: 5.98.0 Qt Version: 5.15.6 (built against 5.15.6) ffmpeg: 5.1.2-1 ADDITIONAL INFORMATION
Just in case that this is caused by my video files, this is the output of ffprobe: Duration: 00:47:58.47, start: 0.000000, bitrate: 3926 kb/s Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(progressive), 1920x1080, 30.30 fps, 30 tbr, 1k tbn Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp And it seems like LANG=C doesn't reliably fix the issue, but a combination of that, changing the minimum scene length to 10 frames and randomly changing the threshold results in some times where kdenlive doesn't crash, but properly applies the labels.
Thank you for the excellent bug report. Based on the information you provided, it looks like this is the same issue that this change is intended to fix: https://invent.kde.org/multimedia/kdenlive/-/merge_requests/363 (also reported in https://invent.kde.org/multimedia/kdenlive/-/issues/1563 ). The problem is that the task is marked as done before it is completely done, leading to it getting destroyed (hence the "dsetroying locked mutex" message).