[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-22 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=431391

--- Comment #17 from gjditchfi...@acm.org ---
kdevelop 4:5.6.1+p20.04+git20210122.1015-0 works for me.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-22 Thread Sandro Knauß
https://bugs.kde.org/show_bug.cgi?id=431391

--- Comment #16 from Sandro Knauß  ---
Thanks a lot: This patch fixed the issue for me. kdevelop is compiled against
clang-8.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-22 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=431391

Milian Wolff  changed:

   What|Removed |Added

  Latest Commit||https://invent.kde.org/kdev
   ||elop/kdevelop/commit/03a16b
   ||f1f5d99380dfa927ba4660935d4
   ||3fae483
 Status|CONFIRMED   |RESOLVED
 Resolution|--- |FIXED

--- Comment #15 from Milian Wolff  ---
Git commit 03a16bf1f5d99380dfa927ba4660935d43fae483 by Milian Wolff.
Committed on 22/01/2021 at 09:32.
Pushed by mwolff into branch 'master'.

Disable calls to clang_Type_getSizeOf for llvm-9 and below

Apparently that is unstable upstream. It works fine with llvm-10
and upwards I believe, so let's only keep this functionality for
these versions.

M  +6-0plugins/clang/duchain/builder.cpp

https://invent.kde.org/kdevelop/kdevelop/commit/03a16bf1f5d99380dfa927ba4660935d43fae483

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-22 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=431391

--- Comment #14 from Milian Wolff  ---
it seems like it only affects older llvm versions, so I'll disable these
features with anything older than llvm 10 - let's see if that covers it

otherwise I'll need a way to reproduce this

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-21 Thread Francis Herne
https://bugs.kde.org/show_bug.cgi?id=431391

Francis Herne  changed:

   What|Removed |Added

 CC||m...@flherne.uk

--- Comment #13 from Francis Herne  ---
Note that the latter bug reporter (hefee on IRC) was using a version with the
`type = clang_getCanonicalType(type);` commit, so it appears not to be a
complete fix.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-21 Thread Francis Herne
https://bugs.kde.org/show_bug.cgi?id=431391

Francis Herne  changed:

   What|Removed |Added

 CC||skna...@kde.org

--- Comment #12 from Francis Herne  ---
*** Bug 431887 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-21 Thread Francis Herne
https://bugs.kde.org/show_bug.cgi?id=431391

Francis Herne  changed:

   What|Removed |Added

 CC||gjditchfi...@acm.org

--- Comment #11 from Francis Herne  ---
*** Bug 431796 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-12 Thread David Redondo
https://bugs.kde.org/show_bug.cgi?id=431391

--- Comment #10 from David Redondo  ---
(In reply to Milian Wolff from comment #9)
> you could build against clang-8 by setting up the cmake env properly
> 
> anyhow, I guess I should just blindly push this change and then let neon
> update their packages, maybe it helps - it certainly sounds like the correct
> thing to do

I build against clang-8 but got no crash so far, also sadly I cannot provoke
the systems packages to crash anymore, sorry :/

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-12 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=431391

--- Comment #9 from Milian Wolff  ---
you could build against clang-8 by setting up the cmake env properly

anyhow, I guess I should just blindly push this change and then let neon update
their packages, maybe it helps - it certainly sounds like the correct thing to
do

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-12 Thread nbgyan
https://bugs.kde.org/show_bug.cgi?id=431391

--- Comment #8 from nbgyan  ---
Update: 

after disabling Background Parser in Settings->Configure KDevelop, crashes have
stopped.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-12 Thread David Redondo
https://bugs.kde.org/show_bug.cgi?id=431391

--- Comment #7 from David Redondo  ---
(In reply to Milian Wolff from comment #6)
> can you try to call clang_getCanonicalType beforehand, and see if the issue
> persists? something like the following:
> 
> ```
> diff --git a/plugins/clang/duchain/builder.cpp
> b/plugins/clang/duchain/builder.cpp
> index 1024ca3100..796c7ce2dc 100644
> --- a/plugins/clang/duchain/builder.cpp
> +++ b/plugins/clang/duchain/builder.cpp
> @@ -928,6 +928,8 @@ void Visitor::setTypeSize(CXType type, AbstractType*
> kdevType) const
>  {
>  if (kdevType->whichType() == AbstractType::TypeFunction)
>  return;
> +
> +type = clang_getCanonicalType(type);
>  if (type.kind == CXType_Elaborated)
>  return;
>  
> ```
> 
> If it persists, can you try to add CXType_Auto to the early return check and
> re-run the clang unit tests and see if it affects size information on lines
> like
> 
> ```
> auto foo = 4;
> ```

I could do that but sadly not judge the impact because with my self compiled
KDevelop I cannot reproduce this crash that happens with the system package.

Maybe the clang version makes a difference here as I build against clang 10? I 
will try to rebuild against 8 to see if I can reproduce the crash this way.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-12 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=431391

--- Comment #6 from Milian Wolff  ---
can you try to call clang_getCanonicalType beforehand, and see if the issue
persists? something like the following:

```
diff --git a/plugins/clang/duchain/builder.cpp
b/plugins/clang/duchain/builder.cpp
index 1024ca3100..796c7ce2dc 100644
--- a/plugins/clang/duchain/builder.cpp
+++ b/plugins/clang/duchain/builder.cpp
@@ -928,6 +928,8 @@ void Visitor::setTypeSize(CXType type, AbstractType*
kdevType) const
 {
 if (kdevType->whichType() == AbstractType::TypeFunction)
 return;
+
+type = clang_getCanonicalType(type);
 if (type.kind == CXType_Elaborated)
 return;

```

If it persists, can you try to add CXType_Auto to the early return check and
re-run the clang unit tests and see if it affects size information on lines
like

```
auto foo = 4;
```

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-12 Thread David Redondo
https://bugs.kde.org/show_bug.cgi?id=431391

--- Comment #5 from David Redondo  ---
I have it in gdb 

(gdb) p type
$1 = {kind = CXType_Auto, data = {0x7fff6c9d34a0, 0x7fff6cbe4790}}


I am also available on irc if you need more infos

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-12 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=431391

--- Comment #4 from Milian Wolff  ---
no it doesn't help I'm afraid :) I need either a simple way to reproduce or the
info I requested - otherwise I don't really know what to do

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-11 Thread nbgyan
https://bugs.kde.org/show_bug.cgi?id=431391

--- Comment #3 from nbgyan  ---
(In reply to Milian Wolff from comment #2)
> when you run into this, could you please do me a favor and attach GDB and
> then go to frame
> 
> #8  0x7f76e5df973a in (anonymous
> namespace)::Visitor::setTypeSize(CXType, KDevelop::AbstractType*) (type=...,
> kdevType=0x7f76cc7b5190, this=) at
> ./plugins/clang/duchain/builder.cpp:934
> 
> and then do
> 
> (gdb) print type
> 
> that may give us a way to skip this type when it's known-to-crash.

Tried in vain to do this with gdb but I realised that the issue is with the
background parser only when I tried setting up an imported project like
plasma-discover for development on my workstation. 

After using kdesrc-build to fetch discover and trying to import the project
into kdevelop from CMakelist.txt it works fine. And then it crashes because the
background parser stalls at some point. This does not happen if, say, I start a
new project from scratch. I hope this helps.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-11 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=431391

--- Comment #2 from Milian Wolff  ---
when you run into this, could you please do me a favor and attach GDB and then
go to frame

#8  0x7f76e5df973a in (anonymous namespace)::Visitor::setTypeSize(CXType,
KDevelop::AbstractType*) (type=..., kdevType=0x7f76cc7b5190, this=) at ./plugins/clang/duchain/builder.cpp:934

and then do

(gdb) print type

that may give us a way to skip this type when it's known-to-crash.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-11 Thread David Redondo
https://bugs.kde.org/show_bug.cgi?id=431391

David Redondo  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|REPORTED|CONFIRMED

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdevelop] [Bug 431391] KDevelop crashes on startup

2021-01-11 Thread David Redondo
https://bugs.kde.org/show_bug.cgi?id=431391

David Redondo  changed:

   What|Removed |Added

 CC||k...@david-redondo.de

--- Comment #1 from David Redondo  ---
Hitting that too

-- 
You are receiving this mail because:
You are watching all bug changes.