Bug 410942 - Frequent segfaults when mouse-overing C typedefs in KDevelop
Summary: Frequent segfaults when mouse-overing C typedefs in KDevelop
Status: RESOLVED FIXED
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: language (other bugs)
Version First Reported In: 5.4.0
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-15 15:25 UTC by Andrei Alexeyev
Modified: 2019-10-04 09:02 UTC (History)
2 users (show)

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


Attachments
stack trace (5.37 KB, text/plain)
2019-08-15 15:25 UTC, Andrei Alexeyev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Alexeyev 2019-08-15 15:25:38 UTC
Created attachment 122141 [details]
stack trace

SUMMARY 
Consider this C code:

    // some_header.h

    typedef struct Foo {
        int bar;
        ....
    } Foo;

    // some_source.c

    #include "some_header.h"

    int some_func(Foo *my_foo) {
        ....
    }

Hovering the mouse cursor over the Foo in some_source.c would frequently, but not consistently, crash KDevelop instead of bringing up the type information tooltip. A stack trace is attached.

STEPS TO REPRODUCE
Unfortunately I was unable to consistently reproduce the issue. I can only say that it often occurs when I'm working on this codebase: https://github.com/taisei-project/taisei/

OBSERVED RESULT
Segmentation fault

EXPECTED RESULT
Type information tooltip

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.60.0
Qt Version: 5.13.0

ADDITIONAL INFORMATION
This is definitely a 5.4 regression. Going back to 5.3 fixes the problem.
Comment 1 Christoph Roick 2019-09-04 21:24:45 UTC
I think this might get fixed here: https://invent.kde.org/kde/kdevelop/merge_requests/59

Could you check if the crash happens, if you rename one of the "Foo"s?
Comment 2 evan 2019-09-11 15:24:02 UTC
i think i have a similar problem, this code below is enough to reproduce it.

#include "SDL2/SDL.h"
SDL_Texture *foo;

for me hovering on the SDL_Texture will always crashes it.
Comment 3 Andrei Alexeyev 2019-10-02 07:56:58 UTC
@Christoph, indeed, renaming either the struct or the typedef seems to prevent the crash. I can't be 100% sure however, because I still don't have a reliable method to trigger it.