This forum has been archived. All content is frozen. Please use KDE Discuss instead.

kdevelop crashes when parsing wxWidgets source files

Tags: None
(comma "," separated)
kde-nmset
Registered Member
Posts
3
Karma
0
I am using kdevelop on Arch Linux to build wx apps as cmake projects. A few weeks or months ago, it was just fine. Now kdevelop 22.12.3 crashes when it parses the source files after the project is successfully loaded. Once in a while, it would load and parse successfully.

I can't know if it's related to kdevelop internals, or to a problem in the cmake files of wxWidgets. Other projects not involving wxWidgets do not have this issue. The problem has been tagged 'out of scope' on the wxWidgets forum.

This backtrace is obtained from a debug build :

Code: Select all
Process 57790 stopped
* thread #44, name = 'Queue(0x555555e', stop reason = signal SIGSEGV: address access protected (fault address: 0x7fff1d7fb6c0)
    frame #0: 0x00007ffff2b6cb50 libc.so.6`___lldb_unnamed_symbol4384 + 1360
libc.so.6`___lldb_unnamed_symbol4384:
->  0x7ffff2b6cb50 <+1360>: vmovdqu 0x1000(%rsi), %ymm4
    0x7ffff2b6cb58 <+1368>: vmovdqu 0x1020(%rsi), %ymm5
    0x7ffff2b6cb60 <+1376>: vmovdqu 0x1040(%rsi), %ymm6
    0x7ffff2b6cb68 <+1384>: vmovdqu 0x1060(%rsi), %ymm7
(lldb) bt
* thread #44, name = 'Queue(0x555555e', stop reason = signal SIGSEGV: address access protected (fault address: 0x7fff1d7fb6c0)
  * frame #0: 0x00007ffff2b6cb50 libc.so.6`___lldb_unnamed_symbol4384 + 1360
    frame #1: 0x00007ffefe6aaae6 libclang.so.15`___lldb_unnamed_symbol20323 + 742
    frame #2: 0x00007ffefd866a43 libclang.so.15`___lldb_unnamed_symbol4300 + 67
    frame #3: 0x00007fff5c283ad7 libKDevClangPrivate.so.510`void (anonymous namespace)::Visitor::setDeclData<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f0730, decl=0x00007fff02869c20)6>(CXCursor, KDevelop::ClassMemberDeclaration*) const at builder.cpp:1157:23
    frame #4: 0x00007fff5c28366b libKDevClangPrivate.so.510`KDevelop::ClassMemberDeclaration* (anonymous namespace)::Visitor::createDeclarationCommon<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f09a0, id=0x00007fff1d7f0b40)6, KDevelop::ClassMemberDeclaration>(CXCursor, KDevelop::Identifier const&) at builder.cpp:445:9
    frame #5: 0x00007fff5c282de7 libKDevClangPrivate.so.510`KDevelop::Declaration* (anonymous namespace)::Visitor::createDeclaration<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f0ac0, id=0x00007fff1d7f0b40, context=0x0000000000000000)6, KDevelop::ClassMemberDeclaration>(CXCursor, KDevelop::Identifier const&, KDevelop::DUContext*) at builder.cpp:456:21
    frame #6: 0x00007fff5c282cfb libKDevClangPrivate.so.510`CXChildVisitResult (anonymous namespace)::Visitor::buildDeclaration<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f0bb0)6, KDevelop::ClassMemberDeclaration, false>(CXCursor) at builder.cpp:1291:5
    frame #7: 0x00007fff5c257593 libKDevClangPrivate.so.510`CXChildVisitResult (anonymous namespace)::Visitor::dispatchCursor<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f0c20, parent=CXCursor @ 0x00007fff1d7f0c40)6, (Decision)0, (Decision)1, (detail::enabler)0>(CXCursor, CXCursor) at builder.cpp:1007:12
    frame #8: 0x00007fff5c254394 libKDevClangPrivate.so.510`(anonymous namespace)::visitCursor(cursor=CXCursor @ 0x00007fff1d7f16b0, parent=CXCursor @ 0x00007fff1d7f16d0, data=0x00007fff1d7f8170) at builder.cpp:1673:5
    frame #9: 0x00007ffefd78cf5e libclang.so.15`___lldb_unnamed_symbol2641 + 126
    frame #10: 0x00007ffefd78db16 libclang.so.15`___lldb_unnamed_symbol2643 + 582
    frame #11: 0x00007ffefd78dd48 libclang.so.15`___lldb_unnamed_symbol2644 + 168
    frame #12: 0x00007ffefd78afec libclang.so.15`___lldb_unnamed_symbol2640 + 1644
    frame #13: 0x00007ffefd78e6d0 libclang.so.15`clang_visitChildren + 240
    frame #14: 0x00007fff5c27657c libKDevClangPrivate.so.510`CXChildVisitResult (anonymous namespace)::Visitor::buildDeclaration<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f2190)2, KDevelop::ClassDeclaration, true>(CXCursor) at builder.cpp:1288:9
    frame #15: 0x00007fff5c278e4d libKDevClangPrivate.so.510`CXChildVisitResult (anonymous namespace)::Visitor::dispatchCursor<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f2240, parent=CXCursor @ 0x00007fff1d7f2260)2, (Decision)1, (Decision)0, (detail::enabler)0>(CXCursor, CXCursor) at builder.cpp:1007:12
    frame #16: 0x00007fff5c275c7d libKDevClangPrivate.so.510`CXChildVisitResult (anonymous namespace)::Visitor::dispatchCursor<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f2370, parent=CXCursor @ 0x00007fff1d7f2390)2, (Decision)1, (Decision)2, (detail::enabler)0>(CXCursor, CXCursor) at builder.cpp:982:9
    frame #17: 0x00007fff5c256e13 libKDevClangPrivate.so.510`CXChildVisitResult (anonymous namespace)::Visitor::dispatchCursor<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f24a0, parent=CXCursor @ 0x00007fff1d7f24c0)2, (Decision)2, (detail::enabler)0>(CXCursor, CXCursor) at builder.cpp:971:9
    frame #18: 0x00007fff5c25405c libKDevClangPrivate.so.510`(anonymous namespace)::visitCursor(cursor=CXCursor @ 0x00007fff1d7f2f30, parent=CXCursor @ 0x00007fff1d7f2f50, data=0x00007fff1d7f8170) at builder.cpp:1669:5
    frame #19: 0x00007ffefe6b1226 libclang.so.15`___lldb_unnamed_symbol20336 + 118
    frame #20: 0x00007ffefd7894f2 libclang.so.15`___lldb_unnamed_symbol2637 + 1026
    frame #21: 0x00007ffefd78a28a libclang.so.15`___lldb_unnamed_symbol2638 + 154
    frame #22: 0x00007ffefd78ab37 libclang.so.15`___lldb_unnamed_symbol2640 + 439
    frame #23: 0x00007ffefd78e6d0 libclang.so.15`clang_visitChildren + 240
    frame #24: 0x00007fff5c25acba libKDevClangPrivate.so.510`CXChildVisitResult (anonymous namespace)::Visitor::buildCompoundStatement<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f3a40)202>(CXCursor) at builder.cpp:1327:9
    frame #25: 0x00007fff5c255b72 libKDevClangPrivate.so.510`(anonymous namespace)::visitCursor(cursor=CXCursor @ 0x00007fff1d7f44d0, parent=CXCursor @ 0x00007fff1d7f44f0, data=0x00007fff1d7f8170) at builder.cpp:1716:25
    frame #26: 0x00007ffefe6b1226 libclang.so.15`___lldb_unnamed_symbol20336 + 118
    frame #27: 0x00007ffefd78a8e6 libclang.so.15`___lldb_unnamed_symbol2639 + 1366
    frame #28: 0x00007ffefd78ae98 libclang.so.15`___lldb_unnamed_symbol2640 + 1304
    frame #29: 0x00007ffefd78e6d0 libclang.so.15`clang_visitChildren + 240
    frame #30: 0x00007fff5c2a7eec libKDevClangPrivate.so.510`CXChildVisitResult (anonymous namespace)::Visitor::buildDeclaration<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f4f90)30, KDevelop::ClassFunctionDeclaration, true>(CXCursor) at builder.cpp:1288:9
    frame #31: 0x00007fff5c2a7883 libKDevClangPrivate.so.510`CXChildVisitResult (anonymous namespace)::Visitor::dispatchCursor<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f5000, parent=CXCursor @ 0x00007fff1d7f5020)30, (Decision)0, (Decision)0, (detail::enabler)0>(CXCursor, CXCursor) at builder.cpp:1007:12
    frame #32: 0x00007fff5c2a74dd libKDevClangPrivate.so.510`CXChildVisitResult (anonymous namespace)::Visitor::dispatchCursor<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f5130, parent=CXCursor @ 0x00007fff1d7f5150)30, (Decision)0, (Decision)2, (detail::enabler)0>(CXCursor, CXCursor) at builder.cpp:982:9
    frame #33: 0x00007fff5c25902e libKDevClangPrivate.so.510`CXChildVisitResult (anonymous namespace)::Visitor::dispatchCursor<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f5260, parent=CXCursor @ 0x00007fff1d7f5280)30, (Decision)2, (detail::enabler)0>(CXCursor, CXCursor) at builder.cpp:970:9
    frame #34: 0x00007fff5c254fa6 libKDevClangPrivate.so.510`(anonymous namespace)::visitCursor(cursor=CXCursor @ 0x00007fff1d7f5cf0, parent=CXCursor @ 0x00007fff1d7f5d10, data=0x00007fff1d7f8170) at builder.cpp:1688:5
    frame #35: 0x00007ffefd78cf5e libclang.so.15`___lldb_unnamed_symbol2641 + 126
    frame #36: 0x00007ffefd78db16 libclang.so.15`___lldb_unnamed_symbol2643 + 582
    frame #37: 0x00007ffefd78dd48 libclang.so.15`___lldb_unnamed_symbol2644 + 168
    frame #38: 0x00007ffefd78afec libclang.so.15`___lldb_unnamed_symbol2640 + 1644
    frame #39: 0x00007ffefd78e6d0 libclang.so.15`clang_visitChildren + 240
    frame #40: 0x00007fff5c2acdfc libKDevClangPrivate.so.510`CXChildVisitResult (anonymous namespace)::Visitor::buildDeclaration<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f67d0)31, KDevelop::ClassDeclaration, true>(CXCursor) at builder.cpp:1288:9
    frame #41: 0x00007fff5c2af58d libKDevClangPrivate.so.510`CXChildVisitResult (anonymous namespace)::Visitor::dispatchCursor<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f6880, parent=CXCursor @ 0x00007fff1d7f68a0)31, (Decision)1, (Decision)0, (detail::enabler)0>(CXCursor, CXCursor) at builder.cpp:1007:12
    frame #42: 0x00007fff5c2ac4fd libKDevClangPrivate.so.510`CXChildVisitResult (anonymous namespace)::Visitor::dispatchCursor<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f69b0, parent=CXCursor @ 0x00007fff1d7f69d0)31, (Decision)1, (Decision)2, (detail::enabler)0>(CXCursor, CXCursor) at builder.cpp:982:9
    frame #43: 0x00007fff5c259343 libKDevClangPrivate.so.510`CXChildVisitResult (anonymous namespace)::Visitor::dispatchCursor<(this=0x00007fff1d7f8170, cursor=CXCursor @ 0x00007fff1d7f6ae0, parent=CXCursor @ 0x00007fff1d7f6b00)31, (Decision)2, (detail::enabler)0>(CXCursor, CXCursor) at builder.cpp:971:9
    frame #44: 0x00007fff5c255074 libKDevClangPrivate.so.510`(anonymous namespace)::visitCursor(cursor=CXCursor @ 0x00007fff1d7f7570, parent=CXCursor @ 0x00007fff1d7f7590, data=0x00007fff1d7f8170) at builder.cpp:1689:5



