Bug 401514 - Application with invalid work path silently fails to launch
Summary: Application with invalid work path silently fails to launch
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.50.0
Platform: Kubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: David Faure
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2018-11-28 21:12 UTC by nitro2k01
Modified: 2020-07-02 04:33 UTC (History)
7 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nitro2k01 2018-11-28 21:12:23 UTC
Reproduction steps:
1. In KDE Menu Editor, edit an item, and in the advanced tab, change work path to a path that doesn't exist.
2. Click save to save the change.
3. Attempt to launch the application you just edited.

OBSERVED RESULT
The application now fails to launch, without producing an error message. 

EXPECTED RESULT
A reasonable behavior would be to produce an error message informing the user that the path is invalid, or at the very least any kind of error message informing the user that the application failed to launch. 

For testing I also tried chmod -x'ing the executable file which also failed silently. Perhaps the error handling overall needs to be looked over, to ensure that there's always an error message when an application fails to launch due to invalid setting item settings.

SOFTWARE/OS VERSIONS
Linux Distro/Version: Kubuntu 18.10
KDE Plasma Version: 5.13.5
KDE Frameworks Version: 5.50.0
Qt Version: 5.11.1

ADDITIONAL INFORMATION
The issue happened to me while adding an application and copying the full path of the executable to the path field, to remove the executable file name from the path but (as it turned out) forgot to delete one character. It confused me for a while and sent me on a wild goose chase because I assumed it failed to launch because of an error in the application itself.
Comment 1 Nate Graham 2018-11-28 21:17:12 UTC
Confirming the issue. Not sure whether Kickoff is the right place to fix this, though. Maybe in KIO itself?
Comment 2 nitro2k01 2018-11-28 21:21:18 UTC
(In reply to Nate Graham from comment #1)
> Confirming the issue. Not sure whether Kickoff is the right place to fix
> this, though. Maybe in KIO itself?

I apologize if the report is misplaced. As I'm not familiar with the internals of KDE, I chose what seemed to be the closest component.
Comment 3 Nate Graham 2018-11-28 21:23:52 UTC
No problem, the question was directed at any of the Plasma developers. :)
Comment 4 Kai Uwe Broulik 2018-12-03 10:05:01 UTC
I bet this is an issue in KRun, not Plasma, re-assigning.
Comment 5 Kai Uwe Broulik 2018-12-03 10:06:23 UTC
KRun just calls setWorkingDirectory on QProcess, so maybe a Qt bug even?
Comment 6 Ahmad Samir 2020-06-02 21:34:26 UTC
I couldn't reproduce this issue, editing an entry in KMenuEdit and adding a non-existing path in "Work Path", then trying to load the app via the applications menu I get a notification:
Launching <foo> (Failed)
chdir: No such file or directory

There's been some changes in KIO and it now should detect binaries that exist but don't have the executable bit set, and show an appropriate error message, https://commits.kde.org/kio/05cbbf06384bae0cad8de19d659864c0f8dbd651

Do you still see this issue with KIO 5.70?
Comment 7 Bug Janitor Service 2020-06-17 04:33:09 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 8 Bug Janitor Service 2020-07-02 04:33:08 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!