Bug 387249 - KDevelop Language support C/C++ compilers UI crashes when clicked on manually added compiler.
Summary: KDevelop Language support C/C++ compilers UI crashes when clicked on manually...
Status: RESOLVED DUPLICATE of bug 387224
Alias: None
Product: kdevelop
Classification: Applications
Component: UI: general (show other bugs)
Version: 5.2.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-24 08:45 UTC by Venca B Spam
Modified: 2017-11-24 09:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
How to reproduce bug with some debugger output. (1.98 MB, video/mp4)
2017-11-24 08:46 UTC, Venca B Spam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Venca B Spam 2017-11-24 08:45:04 UTC
KDevelop Language support C/C++ compilers UI crashes when clicked on manually added compiler.

* How to reproduce? *
1. Start KDevelop, manually add Clang compiler (Settings=>Language support=>C/C++ compilers)
2. Close KDevelop
3. Start KDevelop
4. Open "Settings=>Language support=>C/C++ compilers"
5. Click on previously added compiler.

* What happens? *
- KDevelop crashes.

* Expected behavior? *
KDevelop should allow to edit the compiler record.

* Observations / Notes*

- KDevelop crashes on the line "kdevelop/plugins/custom-definesandincludes/compilerprovider/widget/compilerswidget.cpp:177".
It looks it crashes on calling "indexes.first()" event there is an assert two lines above guarding the "indexes" not to be empty.

- Backtrace shows following locals:

```code
(gdb) info local
indexes = {<QListSpecialMethods<QModelIndex>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x152eb80}, d = 0x152eb80}}                          
compiler = <optimized out>   
```

- It happens at least in KDevelop 5.1.x to 5.2.x including my home build made from recent git sources.

- Also please see attached video for how to reproduce and some GDB output.

- Anyway it is not clear what is this Compilers for. ?

- Also do not understand why it always selects GCC as autodetected when my system uses Clang as default. ?
Comment 1 Venca B Spam 2017-11-24 08:46:55 UTC
Created attachment 109029 [details]
How to reproduce bug with some debugger output.

Added video showing how to reproduce the bug with some debugger output.
Comment 2 Sven Brauch 2017-11-24 09:33:26 UTC

*** This bug has been marked as a duplicate of bug 387224 ***