https://bugs.kde.org/show_bug.cgi?id=364971

            Bug ID: 364971
           Summary: Frequent Crash in ProblemStore::addDiagnostic due to
                    endless recursion
           Product: kdevelop
           Version: git master
          Platform: Compiled Sources
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Language Support: CPP (Clang-based)
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: david.nolden....@art-master.de

I'm getting this crash very frequently, but still it's hard to reproduce.

This always happens when opening a certain file, and the only way to fix the
problem is to delete the duchain cache.

It's hard to reproduce, but my impression is, that during re-parsing, some
problems and/or diagnostics are not updated properly, so that they reference
the wrong problem indices as children, thus producing a recursive linkage.

It may be due to the weird things that happen in
LocalIndexedProblem::LocalIndexedProblem. The ideal solution would be to avoid
the duplicity of the "m_diagnostics" member in KDevelop::Problem and its
duchain version in ProblemData. Why not just store the child diagnostics in
DUChainData as IndexProblem' And deserialize the diagnostics on-demand?

Here's the backtrace:
#2628 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5ceaa30, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2629 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5f1fc00, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2630 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5ea9c00, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2631 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5c64a90, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2632 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5f1d2c0, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2633 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5e8b9b0, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2634 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5d6c510, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2635 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5f1a560, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2636 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5e87e90, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2637 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5f19900, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2638 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5f4a5e0, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2639 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5e84790, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2640 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5f16fc0, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2641 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5e832f0, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2642 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5e802d0, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2643 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5f14260, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2644 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5e7e750, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2645 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5f13600, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2646 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5aa4fe0, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2647 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5deb130, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2648 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5f11500, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40
#2649 0x00007ffff7af2085 in (anonymous namespace)::addDiagnostics
(node=0x5e7aad0, diagnostics=...) at
/home/nolden/kdedev/source/extragear/kdevelop/kdevplatform/shell/filteredproblemstore.cpp:40

Reproducible: Always

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

Reply via email to