Bug 487826 - Kdenlive crashes while processing jobs for imported clips
Summary: Kdenlive crashes while processing jobs for imported clips
Status: CONFIRMED
Alias: None
Product: kdenlive
Classification: Applications
Component: Project Bin & Import (show other bugs)
Version: 24.05.1
Platform: macOS (DMG) macOS
: NOR crash
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-31 08:26 UTC by ericswpark
Modified: 2024-10-01 18:29 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Kdenlive macOS crash reporter backtrace (488.44 KB, text/plain)
2024-05-31 08:26 UTC, ericswpark
Details
Affected project file (142.17 KB, application/xml)
2024-06-27 03:30 UTC, ericswpark
Details
24.05.1 crash log 1 (264.46 KB, text/plain)
2024-06-27 03:30 UTC, ericswpark
Details
24.05.1 crash log 2 (520.73 KB, text/plain)
2024-06-27 03:31 UTC, ericswpark
Details
24.05.1 crash log 3 (295.18 KB, text/plain)
2024-06-27 03:39 UTC, ericswpark
Details
24.05.2 crash log (277.10 KB, text/plain)
2024-07-22 01:26 UTC, ericswpark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ericswpark 2024-05-31 08:26:50 UTC
Created attachment 170010 [details]
Kdenlive macOS crash reporter backtrace

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
Kdenlive crashes on macOS while processing jobs for imported clips in the media bin


STEPS TO REPRODUCE
1. Launch Kdenlive
2. Import a bunch of clips
3. Wait as Kdenlive queues up jobs

OBSERVED RESULT
Kdenlive crashes with a segfault

EXPECTED RESULT
Kdenlive shouldn't crash

SOFTWARE/OS VERSIONS
macOS: 14.5 (23F79)

ADDITIONAL INFORMATION
Attached crash reporter backtrace
Comment 1 emohr 2024-06-01 11:17:42 UTC
I guess Kdenlive crashed while creating the audio thumbnails. Maybe a race condition on your Apple M1 Pro?
Comment 2 farid 2024-06-25 20:03:10 UTC
How big are your clips? Could you upload the project file, maybe it helps to find any corner case scenario.
Comment 3 ericswpark 2024-06-27 03:29:54 UTC
Most of the clips are around 1-2 GB, although the big ones go to 6-7 GB. I'll upload the affected project file here shortly, as well as two crash logs I got on 24.05.1.
Comment 4 ericswpark 2024-06-27 03:30:25 UTC
Created attachment 171054 [details]
Affected project file
Comment 5 ericswpark 2024-06-27 03:30:53 UTC
Created attachment 171055 [details]
24.05.1 crash log 1
Comment 6 ericswpark 2024-06-27 03:31:23 UTC
Created attachment 171056 [details]
24.05.1 crash log 2
Comment 7 ericswpark 2024-06-27 03:39:39 UTC
Created attachment 171057 [details]
24.05.1 crash log 3
Comment 8 emohr 2024-06-27 15:56:19 UTC
I guess you are running out of RAM while Kdenlive is generating the audio thumbnails and then Kdenlive is crashing. Can you check the RAM consumption? 

The clips are around 7-8 minutes long. Right?
Comment 9 ericswpark 2024-06-28 03:43:28 UTC
Kdenlive uses about 130 MB on launch, but when I open the project it briefly shoots up to 1 GB or so before crashing. The Mac I'm working on has 16 GB of system RAM, so I doubt that's the issue.

The biggest clip I have (7 GB) runs for about 9 minutes.
Comment 10 farid 2024-07-02 19:57:05 UTC
I just started a very big project from footage takes from a Sony A7iii. Some files are more than 20gb and I imported everything at once and can't reproduce your issue. I am on linux though, maybe this is a Mac specific issue? How are you importing your clips, from the project bin or dragging them from the file manager?
Comment 11 farid 2024-07-02 19:58:19 UTC
If you could maybe you can share your files privately so I can try to reproduce?
Comment 12 ericswpark 2024-07-03 02:55:23 UTC
Unfortunately I cannot share the footage files. If the issue cannot be reproduced it can be closed.
Comment 13 farid 2024-07-03 15:04:53 UTC
(In reply to ericswpark from comment #12)
> Unfortunately I cannot share the footage files. If the issue cannot be
> reproduced it can be closed.

How are you importing the clips? From the project bin or dragging them into Kdenlive from the file manager? Please paste here the clip info of your clips by going to the clip properties or using a tool like mediainfo-gui.
Comment 14 ericswpark 2024-07-22 01:24:36 UTC
I've made a screen recording reproducing the issue. This is reproducible 100% of the time. With the affected project file, opening it on macOS causes a crash. See: https://youtu.be/j4l8GK02Q_4
Comment 15 ericswpark 2024-07-22 01:26:35 UTC
Created attachment 171870 [details]
24.05.2 crash log

This log file correlates with the reproduction video uploaded to YouTube
Comment 16 farid 2024-07-22 01:35:18 UTC
(In reply to ericswpark from comment #14)
> I've made a screen recording reproducing the issue. This is reproducible
> 100% of the time. With the affected project file, opening it on macOS causes
> a crash. See: https://youtu.be/j4l8GK02Q_4

Interesting, so there is a case of it crashing when recovering missing files. Will try to reproduce something similar. But I also noticed in second 14 of your video that there is a mixture of mp4 and mkv clips in the RAW folder. Maybe that could be the issue.
Comment 17 ericswpark 2024-07-22 02:23:22 UTC
Perhaps. The MP4 files come from a Sony ZV-E1, while the MKV files are from OBS Studio. Although if it was a container issue wouldn't it crash on other platforms like Windows? The project opens fine on my Windows machine.
Comment 18 ericswpark 2024-07-22 02:48:53 UTC
(In reply to farid from comment #13)
> (...) Please paste here the clip info of your
> clips by going to the clip properties or using a tool like mediainfo-gui.

Sorry, just realized that I missed part of your message. Here's the clip info for one of the clips from the camera:

Audio bitrate: 1536 kb/s
Audio channels: 2
Audio codec: PCM signed 16-bit long-endian
Audio frequency: 48000 Hz
Audio streams: 1
B frames: No
Colorspace: ITU-R BT.709
File size: 6.2 GiB (6,644,051,427)
Frame rate: 23.976
Frame size: 3840x2160
Pixel aspect ratio: 1.000
Pixel format: yuv422p10le
Scanning: Progressive
Video bitrate: 97002 kb/s
Video codec: HEVC (High Efficiency Video Coding)

And one of the OBS Studio clips:

Audio channels: 2
Audio codec: AAC (Advanced Audio Coding)
Audio frequency: 48000 Hz
Audio streams: 1
B frames: Yes
Colorspace: ITU-R BT.709
File size: 86.2 MiB (90,383,360)
Frame rate: 60
Frame size: 1920x1080
Pixel aspect ratio: 1.000
Pixel format: yuv420p
Scanning: Progressive
Video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10

Sidenote: it would be cool if I could switch to a raw view in the Clip Properties panel and copy the entire thing; should I file a feature request for this?