Bug 455533 - Kdevelop crashes upon exit
Summary: Kdevelop crashes upon exit
Status: ASSIGNED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Igor Kushnir
URL:
Keywords: drkonqi
: 448410 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-18 08:15 UTC by Sigbjorn
Modified: 2024-03-17 12:30 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
minimal example that illustrates the crash (50.00 KB, application/x-tar)
2022-06-21 11:01 UTC, Sigbjorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sigbjorn 2022-06-18 08:15:13 UTC
Application: kdevelop (5.8.220402 (22.04.2))

Qt Version: 5.15.4
Frameworks Version: 5.95.0
Operating System: Linux 5.18.5-arch1-1 x86_64
Windowing System: X11
Distribution: Arch Linux
DrKonqi: 5.25.0 [KCrashBackend]

-- Information about the crash:
Unfortunately not a simple repeatable case.
I have tried plain simple projects, and it works perfectly.
I have also tried clearing out the cache to have a clean start (no effect).
The case that triggers the error require to open a mid-size project, open source, 
available at gitlab.com/shyft/shyft-os.

Usual workflow
(1) start kdevelop on a midsize cmake project (gitlab.com/shyft-os/shyft)
(2) Switch language to c++17 mode, use gcc for compiler includes.
(3) let kdevelop parse and finish doing that (will take a while).
(4) When all processes are finished, try to just exit kdevelop.

Expected outcome: a nice close of the app.
My outcome: crash.

Other info:
Working with the project works nice, excellent tool for advanced c++  programming, with high precision on symbol lookups and usage.
The crash occurs at the exit of the application , every time.

I have also experienced similar crash when fetching/changing cmake files from git repo? 
The backtrace shows cmake project handler, so that might be a clue?
I am also working on fedora 35, and fedora 36, getting same issues there.

The crash can be reproduced every time.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f8180000001 in  ()
#5  0x00007f81bb18e2d4 in  () at /usr/lib/qt/plugins/kdevplatform/36/kdevcmakemanager.so
#6  0x00007f81bb17caad in  () at /usr/lib/qt/plugins/kdevplatform/36/kdevcmakemanager.so
#7  0x00007f81fc4be251 in  () at /usr/lib/libQt5Core.so.5
#8  0x00007f81fdf35867 in KDevelop::IProjectController::projectClosing(KDevelop::IProject*) () at /usr/lib/libKDevPlatformInterfaces.so.58
#9  0x00007f81fe043ada in KDevelop::ProjectController::takeProject(KDevelop::IProject*) () at /usr/lib/libKDevPlatformShell.so.58
#10 0x00007f81fe045686 in KDevelop::ProjectController::closeAllProjects() () at /usr/lib/libKDevPlatformShell.so.58
#11 0x00007f81fe035c18 in KDevelop::Core::cleanup() () at /usr/lib/libKDevPlatformShell.so.58
#12 0x00007f81fe03650d in KDevelop::Core::shutdown() () at /usr/lib/libKDevPlatformShell.so.58
#13 0x00007f81fe016e5a in KDevelop::MainWindow::~MainWindow() () at /usr/lib/libKDevPlatformShell.so.58
#14 0x00007f81fe016ebe in KDevelop::MainWindow::~MainWindow() () at /usr/lib/libKDevPlatformShell.so.58
#15 0x00007f81fc4b125a in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#16 0x00007f81fc10316e in KXmlGuiWindow::event(QEvent*) () at /usr/lib/libKF5XmlGui.so.5
#17 0x00007f81fd178a7c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#18 0x00007f81fc48db28 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#19 0x00007f81fc48e623 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#20 0x00007f81fc4d4448 in  () at /usr/lib/libQt5Core.so.5
#21 0x00007f81f8e6fc6b in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#22 0x00007f81f8ec6001 in  () at /usr/lib/libglib-2.0.so.0
#23 0x00007f81f8e6d392 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#24 0x00007f81fc4d827c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#25 0x00007f81fc4862ec in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#26 0x00007f81fc490dd9 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#27 0x000055b929434cc8 in  ()
#28 0x00007f81fba29290 in  () at /usr/lib/libc.so.6
#29 0x00007f81fba2934a in __libc_start_main () at /usr/lib/libc.so.6
#30 0x000055b929435895 in  ()
[Inferior 1 (process 2610) detached]

The reporter indicates this bug may be a duplicate of or related to bug 204624, bug 218094, bug 219583, bug 236501, bug 252656, bug 269809, bug 396347, bug 427378, bug 441893.

