Bug 396917 - Crashes on autocompletion of some weird code
Summary: Crashes on autocompletion of some weird code
Status: RESOLVED WORKSFORME
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: 5.2.1
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-07-27 23:52 UTC by Vitaliy
Modified: 2018-12-05 03:44 UTC (History)
2 users (show)

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


Attachments
Minimal example to reproduce the crash (40 bytes, text/x-c++src)
2018-07-27 23:52 UTC, Vitaliy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaliy 2018-07-27 23:52:18 UTC
Created attachment 114171 [details]
Minimal example to reproduce the crash

When a function name is parenthesized in its declaration, it can’t be used in autocompletion.

To reproduce, open the attached file, press Ctrl+Space inside the `main` function, select `fn1` (not “implement fn1”), press Enter. On my system, it crashes with SEGV reliably.

Personally, I consider such declarations weird, but they are valid C, and used extensively in Lua.

Possibly related: #388971, #396196
Comment 1 Sven Brauch 2018-08-13 09:48:14 UTC
It doesn't crash here, but it doesn't work either (the item does not execute).
Comment 2 Vitaliy 2018-09-01 22:51:38 UTC
Discovered that it depends on completion type. If I choose “simple” (marked with {}) autocompletion, it doesn’t crash. But if I choose “function” (marked with a purple rect) one, it does crash.

@Sven Brauch that may depend on installed libraries, despite AppImage expected to be self-contained. I have Parabola GNU/Linux, that’s almost Arch Linux.
Comment 3 Amish Naidu 2018-10-19 16:48:31 UTC
Works for me with kdevelop built from master, OS: Antergos.
Executing `fn1`, it completes to `fn1(|)` as expected.
Comment 4 Andrew Crouthamel 2018-11-05 03:03:15 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 set the bug status 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 5 Bug Janitor Service 2018-11-20 04:47: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 6 Bug Janitor Service 2018-12-05 03:44:51 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!