Pcbnew: Segfault reading netlist III

Bug #1702355 reported by Michael Geselbracht
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Unassigned

Bug Description

Ok, another (yet similar) set of files.

Steps to reproduce:
1. Unpack archive, open the board and add the "pretties" to the current project.
2. Open the "netlist" dialog using the "NET" icon. Options do not matter.
3. Press the "Read netlist" button three times -> crash

Tested under Linux with commits 1724f90, 969209c and 4bdac4d (all crashing).
Windows 10: 1724f90 and 4bdac4d (both crashing).
Windows 7 : 1724f90 (hangs), 4bdac4d (no problem)

GDB:

Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
0x00007fffe5fdb857 in EDIT_TOOL::Main (this=0x3f40920, aEvent=...) at /data/src/kicad-source-mirror/pcbnew/tools/edit_tool.cpp:413
413 m_offset = static_cast<BOARD_ITEM*>( selection.Front() )->GetPosition() - modPoint;

(gdb) bt
#0 0x00007fffe5fdb857 in EDIT_TOOL::Main (this=0x3f40920, aEvent=...) at /data/src/kicad-source-mirror/pcbnew/tools/edit_tool.cpp:413
#1 0x00007fffe5fe4e0c in std::_Mem_fn_base<int (EDIT_TOOL::*)(TOOL_EVENT const&), true>::operator()<TOOL_EVENT const&, void> (this=0x37e95a0, __object=0x3f40920)
    at /usr/include/c++/5/functional:600
#2 0x00007fffe5fe4c02 in std::_Bind<std::_Mem_fn<int (EDIT_TOOL::*)(TOOL_EVENT const&)> (EDIT_TOOL*, std::_Placeholder<1>)>::__call<int, TOOL_EVENT const&, 0ul, 1ul>(std::tuple<TOOL_EVENT const&>&&, std::_Index_tuple<0ul, 1ul>) (this=0x37e95a0, __args=<unknown type in /usr/local/bin/_pcbnew.kiface, CU 0x2eccce8, DIE 0x2f408db>)
    at /usr/include/c++/5/functional:1074
#3 0x00007fffe5fe47e2 in std::_Bind<std::_Mem_fn<int (EDIT_TOOL::*)(TOOL_EVENT const&)> (EDIT_TOOL*, std::_Placeholder<1>)>::operator()<TOOL_EVENT const&, int>(TOOL_EVENT const&) (
    this=0x37e95a0) at /usr/include/c++/5/functional:1133
#4 0x00007fffe5fe4275 in std::_Function_handler<int (TOOL_EVENT const&), std::_Bind<std::_Mem_fn<int (EDIT_TOOL::*)(TOOL_EVENT const&)> (EDIT_TOOL*, std::_Placeholder<1>)> >::_M_invoke(std::_Any_data const&, TOOL_EVENT const&) (__functor=..., __args#0=...) at /usr/include/c++/5/functional:1857
#5 0x00007fffe6600541 in std::function<int (TOOL_EVENT const&)>::operator()(TOOL_EVENT const&) const (this=0x3880908, __args#0=...) at /usr/include/c++/5/functional:2267
#6 0x00007fffe65fd4d1 in COROUTINE<int, TOOL_EVENT const&>::callerStub (aData=140737488331696) at /data/src/kicad-source-mirror/include/tool/coroutine.h:328
#7 0x00007fffe664a711 in make_fcontext () from /usr/local/bin/_pcbnew.kiface
#8 0x0000000000000000 in ?? ()

One time I tried an "Assert" dialog opened:

ASSERT INFO:
../include/wx/thrimpl.cpp(41): assert "m_internal" failed in Lock(): wxMutex::Lock(): not initialized

BACKTRACE:
[1] wxMutex::Lock()
[2] wxEvtHandler::QueueEvent(wxEvent*)
[3] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[4] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[5] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
[6] wxEvtHandler::TryHereOnly(wxEvent&)
[7] wxEvtHandler::ProcessEventLocally(wxEvent&)
[8] wxEvtHandler::ProcessEvent(wxEvent&)
[9] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[10] g_signal_emit_valist
[11] g_signal_emit
[12] g_signal_emit_valist
[13] g_signal_emit
[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] wxDialog::ShowModal()
[25] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[26] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[27] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[28] wxEvtHandler::TryHereOnly(wxEvent&)
[29] wxEvtHandler::DoTryChain(wxEvent&)
[30] wxEvtHandler::ProcessEvent(wxEvent&)
[31] wxWindowBase::TryAfter(wxEvent&)
[32] wxAuiToolBar::OnLeftUp(wxMouseEvent&)
[33] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[34] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[35] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[36] wxEvtHandler::TryHereOnly(wxEvent&)
[37] wxEvtHandler::ProcessEventLocally(wxEvent&)
[38] wxEvtHandler::ProcessEvent(wxEvent&)
[39] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[40] g_closure_invoke
[41] g_signal_emit_valist
[42] g_signal_emit
[43] gtk_propagate_event
[44] gtk_main_do_event
[45] g_main_context_dispatch
[46] g_main_loop_run
[47] gtk_main
[48] wxGUIEventLoop::DoRun()
[49] wxEventLoopBase::Run()
[50] wxAppConsoleBase::MainLoop()
[51] APP_SINGLE_TOP::OnRun() /data/src/kicad-source-mirror/common/single_top.cpp:165
[52] wxEntry(int&, wchar_t**)
[53] main /data/src/kicad-source-mirror/common/single_top.cpp:205
[54] __libc_start_main
[55] _start

Version info:

Application: kicad
Version: (2017-06-22 revision 4bdac4d)-HEAD, release build
Libraries: wxWidgets 3.0.2
           libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.8.0-56-generic x86_64, 64 bit, Little endian, wxGTK
- Build Info -
wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.58.0
Curl: 7.47.0
KiCad - Compiler: GCC 5.4.0 with C++ ABI 1009
        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=OFF
                  BUILD_GITHUB_PLUGIN=ON
                  KICAD_USE_OCE=ON

Revision history for this message
Michael Geselbracht (mgeselbracht) wrote :
Revision history for this message
Michael Geselbracht (mgeselbracht) wrote :

The Windows build of commit 4bdac4d did not crash under Win7 because the legacy canvas has been selected. With OpenGL it crashes too.

Likewise, the Linux version does not crash when the lagacy canvas is selected.

Changed in kicad:
status: New → Confirmed
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: Confirmed → 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

Bug attachments

Remote bug watches

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