pcbnew crash (segfault) on find/search

Bug #1830942 reported by Dino Ghilardi on 2019-05-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Critical
Seth Hillbrand

Bug Description

search (ctrl-f) crashes pcbnew.

To reproduce the bug:
- open pcbnew (with or without opening a board)
- search something (ctrl-f or edit->find)
- confirm clicking find item or find marker or using enter (no matter if the string to search is empty or not)
- Segmentation fault.

Tested on revision 4d8be7b2bb5bddc30cf92522dc5ad8dfb9e97bdb

------------------------------
Application: Pcbnew
Version: (5.1.0-774-g4d8be7b2b), debug build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.52.1 OpenSSL/1.0.2r 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-8-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.69.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_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

Dino Ghilardi (dino-ghilardi) wrote :
Download full text (3.5 KiB)

executing in gdb it reports:

Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
0x00007fffda2a37e9 in TOOL_MANAGER::RunAction (this=0x0, aAction=...,
    aNow=true, aParam=0x0)
    at /home/dinoghi/SANDBOXKICAD5/src/kicad/common/tool/tool_manager.cpp:303
303 TOOL_STATE* current = m_activeState;

----------------------
backtrace:
----------------------
#0 0x00007fffda2a37e9 in TOOL_MANAGER::RunAction (this=0x0, aAction=..., aNow=true, aParam=0x0)
    at /home/dinoghi/SANDBOXKICAD5/src/kicad/common/tool/tool_manager.cpp:303
#1 0x00007fffd9882466 in TOOL_MANAGER::RunAction (this=0x0, aAction=..., aNow=true)
    at /home/dinoghi/SANDBOXKICAD5/src/kicad/include/tool/tool_manager.h:157
#2 0x00007fffd98ebfa2 in DIALOG_FIND::onButtonFindItemClick (this=0x55555840c290, aEvent=...)
    at /home/dinoghi/SANDBOXKICAD5/src/kicad/pcbnew/dialogs/dialog_find.cpp:88
#3 0x00007ffff634440e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#4 0x00007ffff64c9ea5 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#5 0x00007ffff64ca29d in wxEvtHandler::SearchDynamicEventTable(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#6 0x00007ffff64ca31f in wxEvtHandler::TryHereOnly(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#7 0x00007ffff64ca3d3 in wxEvtHandler::ProcessEventLocally(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#8 0x00007ffff64ca435 in wxEvtHandler::ProcessEvent(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#9 0x00007ffff64ca1a7 in wxEvtHandler::SafelyProcessEvent(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#10 0x00007ffff6cb77d7 in ?? () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#11 0x00007ffff2954f75 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff2967053 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007ffff296fbdc in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007ffff296ffbf in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff2eda01e in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#16 0x00007ffff2f7e7bc in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#17 0x00007ffff2954f75 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007ffff296737d in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x00007ffff296f67f in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#20 0x00007ffff296ffbf in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007ffff30968ac in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#22 0x00007ffff2f7d03f in gtk_propagate_event () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#23 0x00007ffff2f7d33b in gtk_main_do_event () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#24 0x00007ffff2bf2cbc in ?? () from /usr/lib/x86_64-linux-gnu...

Read more...

Dino Ghilardi (dino-ghilardi) wrote :
Download full text (3.6 KiB)

Also in footprint editor there is the same issue.

Tested on same version/revision as above.

---------------------------------------
running in gdb:

Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
0x00007fffde4de7e9 in TOOL_MANAGER::RunAction (this=0x0, aAction=...,
    aNow=true, aParam=0x0)
    at /home/dinoghi/SANDBOXKICAD5/src/kicad/common/tool/tool_manager.cpp:303
303 TOOL_STATE* current = m_activeState;

---------------
backtrace:
---------------
#0 0x00007fffde4de7e9 in TOOL_MANAGER::RunAction (this=0x0, aAction=..., aNow=true, aParam=0x0)
    at /home/dinoghi/SANDBOXKICAD5/src/kicad/common/tool/tool_manager.cpp:303
#1 0x00007fffddabd466 in TOOL_MANAGER::RunAction (this=0x0, aAction=..., aNow=true)
    at /home/dinoghi/SANDBOXKICAD5/src/kicad/include/tool/tool_manager.h:157
#2 0x00007fffddb26fa2 in DIALOG_FIND::onButtonFindItemClick (this=0x55555b237620, aEvent=...)
    at /home/dinoghi/SANDBOXKICAD5/src/kicad/pcbnew/dialogs/dialog_find.cpp:88
#3 0x00007ffff634440e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#4 0x00007ffff64c9ea5 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#5 0x00007ffff64ca29d in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#6 0x00007ffff64ca31f in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#7 0x00007ffff64ca3d3 in wxEvtHandler::ProcessEventLocally(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#8 0x00007ffff64ca435 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#9 0x00007ffff64ca1a7 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#10 0x00007ffff6cb77d7 in ?? () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#11 0x00007ffff2954f75 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff2967053 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007ffff296fbdc in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007ffff296ffbf in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff2eda01e in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#16 0x00007ffff2f7e7bc in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#17 0x00007ffff2954f75 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007ffff296737d in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x00007ffff296f67f in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#20 0x00007ffff296ffbf in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007ffff30968ac in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#22 0x00007ffff2f7d03f in gtk_propagate_event () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#23 0x00007ffff2f7d33b in gtk_main_do_event () from /usr/lib/...

Read more...

Dino Ghilardi (dino-ghilardi) wrote :

Tested also in revision 48899a4c9640221a5a4287f311579e96992d5917.

Changed in kicad:
importance: Undecided → Critical
milestone: none → 6.0.0-rc1
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: New → Fix Committed
assignee: nobody → Seth Hillbrand (sethh)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers