| Summary: | Extract Frame Save Dialog crashes when changing directory via input into filename | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Dirk Hagedorn <kde-bug> |
| Component: | Open/save dialogs | Assignee: | KIO Bugs <kio-bugs-null> |
| Status: | CONFIRMED --- | ||
| Severity: | crash | CC: | fritzibaby, jb, kdelibs-bugs-null |
| Priority: | NOR | Keywords: | triaged |
| Version First Reported In: | 6.19.0 | ||
| Target Milestone: | --- | ||
| Platform: | Microsoft Windows | ||
| OS: | Microsoft Windows | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
Screenshot with explenations
Crash-Log_enter-drive-name-only Crash-log_when typing E: into the name field Rough patch fixing the crash |
||
|
Description
Dirk Hagedorn
2023-04-24 14:50:27 UTC
Mmh. After “extract frame” I don’t’ have path on top which I can edit. Please upload here a screenshot of this window with the path. Please take a look at the screencast at https://youtu.be/Sft_upaaF7g After entering "F:" in the Name edit field Kdenlive freezes. It takes some seconds, then it crashes (and OBS Studio becomes visible that I used to record the desktop). Created attachment 158507 [details]
Screenshot with explenations
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! Created attachment 158913 [details]
Crash-Log_enter-drive-name-only
Now I can confirm the crash following your steps. Attached the back trace.
Same behaviour with Kdenlive 23.08.1 (Standalone), it still crashes as shown before We should in general not allow users to put names with special character into a file-names field because Windows will crash with such special characters like: \ / : * ? < > │ (In reply to emohr from comment #7) > We should in general not allow users to put names with special character > into a file-names field because Windows will crash with such special > characters like: \ / : * ? < > │ It's common practice to enter complete paths (relative or absolute) to change the directory, to input complete file names with path in Windows' Save (and Open) Dialogs. You can even input masks (foo*.bar) to filter the current directory list. I don't see any benefit in using Kdenlive's own save dialog instead of the the system's save dialoge, thus the quickest bugfix was to use the Window's save dialog, I guess. Installed kdenlive-24.08.3_standalone, the bug still exists. Created attachment 183993 [details]
Crash-log_when typing E: into the name field
I checked with the latest master (commit 2640a1d21b).
When I type “E:” into the name field Kdenlive crashes. It seems to be a KF6KIOFileWidgets issue in conjunction with Qt6.
Attached the gdb log
Yes, this is a KFileWidget issue. Entering F: and pressing enter in a KFileWidget's Name filed in Saving mode crashes on Windows. Some more details on what happens on Windows:
The bug is in KFileWidget's slotOk(). If the user enters "F:" (without quotes - any drive letter will crash) in the name field,
the url is set to QUrl("file:///F:") in [1]
Then , in [2] we create a QUrl directory from url by removing the filename, and end up with directory = QUrl("file:///")
The stat job in [3] thinks it is a dir, and the url is set to QUrl("file:///") and the fileName to "F:"
Finally, in [4] we set back the name field to fileName (so "F:") and relaunch slotOk(), creating an endless loop
[1] https://invent.kde.org/frameworks/kio/-/blob/master/src/filewidgets/kfilewidget.cpp#L742
[2] https://invent.kde.org/frameworks/kio/-/blob/master/src/filewidgets/kfilewidget.cpp#L758
[3] https://invent.kde.org/frameworks/kio/-/blob/master/src/filewidgets/kfilewidget.cpp#L767
[4] https://invent.kde.org/frameworks/kio/-/blob/master/src/filewidgets/kfilewidget.cpp#L773
Created attachment 186794 [details]
Rough patch fixing the crash
This patch fixes the crash by checking for invalid characters in the filename and preventing such cases. Maybe a regexp or an other better solution exists to check that..
|