A simple test app is as follows, in case it is helpful :

# cat CMakeLists.txt
Code: Select all
cmake_minimum_required(VERSION 3.0)

project(test)

find_package(wxWidgets CONFIG REQUIRED)

add_executable(test WXTestApp.h WXTestApp.cpp)

install(TARGETS test RUNTIME DESTINATION bin)

target_link_libraries(test wx::wxbase wx::wxcore)


# cat WXTestApp.h
Code: Select all
#ifndef WXTESTAPP_H
#define WXTESTAPP_H

#include <wx/wx.h>
#include <wx/frame.h>

class WXTestApp : public wxApp {
    DECLARE_CLASS( WXTestApp )
public:
    WXTestApp();
    virtual ~WXTestApp();
   
    virtual bool OnInit();
    virtual int OnExit();
   
private:

};

class FrameMain : public wxFrame {
     DECLARE_CLASS( FrameMain )
public:
    FrameMain();
    FrameMain(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = _T("Frame main"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxCLOSE_BOX );
    virtual ~FrameMain();

    bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = _T("Frame main"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxCLOSE_BOX );
     
private:
    wxScrolledWindow * m_scrMain;
    wxBoxSizer * m_szMain;
   
    void Init();
    void PrintPickerValue(wxCommandEvent& evt);
};


DECLARE_APP(WXTestApp)
       
#endif /* WXTESTAPP_H */


# cat WXTestApp.cpp
Code: Select all
#include "WXTestApp.h"
#include <iostream>

using namespace std;

IMPLEMENT_APP( WXTestApp )
IMPLEMENT_CLASS( WXTestApp, wxApp )
IMPLEMENT_CLASS( FrameMain, wxFrame )

WXTestApp::WXTestApp()
: wxApp() {
}

WXTestApp::~WXTestApp() {
}

bool WXTestApp::OnInit() {
    SetAppName(_T("WXTextApp"));
    FrameMain * frm = new FrameMain();
    SetTopWindow(frm);
    frm->Create(NULL);
    frm->Show(true);
    return true;
}

int WXTestApp::OnExit() {
    return wxApp::OnExit();
}

FrameMain::FrameMain()
: wxFrame() {
   
}

FrameMain::FrameMain(wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style)
: wxFrame(parent, id, caption, pos, size, style)  {
    Init();
    Centre();
}

FrameMain::~FrameMain() {
   
}

bool FrameMain::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style) {
   
    wxFrame::Create( parent, id, caption, pos, size, style );
    Init();
    Centre();
    return true;
}

void FrameMain::Init() {
    m_scrMain = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize(400, 300), wxHSCROLL|wxVSCROLL );
    m_scrMain->SetScrollbars(1, 1, 0, 0);
    m_szMain = new wxBoxSizer(wxVERTICAL);
    wxBoxSizer * scrollSZ = new wxBoxSizer(wxVERTICAL);
    m_scrMain->SetSizer(scrollSZ, true);
    SetSizer(m_szMain, true);

}


Thank you for any help to troubleshoot this.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]