Bug 419985

Summary: Crash when changing the project resolution on a busy project
Product: [Applications] kdenlive Reporter: Stefan Naumann <me>
Component: User Interface & MiscellaneousAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED WORKSFORME    
Severity: crash CC: fritzibaby, snd.noise
Priority: NOR Flags: fritzibaby: Brainstorm+
Version First Reported In: 19.12.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Crash Log and Backtrace of all threads
Output of the crashed KDEnlive AppImage

Description Stefan Naumann 2020-04-12 10:15:59 UTC
Created attachment 127463 [details]
Crash Log and Backtrace of all threads

SUMMARY
I've finished a 15-ish minute long project with video clips, titles and transitions (wipe, composite, dissolve) and a blur-effect. When I try to change the project settings (from in this case 720p59.99 to 1440p59.99), the UI freezes for a moment, then crashes out. Happened occasionally with several projects before with the same KDEnlive version.

STEPS TO REPRODUCE
(happens occassionally on a finished project)
1. Have a bigger finished project
2. Project -> Project settings, change the resolution to something bigger (e.g. 2 times of your current project)

OBSERVED RESULT
The UI freezes for a second, then crashes

EXPECTED RESULT
The UI may freeze (or show a progress bar), then return me to the main window with the properties changed.

SOFTWARE/OS VERSIONS
Linux-Kernel: 5.6.3-arch1
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2
Comment 1 emohr 2020-04-12 14:01:09 UTC
Changing the project settings during a project is "dangerous" and leads to crash as you descripted. Why you have to do that? You can render out the project in different resolutions if needed.
Comment 2 Stefan Naumann 2020-04-12 14:15:53 UTC
I don't understand why it would be dangerous to upscale a project as the last step. I mean, when I were to implement it, it would be adjusting the titles (calculate new coordinates and sizes), update transitions and effects. Am I missing something?

If the framerate were to change, one would need to recalculate the positions of everything, but that is not the case here.

Rendering in a different resolution seems to render the image at the project resolution, then upscaling it to be encoded, at least last time I tried that. This makes titles blurry, while I would want them crisp.

Tbh, I don't find crashing to be a good "expected" behaviour. When there were to be a failure, the application should always fail gracefully. But I don't see, why changing the project-resolution would fail.
Comment 3 emohr 2020-04-12 19:00:15 UTC
Tested. I changed the project settings from 1080p60fps to 1440p60fps to 720p60fps and back to 1080p60fps. No crash.

Please try with the current Kdenlive AppImage version 19.12.3 to see if there are any packaging issues https://files.kde.org/kdenlive/release/ 

If the problem/issue doesn't occur when using the AppImage, then it's your configuration or packaging.
Comment 4 Stefan Naumann 2020-04-13 12:59:30 UTC
Can reproduce with a self-build version from the repo; however I have not been able to reproduce the issue with the Appimage, yet.
Comment 5 Stefan Naumann 2020-04-14 08:29:27 UTC
Update: I was able to reproduce it. However I don't know how to print the stacks of threads for the appImage-image. I've attached the output of KDEnlive. There are loads of ffmpeg-error messages in there.
Comment 6 Stefan Naumann 2020-04-14 08:30:27 UTC
Created attachment 127533 [details]
Output of the crashed KDEnlive AppImage
Comment 7 emohr 2020-04-14 15:38:59 UTC
Thank you for digging into with the AppImage. I see a lot of h264 errors and on the end a memory access crash.
Comment 8 Stefan Naumann 2020-04-14 15:54:09 UTC
Oh and maybe this could be a hint: After the last '// replace finished: "141"' output, the console output froze for a moment.

Could you walk me through, what happens when I hit the "Save profile settings"-button? The way I would implement it, would be to adjust all producers in the timeline to the new timing (when the framerate changed), adjust titles for size-differences, ask the filters to adjust, when they use anything based on pixels and the frame-size. 

I don't see, how more or less broken h264 files would be any issue here, but then again I did not implement it :D
Comment 9 farid 2022-08-28 16:27:05 UTC
Can you please try with the latest version and see if you can reproduce?
Comment 10 Bug Janitor Service 2022-09-12 04:36:24 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Bug Janitor Service 2022-09-27 04:48:25 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!