Reported using DrKonqi
Comment 1 Igor Kushnir 2022-06-19 07:29:32 UTC
> #5  0x00007f81bb18e2d4 in  () at /usr/lib/qt/plugins/kdevplatform/36/kdevcmakemanager.so
Could you please build KDevelop with debug symbols to generate a more useful backtrace? Or try to download the debug symbols via https://wiki.archlinux.org/title/Debugging/Getting_traces#Debuginfod.
Comment 2 Sigbjorn 2022-06-20 15:22:42 UTC
(In reply to Igor Kushnir from comment #1)
> > #5  0x00007f81bb18e2d4 in  () at /usr/lib/qt/plugins/kdevplatform/36/kdevcmakemanager.so
> Could you please build KDevelop with debug symbols to generate a more useful
> backtrace? Or try to download the debug symbols via
> https://wiki.archlinux.org/title/Debugging/Getting_traces#Debuginfod.

Yes, will try to do provide debug info.
Comment 3 Sigbjorn 2022-06-20 17:08:03 UTC
.. after downloading debuginfo, repeating the crash procedure, and using gdb,(konqi seems to disable/or not read .gdb.ini file, will sort out that later),,
here seems to be the intersting spots:

#7  0x00007fc16bf7faad in CMakeManager::projectClosing (this=0x5646c97164f0, p=<optimized out>) at /usr/src/debug/kdevelop-22.04.2/plugins/cmake/cmakemanager.cpp:660
660             cleanupTestSuites(it->testSuites, it->testSuiteJobs);
(gdb) l
655
656     void CMakeManager::projectClosing(IProject* p)
657     {
658         auto it = m_projects.find(p);
659         if (it != m_projects.end()) {
660             cleanupTestSuites(it->testSuites, it->testSuiteJobs);
661             m_projects.erase(it);
662         }
663     }
664
(gdb) down
#6  0x00007fc16bf912d4 in cleanupTestSuites(QVector<CTestSuite*> const&, QVector<CTestFindJob*> const&) [clone .isra.0] (testSuites=..., testSuiteJobs=...)
    at /usr/src/debug/kdevelop-22.04.2/plugins/cmake/cmakemanager.cpp:440
440             delete testSuite;
(gdb) list
435         for (auto* testSuiteJob : testSuiteJobs) {
436             testSuiteJob->kill(KJob::Quietly);
437         }
438         for (auto* testSuite : testSuites) {
439             ICore::self()->testController()->removeTestSuite(testSuite);
440             delete testSuite;
441         }
442     }
443
444     void CMakeManager::integrateData(const CMakeProjectData &data, KDevelop::IProject* project, const QSharedPointer<CMakeServer>& server)
(gdb) down
#5  0x0000000000000031 in ?? ()
Comment 4 Sigbjorn 2022-06-20 17:21:55 UTC
(In reply to Sigbjorn from comment #3)
> .. after downloading debuginfo, repeating the crash procedure, and using
> gdb,(konqi seems to disable/or not read .gdb.ini file, will sort out that
> later),,
> here seems to be the intersting spots:
> 
> #7  0x00007fc16bf7faad in CMakeManager::projectClosing (this=0x5646c97164f0,
> p=<optimized out>) at
> /usr/src/debug/kdevelop-22.04.2/plugins/cmake/cmakemanager.cpp:660
> 660             cleanupTestSuites(it->testSuites, it->testSuiteJobs);
> (gdb) l
> 655
> 656     void CMakeManager::projectClosing(IProject* p)
> 657     {
> 658         auto it = m_projects.find(p);
> 659         if (it != m_projects.end()) {
> 660             cleanupTestSuites(it->testSuites, it->testSuiteJobs);
> 661             m_projects.erase(it);
> 662         }
> 663     }
> 664
> (gdb) down
> #6  0x00007fc16bf912d4 in cleanupTestSuites(QVector<CTestSuite*> const&,
> QVector<CTestFindJob*> const&) [clone .isra.0] (testSuites=...,
> testSuiteJobs=...)
>     at /usr/src/debug/kdevelop-22.04.2/plugins/cmake/cmakemanager.cpp:440
> 440             delete testSuite;
> (gdb) list
> 435         for (auto* testSuiteJob : testSuiteJobs) {
> 436             testSuiteJob->kill(KJob::Quietly);
> 437         }
> 438         for (auto* testSuite : testSuites) {
> 439             ICore::self()->testController()->removeTestSuite(testSuite);
> 440             delete testSuite;
> 441         }
> 442     }
> 443
> 444     void CMakeManager::integrateData(const CMakeProjectData &data,
> KDevelop::IProject* project, const QSharedPointer<CMakeServer>& server)
> (gdb) down
> #5  0x0000000000000031 in ?? ()

