Confirmation dialog after Delete for a locked item - crash

Bug #1839534 reported by eelik
164
This bug affects 20 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Jeff Young

Bug Description

If I press Delete on top of a locked footprint pcbnew opens the confirmation dialog warning about locked item. After accepting it the footprint is moved with the cursor. Then I have to press Delete still twice to delete it.

Application: KiCad
Version: (5.1.4-6-g300381ba4)-1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.1
    Compiler: GCC 8.2.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_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Tags: pcbnew
Revision history for this message
eelik (eelik) wrote :

This is more serious. If I click "Yes" fast enough the "click twice" message is still in the view and KiCad crashes. If I wait a bit longer the message disappears from the background before the dialog is closed and it doesn't crash.

summary: - Confirmation dialog after Delete for a locked item
+ Confirmation dialog after Delete for a locked item - crash
Changed in kicad:
status: New → Triaged
importance: Undecided → Critical
milestone: none → 5.1.5
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I can also duplicate this by hitting escape to exit to the select tool (I have no idea which tool is active because the toolbar shows no tool active) and undoing the operation (which itself is broken) then attempting another delete operation which throws an assertion and segfaults after I dismiss the lock warning dialog. This also happens in the master branch.

Application: Pcbnew
Version: (5.1.0-1465-g0b87a92ed), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.65.1 OpenSSL/1.1.1c zlib/1.2.11 libidn2/2.2.0 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.37.0 librtmp/2.3
Platform: Linux 4.19.0-5-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.67.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.65.1
    Compiler: Clang 7.0.1 with C++ ABI 1002

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON
    KICAD_STDLIB_DEBUG=OFF
    KICAD_STDLIB_LIGHT_DEBUG=OFF
    KICAD_SANITIZE=OFF

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

Here is the assertion:

ASSERT INFO:
/home/wayne/src/kicad-trunk/common/tool/tool_manager.cpp(517): assert "!st->pendingWait" failed in ScheduleWait().

BACKTRACE:
[1] finish libcontext.cpp

The gdb backtrace isn't much use because the context switch has clobber the stack:

Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
0x0000000000591161 in jump_fcontext ()
(gdb) bt
#0 0x0000000000591161 in jump_fcontext ()
#1 0x00007ffff5b5bebe in g_object_unref ()
    at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#2 0x00007ffff5b7e3a0 in g_value_unset ()
    at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#3 0x00007ffff5b731ed in g_signal_emit_valist ()
    at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#4 0x00007ffff5b7a507 in g_type_free_instance ()
    at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#5 0x0000000002d61e90 in ()
#6 0x0000000002d61e10 in ()
#7 0x00007ffff5d749d8 in gtk_widget_get_default_style ()
    at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#8 0x00007ffff6019e20 in () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#9 0x00007ffff5b56da1 in g_closure_invoke ()
    at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff5b6aa6b in () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x0000000002670b60 in ()
#12 0x000000000082a990 in ()
#13 0x000000000268a0c0 in ()
#14 0x00007ffff5b9e220 in () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff5b7a507 in g_type_free_instance ()
    at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x000000000000008f in ()
#17 0x00000000024b7940 in ()
#18 0x00007ffff58dccd4 in g_slice_free1 ()
    at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ffff5b7a507 in g_type_free_instance ()
    at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#20 0x0000000000000000 in ()

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

We added a status popup for this, but it looks like the old facility didn't get removed and they're now fighting.

Changed in kicad:
assignee: nobody → Jeff Young (jeyjey)
status: Triaged → In Progress
Revision history for this message
Jeff Young (jeyjey) wrote :

Turned out to be a bit more complicated: it was because activating the edit tool for something like delete runs the Main() loop (which was also the Move loop).

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

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

Changed in kicad:
status: In Progress → Fix Committed
Revision history for this message
jean-pierre charras (jp-charras) wrote :

Hi Jeff,

Do not forget to fix this crash in the Stable 5.1 branch.
Thanks.

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

Thanks, JP. It had indeed slipped my mind.

