Assert when trying to move an item after it has been remapped

Bug #1738894 reported by Nick Østergaard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
High
Unassigned

Bug Description

Assert when trying to move an item after it has been remapped.

Steps to reproduce:
1. git clone https://github.com/semianalog/mod12003.git && cd mod12003
2. kicad mod12003.pro
3. Start eeschema
4. Dismiss the missing libs dialog
5. Accept the rescue
6. Remap
7. Close the remap dialog
8. Saving the schematic here or not does not affect the assert
9. Hover over a symbol and hit M for move
10. Then left click somewhere in the canvas with the mouse
11. Assert below is triggered

TIP: On subsequent runs do "git checkout -- . && git clean -fdx && kicad mod12003.pro" in step 2.

The assert is:
ASSERT INFO:
/home/nickoe/kicad-source-mirror/eeschema/schframe.cpp(614): assert "m_undoItem != __null" failed in SaveUndoItemInUndoList(): Cannot swap undo item structures. Bad programmer!.

BACKTRACE:
[1] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[2] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[3] wxEvtHandler::TryHereOnly(wxEvent&)
[4] wxEvtHandler::ProcessEventLocally(wxEvent&)
[5] wxEvtHandler::ProcessEvent(wxEvent&)
[6] wxScrollHelperEvtHandler::ProcessEvent(wxEvent&)
[7] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[8] g_closure_invoke
[9] g_signal_emit_valist
[10] g_signal_emit
[11] gtk_propagate_event
[12] gtk_main_do_event
[13] g_main_context_dispatch
[14] g_main_loop_run
[15] gtk_main
[16] wxGUIEventLoop::DoRun()
[17] wxEventLoopBase::Run()
[18] wxAppConsoleBase::MainLoop()
[19] wxEntry(int&, wchar_t**)
[20] __libc_start_main
[21] _start

Application: kicad
Version: (2017-12-18 revision 3c6d17026)-master, debug build
Libraries:
    wxWidgets 3.0.3
    libcurl/7.57.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.4) libssh2/1.8.0 nghttp2/1.28.0
Platform: Linux 4.14.6-1-ARCH x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.65.1
    Curl: 7.57.0
    Compiler: GCC 7.2.1 with C++ ABI 1011

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_SPICE=ON

Tags: eeschema
summary: - Assert when trying to move an item after it has been remapped and saved
+ Assert when trying to move an item after it has been remapped
description: updated
Revision history for this message
Seth Hillbrand (sethh) wrote :

Looks like there was a stray IS_NEW flag.

The attached patch clears the state after loading the project files.

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

I can confirm that this patch fixes the mentioned issue. Thank you.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1738894] Re: Assert when trying to move an item after it has been remapped

Patch merged. Thanks!

On 12/18/2017 7:09 PM, Seth Hillbrand wrote:
> Looks like there was a stray IS_NEW flag.
>
> The attached patch clears the state after loading the project files.
>
> ** Patch added: "0001-Eeschema-Clear-drawing-state-when-loading-project.patch"
> https://bugs.launchpad.net/kicad/+bug/1738894/+attachment/5024376/+files/0001-Eeschema-Clear-drawing-state-when-loading-project.patch
>

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision f4f0c09fe490d54e065d1b16424f8af61be8790e
https://git.launchpad.net/kicad/patch/?id=f4f0c09fe490d54e065d1b16424f8af61be8790e

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