-------------------
bt 15 looks like:
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007fc1aea8e3d3 in __pthread_kill_internal (signo=11, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007fc1aea3e838 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#3  0x00007fc1b0e17840 in KCrash::defaultCrashHandler(int) (sig=11) at /usr/src/debug/kcrash-5.95.0/src/kcrash.cpp:633
#4  0x00007fc1aea3e8e0 in <signal handler called> () at /usr/lib/libc.so.6
#5  0x0000000000000031 in  ()
#6  0x00007fc16bf912d4 in cleanupTestSuites(QVector<CTestSuite*> const&, QVector<CTestFindJob*> const&) [clone .isra.0] (testSuites=..., testSuiteJobs=<optimized out>)
    at /usr/src/debug/kdevelop-22.04.2/plugins/cmake/cmakemanager.cpp:440
#7  0x00007fc16bf7faad in CMakeManager::projectClosing(KDevelop::IProject*) (this=0x5646c97164f0, p=<optimized out>)
    at /usr/src/debug/kdevelop-22.04.2/plugins/cmake/cmakemanager.cpp:660
#8  0x00007fc1af4bd621 in QtPrivate::QSlotObjectBase::call(QObject*, void**)
    (a=0x7fff67a1f820, r=<optimized out>, this=0x5646c9719b60, this=<optimized out>, r=<optimized out>, a=<optimized out>)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#9  doActivate<false>(QObject*, int, void**) (sender=0x5646c6b55210, signal_index=5, argv=0x7fff67a1f820) at kernel/qobject.cpp:3886
#10 0x00007fc1b0e37867 in KDevelop::IProjectController::projectClosing(KDevelop::IProject*) (this=this@entry=0x5646c6b55210, _t1=<optimized out>, 
    _t1@entry=0x5646c9a60b30) at /usr/src/debug/build/kdevplatform/interfaces/KDevPlatformInterfaces_autogen/EWIEGA46WW/moc_iprojectcontroller.cpp:273
#11 0x00007fc1b0f45ada in KDevelop::ProjectController::takeProject(KDevelop::IProject*) (this=0x5646c6b55210, proj=<optimized out>)
    at /usr/src/debug/kdevelop-22.04.2/kdevplatform/shell/projectcontroller.cpp:1059
#12 0x00007fc1b0f47686 in KDevelop::ProjectController::closeProject(KDevelop::IProject*) (proj=0x5646c9a60b30, this=0x5646c6b55210)
    at /usr/src/debug/kdevelop-22.04.2/kdevplatform/shell/projectcontroller.cpp:1077