Revision history for this message
eelik (eelik) wrote :

Seems to work correctly now, both in master and in 5.1 testing nightly builds.

Revision history for this message
Otto Mikkonen (ottomaani138) wrote :

I'm still experiencing a crash when trying to delete a locked footprint in pcbnew!
Is this still supposed to happen with "5.1.4-e60b266~84~ubuntu18.04.1, release build"?
That's the latest stable from the official branch.

# # # VERSION INFO # # #

Application: Pcbnew
Version: 5.1.4-e60b266~84~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-62-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.4.0 with C++ ABI 1011

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

Revision history for this message
Otto Mikkonen (ottomaani138) wrote :

Woops, answering to my own question.
Seems to be marked as milestone for KiCad 5.1.5.
So I guess 5.1.4 still crashes.

Revision history for this message
Richard Howlett (dynorice) wrote : Re: [Bug 1839534] Re: Confirmation dialog after Delete for a locked item - crash

I can definitely confirm that if a footprint or pad has the lock flag, it
will crash on Deb Linux. It seems to be somewhat random too. Sometimes it
will prompt me with a dialog box and let me delete, or it just crashes.
Looking forward to the fix!

On Wed, Sep 18, 2019 at 5:41 AM Otto Mikkonen <email address hidden>
wrote:

> Woops, answering to my own question.
> Seems to be marked as milestone for KiCad 5.1.5.
> So I guess 5.1.4 still crashes.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1844208).
> https://bugs.launchpad.net/bugs/1839534
>
> Title:
> Confirmation dialog after Delete for a locked item - crash
>
> Status in KiCad:
> Fix Committed
>
> Bug description:
> If I press Delete on top of a locked footprint pcbnew opens the
> confirmation dialog warning about locked item. After accepting it the
> footprint is moved with the cursor. Then I have to press Delete still
> twice to delete it.
>
> Application: KiCad
> Version: (5.1.4-6-g300381ba4)-1, release build
> Libraries:
> wxWidgets 3.0.4
> libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6
> libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
> Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian,
> wxMSW
> Build Info:
> wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
> Boost: 1.68.0
> OpenCASCADE Community Edition: 6.9.1
> Curl: 7.61.1
> Compiler: GCC 8.2.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_PYTHON3=OFF
> KICAD_SCRIPTING_WXPYTHON=ON
> KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
> KICAD_SCRIPTING_ACTION_MENU=ON
> BUILD_GITHUB_PLUGIN=ON
> KICAD_USE_OCE=ON
> KICAD_USE_OCC=OFF
> KICAD_SPICE=ON
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1839534/+subscriptions
>

Revision history for this message
Per Ekelund (pyraohms) wrote :

PCBnew crashes for me when im attempting delete operation of locked footprint/trace. I get the confirmation dialogue but when i accept it always crashes.

Just wanted to make notice of that these problems still exist. Seems like there is many segfault crash bugs on the bug-list, fortunately with fixes committed.

Looking forward for a new build.

Copy backtrace:

ASSERT INFO:
/build/kicad-XtCUAU/kicad-5.1.4+dfsg1/common/tool/tool_manager.cpp(523): assert "!st->pendingWait" failed in ScheduleWait().

BACKTRACE:
[1] make_fcontext

Messages in terminal:

00:09:11: Debug: Disabling glCopyBuffer() on intel GPU

/build/kicad-XtCUAU/kicad-5.1.4+dfsg1/common/tool/tool_manager.cpp(523): assert "!st->pendingWait" failed in ScheduleWait().

(kicad:22984): Gtk-WARNING **: 00:09:59.869: gtk_window_set_titlebar() called on a realized window
Segmentation fault

Thanks

Revision history for this message
eelik (eelik) wrote :

Per, you didn't give the critical information, namely exact KiCad version info from Help->About->Copy version info. See some posts above for how it looks like.

In the assert info it says "kicad-5.1.4+dfsg1". I guess this means it's some Debian package for v5.1.4. As you can see above, the bug exists in 5.1.4 and has been fixed for 5.1.5.

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.