Pcbnew crashes on startup with assertion failed

Bug #1802359 reported by Alexandre
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Invalid
Undecided
Unassigned

Bug Description

After updating to KiCad 5.0.1, Pcbnew crashes on startup with an assertion failed error:

ASSERT INFO:
../src/common/object.cpp(251): assert "classTable->Get(m_className) == NULL" failed in Register(): Class "wxCommandEvent" already in RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() multiple times or linked some object file twice)?

BACKTRACE:
[1] wxClassInfo::Register()
[2] dlopen
[3] _PyImport_GetDynLoadFunc
[4] _PyImport_LoadDynamicModule
[5] PyImport_ImportModuleLevel
[6] PyObject_Call
[7] PyEval_CallObjectWithKeywords
[8] PyEval_EvalFrameEx
[9] PyEval_EvalCodeEx
[10] PyEval_EvalCode
[11] PyImport_ExecCodeModuleEx
[12] PyImport_ImportModuleLevel
[13] PyObject_Call
[14] PyEval_CallObjectWithKeywords
[15] PyEval_EvalFrameEx
[16] PyEval_EvalCodeEx
[17] PyEval_EvalCode
[18] PyImport_ExecCodeModuleEx
[19] PyImport_ImportModuleLevel
[20] PyObject_Call
[21] PyObject_CallFunction
[22] PyImport_Import
[23] PyImport_ImportModule
[24] PyCObject_Import
[25] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[26] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[27] wxEvtHandler::TryHereOnly(wxEvent&)
[28] wxEvtHandler::DoTryChain(wxEvent&)
[29] wxEvtHandler::ProcessEvent(wxEvent&)
[30] wxWindowBase::TryAfter(wxEvent&)
[31] wxWindowBase::TryAfter(wxEvent&)
[32] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[33] g_closure_invoke
[34] g_signal_emit_valist
[35] g_signal_emit
[36] g_closure_invoke
[37] g_signal_emit_valist
[38] g_signal_emit
[39] g_closure_invoke
[40] g_signal_emit_valist
[41] g_signal_emit
[42] gtk_propagate_event
[43] gtk_main_do_event
[44] g_main_context_dispatch
[45] g_main_loop_run
[46] gtk_main
[47] wxGUIEventLoop::DoRun()
[48] wxEventLoopBase::Run()
[49] wxAppConsoleBase::MainLoop()
[50] wxEntry(int&, wchar_t**)
[51] __libc_start_main
[52] _start

Application: kicad
Version: 5.0.1+dfsg1-2~bpo9+1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.52.1 OpenSSL/1.0.2l zlib/1.2.8 libidn2/0.16 libpsl/0.17.0 (+libidn2/0.16) libssh2/1.7.0 nghttp2/1.18.1 librtmp/2.3
Platform: Linux 4.9.0-7-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.62.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.52.1
    Compiler: GCC 6.3.0 with C++ ABI 1010
Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

I'm running Debian Stretch, installed KiCad via stretch-backports.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

This is a bug with the Debain packaging. It is a direct result of building wxwidgets against gtk2 and wxpython against gtk3. This issues has been know for quite a while so I'm surprised they are still having issues. Unfortunately, the solution requires disable wxPython support.

Changed in kicad:
status: New → Invalid
Revision history for this message
Alexandre (xinayder) wrote :

Thanks. Do you have links to the other issues? I'll send an email to the packaging team complaining about it.

Also, it's weird because pcbnew worked pretty fine on 5.0.0, but became broken on 5.0.1.

Revision history for this message
tijuca (c-schoenert) wrote :

The packaging for KiCad in Debian Stretch hasn't changed between 5.0.0 and 5.0.1 related to external required libraries, there are just the upstream changes merged in.

https://salsa.debian.org/electronics-team/KiCad/kicad/commits/debian/stretch

Also the wxpython stuff in Stretch isn't linked against any GTK3 libraries and hasn't also changed since the the release of Stretch for good reason. So this report can't be blamed to GTK3 related problems.

https://packages.debian.org/stretch/python-wxgtk3.0

shows a required package libwxgtk3.0-0v5 (instead of libwxgtk3.0-gtk3-0v5 like in testing/unstable).

I guess rather it could be one more issue (again on i386) related to the own implementation of some math calculation. Also the reporter is saying the package is working with 5.0.0 but not with 5.0.1.
I'm not an experienced person in reading GDB logs or backtraces nor I use i386 platforms anymore, without any help from people with more knowledge on this I'm unable to fix this issue if it's related to the Debian packaging.

Revision history for this message
Alexandre (xinayder) wrote :

I've found the problem. I was using python-wxgtk3.0=3.0.2.0+dfsg-8 (version available in testing repository) when I should be using 3.0.2.0+dfsg-4. After downgrading and reinstalling Kicad, Pcbnew is working again.

Thanks!

Revision history for this message
Maciej Suminski (orsonmmz) wrote :

Alexandre,

That is interesting, do you know what is the difference between the two packages?

Revision history for this message
Alexandre (xinayder) wrote :

wxpython3.0 (3.0.2.0+dfsg-8) unstable; urgency=medium

  * Update team email address due to alioth retirement (Closes: #899835)

 -- Scott Talbert <email address hidden> Wed, 30 May 2018 23:26:05 -0400

wxpython3.0 (3.0.2.0+dfsg-7) unstable; urgency=medium

  * debian/control: build against GTK+ 3 build of wxwidgets3.0
  * Re-enable binary package python-wxgtk-webview3.0
  * debian/control: Update VCS URLs to reflect new salsa VCS location
  * debian/control: Note conformance with Standards-Version 4.1.3

 -- Scott Talbert <email address hidden> Fri, 30 Mar 2018 00:03:13 -0400

wxpython3.0 (3.0.2.0+dfsg-6) unstable; urgency=medium

  * Add patch to fix wxcairo for pycairo 1.11.1+ (Closes: #884411)

 -- Scott Talbert <email address hidden> Sat, 16 Dec 2017 22:33:43 -0500

wxpython3.0 (3.0.2.0+dfsg-5) unstable; urgency=medium

  * debian/patches/ed88188be7e97a0503f3471f7b0452740b732902.patch:
    Drop pointless patch - it's to a bundled copy of the wxWidgets sources
    which we don't use in the Debian package.
  * Disable binary package python-wxgtk-webview3.0. (Closes: #876789)

 -- Olly Betts <email address hidden> Tue, 26 Sep 2017 13:06:44 +1300

Taken from here: https://metadata.ftp-master.debian.org/changelogs//main/w/wxpython3.0/wxpython3.0_3.0.2.0+dfsg-8_changelog

Revision history for this message
Maciej Suminski (orsonmmz) wrote :

Thank you Alexandre, that explains everything. Since 3.0.2.0+dfsg-7 the package is built against GTK3, so you experience all problems typical for such combination. The issues are now mostly resolved in the nightly builds, but we cannot backport them to 5.0 branch.

Revision history for this message
tijuca (c-schoenert) wrote :

I've adjusted the package dependency on python-wxgtk3.0 for Stretch Backports to breaks on <= 3.0.2.0+dfsg-4. This is the newest version in Stretch. Users are always a bit more bustling than the maintainers. ;)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.