#13 KDevelop::ProjectController::closeAllProjects() (this=0x5646c6b55210) at /usr/src/debug/kdevelop-22.04.2/kdevplatform/shell/projectcontroller.cpp:1089
#14 0x00007fc1b0f37c18 in KDevelop::Core::cleanup() (this=0x5646c67c9760) at /usr/src/debug/kdevelop-22.04.2/kdevplatform/shell/core.cpp:374
Comment 5 Sigbjorn 2022-06-20 17:32:10 UTC
(In reply to Sigbjorn from comment #4)
> (In reply to Sigbjorn from comment #3)
> > .. after downloading debuginfo, repeating the crash procedure, and using
> > gdb,(konqi seems to disable/or not read .gdb.ini file, will sort out that
> > later),,
> > here seems to be the intersting spots:
> > 
> > #7  0x00007fc16bf7faad in CMakeManager::projectClosing (this=0x5646c97164f0,
> > p=<optimized out>) at
> > /usr/src/debug/kdevelop-22.04.2/plugins/cmake/cmakemanager.cpp:660
> > 660             cleanupTestSuites(it->testSuites, it->testSuiteJobs);
> > (gdb) l
> > 655
> > 656     void CMakeManager::projectClosing(IProject* p)
> > 657     {
> > 658         auto it = m_projects.find(p);
> > 659         if (it != m_projects.end()) {
> > 660             cleanupTestSuites(it->testSuites, it->testSuiteJobs);
> > 661             m_projects.erase(it);
> > 662         }
> > 663     }
> > 664
> > (gdb) down
> > #6  0x00007fc16bf912d4 in cleanupTestSuites(QVector<CTestSuite*> const&,
> > QVector<CTestFindJob*> const&) [clone .isra.0] (testSuites=...,
> > testSuiteJobs=...)
> >     at /usr/src/debug/kdevelop-22.04.2/plugins/cmake/cmakemanager.cpp:440
> > 440             delete testSuite;
> > (gdb) list
> > 435         for (auto* testSuiteJob : testSuiteJobs) {
> > 436             testSuiteJob->kill(KJob::Quietly);
> > 437         }
> > 438         for (auto* testSuite : testSuites) {
> > 439             ICore::self()->testController()->removeTestSuite(testSuite);
> > 440             delete testSuite;
> > 441         }
> > 442     }
> > 443
> > 444     void CMakeManager::integrateData(const CMakeProjectData &data,
> > KDevelop::IProject* project, const QSharedPointer<CMakeServer>& server)
> > (gdb) down
> > #5  0x0000000000000031 in ?? ()
> 
> -------------------
> bt 15 looks like:
> #0  __pthread_kill_implementation (threadid=<optimized out>,
> signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
> #1  0x00007fc1aea8e3d3 in __pthread_kill_internal (signo=11,
> threadid=<optimized out>) at pthread_kill.c:78
> #2  0x00007fc1aea3e838 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
> #3  0x00007fc1b0e17840 in KCrash::defaultCrashHandler(int) (sig=11) at
> /usr/src/debug/kcrash-5.95.0/src/kcrash.cpp:633
> #4  0x00007fc1aea3e8e0 in <signal handler called> () at /usr/lib/libc.so.6
> #5  0x0000000000000031 in  ()
> #6  0x00007fc16bf912d4 in cleanupTestSuites(QVector<CTestSuite*> const&,
> QVector<CTestFindJob*> const&) [clone .isra.0] (testSuites=...,
> testSuiteJobs=<optimized out>)
>     at /usr/src/debug/kdevelop-22.04.2/plugins/cmake/cmakemanager.cpp:440
> #7  0x00007fc16bf7faad in CMakeManager::projectClosing(KDevelop::IProject*)
> (this=0x5646c97164f0, p=<optimized out>)
>     at /usr/src/debug/kdevelop-22.04.2/plugins/cmake/cmakemanager.cpp:660
> #8  0x00007fc1af4bd621 in QtPrivate::QSlotObjectBase::call(QObject*, void**)
>     (a=0x7fff67a1f820, r=<optimized out>, this=0x5646c9719b60,
> this=<optimized out>, r=<optimized out>, a=<optimized out>)
>     at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
> #9  doActivate<false>(QObject*, int, void**) (sender=0x5646c6b55210,
> signal_index=5, argv=0x7fff67a1f820) at kernel/qobject.cpp:3886
> #10 0x00007fc1b0e37867 in
> KDevelop::IProjectController::projectClosing(KDevelop::IProject*)
> (this=this@entry=0x5646c6b55210, _t1=<optimized out>, 
>     _t1@entry=0x5646c9a60b30) at
> /usr/src/debug/build/kdevplatform/interfaces/KDevPlatformInterfaces_autogen/
> EWIEGA46WW/moc_iprojectcontroller.cpp:273
> #11 0x00007fc1b0f45ada in
> KDevelop::ProjectController::takeProject(KDevelop::IProject*)
> (this=0x5646c6b55210, proj=<optimized out>)
>     at
> /usr/src/debug/kdevelop-22.04.2/kdevplatform/shell/projectcontroller.cpp:1059
> #12 0x00007fc1b0f47686 in
> KDevelop::ProjectController::closeProject(KDevelop::IProject*)
> (proj=0x5646c9a60b30, this=0x5646c6b55210)
>     at
> /usr/src/debug/kdevelop-22.04.2/kdevplatform/shell/projectcontroller.cpp:1077
> #13 KDevelop::ProjectController::closeAllProjects() (this=0x5646c6b55210) at
> /usr/src/debug/kdevelop-22.04.2/kdevplatform/shell/projectcontroller.cpp:1089
> #14 0x00007fc1b0f37c18 in KDevelop::Core::cleanup() (this=0x5646c67c9760) at
> /usr/src/debug/kdevelop-22.04.2/kdevplatform/shell/core.cpp:374

