Bug 367837 - KDevelop crashes when trying to debug from command-line
Summary: KDevelop crashes when trying to debug from command-line
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: CPP Debugger (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2016-08-26 08:16 UTC by Kevin Funk
Modified: 2016-09-08 12:34 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.1


Attachments
screenshot (109.39 KB, image/png)
2016-08-26 15:47 UTC, Anton Anikin
Details
fix (993 bytes, patch)
2016-08-27 06:06 UTC, Anton Anikin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Funk 2016-08-26 08:16:45 UTC
Run:
  kdevelop -d gdb dolphin

Ends up in:
[kdevelop(18373)/(default) unknown(0): ASSERT: "QFile::exists(args.first())" in file /home/kfunk/devel/src/kf5/kdevplatform/plugins/execute/nativeappconfig.cpp, line 285

Note, this works:
  kdevelop -d gdb /usr/bin/dolphin

First case should be handled at any rate (should look up the dolphin executable in PATH)

Reproducible: Always
Comment 1 Anton Anikin 2016-08-26 15:44:53 UTC
Run: kdevelop -d gdb dolphin 
Result: KDevelop shows message: 'dolphin' is not an executable

kdevelop and kdevplatform are build ~10 minutes ago with kdesrc-build on kubuntu 16.04.
Comment 2 Anton Anikin 2016-08-26 15:47:38 UTC
Created attachment 100789 [details]
screenshot
Comment 3 Kevin Funk 2016-08-26 19:07:03 UTC
You didn't see the assert? Then you didn't compile kdevelop/kdevplatform in debug mode (-DCMAKE_BUILD_TYPE=Debug).

Also, in my opinion kdevelop -d gdb dolphin *should* find /usr/bin/dolphin
Comment 4 Anton Anikin 2016-08-27 06:06:21 UTC
Created attachment 100795 [details]
fix
Comment 5 Anton Anikin 2016-08-27 06:13:41 UTC
> You didn't see the assert? Then you didn't compile kdevelop/kdevplatform in debug mode (-DCMAKE_BUILD_TYPE=Debug).

You are right, forgive me for the carelessness.

> Also, in my opinion kdevelop -d gdb dolphin *should* find /usr/bin/dolphin

Ok, the patch changes the behavior of kdevelop exactly as you described.
Comment 6 Aleix Pol 2016-09-06 21:46:27 UTC
Hi, can you please upload the patch to reviewboard?
https://git.reviewboard.kde.org/dashboard/
Comment 7 Milian Wolff 2016-09-07 00:29:27 UTC
actually, just commit it right away if you have the rights to do so. it looks good to me
Comment 8 Anton Anikin 2016-09-08 10:44:32 UTC
Git commit b386fb1cf30d5d0682b1fd2eebe2f458ebd75e86 by Anton Anikin.
Committed on 08/09/2016 at 10:38.
Pushed by antonanikin into branch 'master'.

Fix KDevelop crashes when trying to debug from command-line

Fixes the crash in KDE bug #367837 that is caused by starting
debugging session from command line:

kdevelop -d gdb dolphin

This caused to ASSERT: QFile::exists(). Current version fix it
by searching full paths for such binaries.

M  +13   -1    app/main.cpp

http://commits.kde.org/kdevelop/b386fb1cf30d5d0682b1fd2eebe2f458ebd75e86
Comment 9 Kevin Funk 2016-09-08 12:34:04 UTC
Git commit 449d55cfc1688c55e7b83a61056ca0698a94ed26 by Kevin Funk, on behalf of Anton Anikin.
Committed on 08/09/2016 at 12:33.
Pushed by kfunk into branch '5.0'.

Fix KDevelop crashes when trying to debug from command-line

Fixes the crash in KDE bug #367837 that is caused by starting
debugging session from command line:

kdevelop -d gdb dolphin

This caused to ASSERT: QFile::exists(). Current version fix it
by searching full paths for such binaries.
FIXED-IN: 5.0.1
(cherry picked from commit b386fb1cf30d5d0682b1fd2eebe2f458ebd75e86)

M  +13   -1    app/main.cpp

http://commits.kde.org/kdevelop/449d55cfc1688c55e7b83a61056ca0698a94ed26