assert "meOwner" failed in DeleteAll()

Bug #1787810 reported by Nicolas Robadey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
jean-pierre charras

Bug Description

While adding a new sheet in eeschema, I get an "assertion failed".
Debian linux testing, kernel 4.9.0-7-amd64. See below for KiCad version info.

ASSERT INFO:
/build/kicad-HsRk5v/kicad-5.0.0+dfsg1/common/dlist.cpp(46): assert "meOwner" failed in DeleteAll().

BACKTRACE:
[1] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[2] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[3] wxEvtHandler::TryHereOnly(wxEvent&)
[4] wxEvtHandler::DoTryChain(wxEvent&)
[5] wxEvtHandler::ProcessEvent(wxEvent&)
[6] wxWindowBase::TryAfter(wxEvent&)
[7] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[8] wxMenuBase::SendEvent(int, int)
[9] g_closure_invoke
[10] g_signal_emit_valist
[11] g_signal_emit
[12] gtk_widget_activate
[13] gtk_menu_shell_activate_item
[14] g_closure_invoke
[15] g_signal_emit_valist
[16] g_signal_emit
[17] gtk_propagate_event
[18] gtk_main_do_event
[19] g_main_context_dispatch
[20] g_main_loop_run
[21] gtk_main
[22] wxGUIEventLoop::DoRun()
[23] wxEventLoopBase::Run()
[24] wxAppConsoleBase::MainLoop()
[25] wxEntry(int&, wchar_t**)
[26] __libc_start_main
[27] _start

***

Application: kicad
Version: 5.0.0+dfsg1-1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.0 OpenSSL/1.1.0h zlib/1.2.11 libidn2/2.0.4 libpsl/0.20.2 (+libidn2/2.0.4) libssh2/1.8.0 nghttp2/1.32.0 librtmp/2.3
Platform: Linux 4.17.0-1-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.62.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.60.0
    Compiler: GCC 8.1.0 with C++ ABI 1013

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=OFF

Tags: eeschema
Revision history for this message
Nick Østergaard (nickoe) wrote :

What do you mean by adding a new sheet? Could you be a bit more specific?

tags: added: eeschema
Revision history for this message
Jeff Young (jeyjey) wrote :

Is this another version of the infamous "all tracks disappear" bug? (Yes, that one was in Pcbnew, but they both make use of DLIST, and if one DLIST is deleting the contents owned by another then that would certainly produce something like we were seeing.)

Revision history for this message
Jeff Young (jeyjey) wrote :

Here's the stack trace I get:

Call stack:
[00] SCH_SCREEN::FreeDrawList() sch_screen.cpp:16
[01] SCH_SCREEN::~SCH_SCREEN() sch_screen.cpp:12
[02] SCH_SCREEN::~SCH_SCREEN() sch_screen.cpp:12
[03] SCH_SCREEN::~SCH_SCREEN() sch_screen.cpp:11
[04] SCH_SHEET::~SCH_SHEET() sch_sheet.cpp:9
[05] SCH_SHEET::~SCH_SHEET() sch_sheet.cpp:9
[06] SCH_SHEET::~SCH_SHEET() sch_sheet.cpp:8
[07] SCH_EDIT_FRAME::AppendSchematic() memory:255
[08] SCH_EDIT_FRAME::OnAppendProject(wxCommandEvent&) files-io.cpp:64

Application: kicad
Version: (6.0.0-rc1-dev-354-gddbf8e3ff-dirty), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Platform: Mac OS X (Darwin 17.7.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (UTF-8,STL containers,compatible with 2.8)
    Boost: 1.66.0
    Curl: 7.57.0
    Compiler: Clang 9.1.0 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=ON
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=OFF
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_ACTION_MENU=OFF
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=OFF
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Revision history for this message
jean-pierre charras (jp-charras) wrote :

I am guessing this issue happens when appending a sheet from another project, not when adding a new sheet.

I don't believe there is an issue in DLIST.
I am thinking there is a flaw in append sheet code (SCH_EDIT_FRAME::AppendSchematic()).
Especially it looks like the DLIST build from the imported sheet is added to the existing schematic (this is the purpose of the import) and when the temporary SCH_SHEET created for the import is deleted the DLIST is (incorrectly) cleaned.

Managing complex hierarchies is always tricky.

Changed in kicad:
status: New → Fix Committed
assignee: nobody → jean-pierre charras (jp-charras)
Revision history for this message
Nicolas Robadey (nrobadey) wrote :

Yes the problem happens when adding a sheet from another project.
The menu option is File/Append Schematic Sheet.

I'm using the french localized version, and did a direct translation instead of switching to the english locale. Sorry for that.

Changed in kicad:
status: Fix Committed → Fix Released
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.