...........
running gdb kdevelop, catching the error, and printing the testSuite it tries to delete :
(gdb) p *testSuite
$3 = {<KDevelop::ITestSuite> = {_vptr.ITestSuite = 0x398}, m_executable = {m_data = {d = 0x0}}, 
  m_name = {d = 0x0}, 
  m_cases = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {
          static shared_null = {ref = {atomic = {_q_value = std::atomic<int> = { -1 }}}, alloc = 0, 
            begin = 0, end = 0, array = {0x0}}, d = 0x400000004000}, 
        d = 0x400000004000}}, <No data fields>}, 
  m_args = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {
          static shared_null = {ref = {atomic = {_q_value = std::atomic<int> = { -1 }}}, alloc = 0, 
            begin = 0, end = 0, array = {0x0}}, d = 0x0}, d = 0x0}}, <No data fields>}, 
  m_files = {<QListSpecialMethods<KDevelop::Path>> = {<No data fields>}, {p = {static shared_null = {
          ref = {atomic = {_q_value = std::atomic<int> = { -1 }}}, alloc = 0, begin = 0, end = 0, 
          array = {0x0}}, d = 0x200000000}, d = 0x200000000}}, m_project = {wp = {d = 0x555557a125b0, 
      value = 0x0}}, m_declarations = {{d = 0x0, e = 0x0}}, m_properties = {{d = 0x80000000, 
      e = 0x80000000}}, m_suiteDeclaration = {m_topContext = 1502338080, m_declarationIndex = 21845}}
....
Comment 6 Sigbjorn 2022-06-20 18:07:11 UTC
Based on the stack/listing etc. it seems to be related to the cmake-manager test suite handling.

Other observations of interest:

(0) Re-generating cmake after cmake-file changes, also crashes  the kdevelop (will check on the exact location later, .. is it the same?)
(1) If I disable test (cmake will not generate  ctest suite cmds etc.), there is  no crash

..................
Based on the above my guess is that it might be the cmake manager handling of test-suites info as generated by the cmake command.
In my case, gitlab.com/shyft-os/shyft, using doctest c++ suite,  there will be test-cases with labels, strings, descriptions of any size, so maybe there is something in that area that causes the problems.

there that causes
Comment 7 Igor Kushnir 2022-06-20 19:03:27 UTC
The test suite code is somewhat messy and buggy. I have started fixing it more than a year ago, but sadly postponed that work in favor of other fixes/improvements. If you want to try and fix this issue, I could share my WIP changes. If not, try disabling KDevelop's Unit Test View plugin as a workaround.
Comment 8 Sigbjorn 2022-06-20 21:59:41 UTC
Investigations:

Using the doctest (gitlab.com/doctest), generates test-cases, that are picked up and enlisted by the test executable it self.
In doctest, there test might be grouped into test-suites, and test-cases are 'scoped' to test-suites, so there are no conflicts,  - in doctest.

However, the cmake/integration exports the test-case names, that might be duplicates.

Creating a minimal  cmake  doctest example, with two test-suites, and within each of them, repeats the crash, at the same spot.

A simple workaround to avoid crash during exit, or regeneration of  cmake-files, is just to ensure all test-cases are unique.

Further investigation & resolution could pinpoint the exact cause, and strengthen the cmake/ctest manager so that it handles duplicate test-cases, one way or another (not crashing :-)).
Comment 9 Sigbjorn 2022-06-20 22:05:33 UTC
(In reply to Igor Kushnir from comment #7)
> The test suite code is somewhat messy and buggy. I have started fixing it
> more than a year ago, but sadly postponed that work in favor of other
> fixes/improvements. If you want to try and fix this issue, I could share my
> WIP changes. If not, try disabling KDevelop's Unit Test View plugin as a
> workaround.

Hi, thanks for responding.
As pr my latest investigation, it seems that if there is a duplicate test-case within the suite, that triggers the error.
I guess there is an assumption somewhere that they are unique, but not enforced/handled, so it surfaces as a crash during
destruction of the test-suite structures.

For this there is a workaround, that is, ensure there is no duplicate test-cases enlisted in tests.
Comment 10 Igor Kushnir 2022-06-21 04:11:19 UTC
(In reply to Sigbjorn from comment #9)
> (In reply to Igor Kushnir from comment #7)
> > The test suite code is somewhat messy and buggy. I have started fixing it
> > more than a year ago, but sadly postponed that work in favor of other
> > fixes/improvements. If you want to try and fix this issue, I could share my
> > WIP changes. If not, try disabling KDevelop's Unit Test View plugin as a
> > workaround.
> 
> Hi, thanks for responding.
> As pr my latest investigation, it seems that if there is a duplicate
> test-case within the suite, that triggers the error.
> I guess there is an assumption somewhere that they are unique, but not
> enforced/handled, so it surfaces as a crash during
> destruction of the test-suite structures.
> 
> For this there is a workaround, that is, ensure there is no duplicate
> test-cases enlisted in tests.
Thanks for the investigation. I'll take a look at this duplicate issue when I resume work on test suite fixing.

> However, the cmake/integration exports the test-case names, that might be duplicates.
> Creating a minimal  cmake  doctest example, with two test-suites, and within each of them, repeats the crash, at the same spot.
Could you attach a sample project that triggers the crash?
Comment 11 Sigbjorn 2022-06-21 10:08:31 UTC
(In reply to Igor Kushnir from comment #10)
> (In reply to Sigbjorn from comment #9)
> > (In reply to Igor Kushnir from comment #7)
> > > The test suite code is somewhat messy and buggy. I have started fixing it
> > > more than a year ago, but sadly postponed that work in favor of other
> > > fixes/improvements. If you want to try and fix this issue, I could share my
> > > WIP changes. If not, try disabling KDevelop's Unit Test View plugin as a
> > > workaround.
> > 
> > Hi, thanks for responding.
> > As pr my latest investigation, it seems that if there is a duplicate
> > test-case within the suite, that triggers the error.
> > I guess there is an assumption somewhere that they are unique, but not
> > enforced/handled, so it surfaces as a crash during
> > destruction of the test-suite structures.
> > 
> > For this there is a workaround, that is, ensure there is no duplicate
> > test-cases enlisted in tests.
> Thanks for the investigation. I'll take a look at this duplicate issue when
> I resume work on test suite fixing.
> 
> > However, the cmake/integration exports the test-case names, that might be duplicates.
> > Creating a minimal  cmake  doctest example, with two test-suites, and within each of them, repeats the crash, at the same spot.
> Could you attach a sample project that triggers the crash?

Yes, will do so, might take some hours, to minimise deps to just cmake/ctest.
Comment 12 Sigbjorn 2022-06-21 11:01:16 UTC
Created attachment 149999 [details]
minimal example that illustrates the crash

also available here https://gitlab.com/sigbjorn.helset/kdev-issue-support.git
Comment 13 Sigbjorn 2022-06-21 11:03:57 UTC
The provided example is minimal, and emulates the effects when using multiple test binaries, or delayed test-generation that gives similar effects for even a single binary test project.
Comment 14 Igor Kushnir 2022-06-21 11:12:57 UTC
Thanks for the great sample project. Just reproduced the crash on KDevelop exit at the first try.
Comment 15 Milian Wolff 2022-06-22 16:29:16 UTC
*** Bug 448410 has been marked as a duplicate of this bug. ***
Comment 16 zb4ng 2022-06-24 09:27:46 UTC
just wanted to add that i experience this too:
dist: openSUSE LEAP 15.4
kdevelop Version 5.7.211203 (21.12.3)
KDE Plasma: 5.24.4
kernel: Linux unknown309c23cd67ab 5.14.21-150400.22-default #1 SMP PREEMPT_DYNAMIC Wed May 11 06:57:18 UTC 2022 (49db222) x86_64 x86_64 x86_64 GNU/Linux

after exiting kdevelop: the CPU-load of kdevelop is maxed out and it has a bash child process
KILL (kill -9) is necessary (TERM (kill -15) has no effect)
Comment 17 Igor Kushnir 2022-06-24 10:15:49 UTC
(In reply to zb4ng from comment #16)
> after exiting kdevelop: the CPU-load of kdevelop is maxed out and it has a
> bash child process
> KILL (kill -9) is necessary (TERM (kill -15) has no effect)
This bug report is about a crash on exit, not freeze. Could you be experiencing Bug 379669?
Comment 18 zb4ng 2022-06-24 12:54:12 UTC
(In reply to Igor Kushnir from comment #17)
> This bug report is about a crash on exit, not freeze. Could you be
> experiencing Bug 379669?

You are right. I am sorry, I have missed this while reading...
Comment 19 Gabriele Menna 2022-07-08 14:57:01 UTC
In my setup, this bug was caused by duplicated add_test statements.
Comment 20 Sigbjorn 2022-07-08 15:21:58 UTC
(In reply to Gabriele Menna from comment #19)
> In my setup, this bug was caused by duplicated add_test statements.

Yes, this is according to the  minimal example provided, that triggers the errors. Two test-suites(as executable files), where there is a name-clash.