Crash when selecting via after updating PCB from schematic

Bug #1705896 reported by henrik
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Maciej Suminski

Bug Description

Steps to reproduce:

1. Make a schematic and route PCB
2. Delete one component from the schematic that is routed on PCB
3. Update PCB from the schematic
4. Select via on the net that was connected to the deleted component. Via should be still connected to some other component.
5. Assertion fail followed by a crash

Test case attached with steps 1 and 2 done. Update the PCB and try selecting either two middle vias to trigger crash.

Assertion fail:

pcbnew/./class_netinfo.h(185): assert "m_NetClass" failed in GetViaDrillSize().

Backtrace:

Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
0x00007fffd4c76d5e in NETCLASS::GetViaDrill (this=0x0) at pcbnew/./class_netclass.h:181
181 int GetViaDrill() const { return m_ViaDrill; }
(gdb) backtrace
#0 0x00007fffd4c76d5e in NETCLASS::GetViaDrill (this=0x0) at pcbnew/./class_netclass.h:181
#1 0x00007fffd4e2831a in NETINFO_ITEM::GetViaDrillSize (this=0x7b90080) at pcbnew/./class_netinfo.h:186
#2 0x00007fffd533036a in VIA::GetMsgPanelInfoBase (this=0x3d954d0, aList=std::vector of length 7, capacity 8 = {...}) at pcbnew/class_track.cpp:1267
#3 0x00007fffd532db01 in TRACK::GetMsgPanelInfo (this=0x3d954d0, aList=std::vector of length 7, capacity 8 = {...}) at pcbnew/class_track.cpp:1041
#4 0x00007fffd52ea8ea in PCB_BASE_FRAME::UpdateMsgPanel (this=0x24eee90) at pcbnew/basepcbframe.cpp:572
#5 0x00007fffd52ea875 in PCB_BASE_FRAME::SetCurItem (this=0x24eee90, aItem=0x3d954d0, aDisplayInfo=true) at pcbnew/basepcbframe.cpp:561
#6 0x00007fffd4f14587 in SELECTION_TOOL::select (this=0x4112d40, aItem=0x3d954d0) at pcbnew/tools/selection_tool.cpp:1489
#7 0x00007fffd4f0f6fe in SELECTION_TOOL::toggleSelection (this=0x4112d40, aItem=0x3d954d0) at pcbnew/tools/selection_tool.cpp:395
#8 0x00007fffd4f0facf in SELECTION_TOOL::selectPoint (this=0x4112d40, aWhere=..., aOnDrag=false) at pcbnew/tools/selection_tool.cpp:458
#9 0x00007fffd4f0f08c in SELECTION_TOOL::Main (this=0x4112d40, aEvent=...) at pcbnew/tools/selection_tool.cpp:261
#10 0x00007fffd4f21a44 in std::_Mem_fn_base<int (SELECTION_TOOL::*)(TOOL_EVENT const&), true>::operator()<TOOL_EVENT const&, void> (this=0x418b730, __object=0x4112d40) at /usr/include/c++/5/functional:600
#11 0x00007fffd4f21014 in std::_Bind<std::_Mem_fn<int (SELECTION_TOOL::*)(TOOL_EVENT const&)> (SELECTION_TOOL*, std::_Placeholder<1>)>::__call<int, TOOL_EVENT const&, 0ul, 1ul>(std::tuple<TOOL_EVENT const&>&&, std::_Index_tuple<0ul, 1ul>) (this=0x418b730, __args=<unknown type in /usr/local/bin/_pcbnew.kiface, CU 0x2c916ad, DIE 0x2d1f868>) at /usr/include/c++/5/functional:1074
#12 0x00007fffd4f200de in std::_Bind<std::_Mem_fn<int (SELECTION_TOOL::*)(TOOL_EVENT const&)> (SELECTION_TOOL*, std::_Placeholder<1>)>::operator()<TOOL_EVENT const&, int>(TOOL_EVENT const&) (this=0x418b730)
    at /usr/include/c++/5/functional:1133
#13 0x00007fffd4f1e87d in std::_Function_handler<int (TOOL_EVENT const&), std::_Bind<std::_Mem_fn<int (SELECTION_TOOL::*)(TOOL_EVENT const&)> (SELECTION_TOOL*, std::_Placeholder<1>)> >::_M_invoke(std::_Any_data const&, TOOL_EVENT const&) (__functor=..., __args#0=...) at /usr/include/c++/5/functional:1857
#14 0x00007fffd556f623 in std::function<int (TOOL_EVENT const&)>::operator()(TOOL_EVENT const&) const (this=0x419a188, __args#0=...) at /usr/include/c++/5/functional:2267
#15 0x00007fffd556c5b3 in COROUTINE<int, TOOL_EVENT const&>::callerStub (aData=140737488334464) at include/tool/coroutine.h:328
#16 0x00007fffd55bdad1 in make_fcontext () from /usr/local/bin/_pcbnew.kiface

Application: kicad
Version: (2017-07-22 revision cb2f3d6)-master, debug 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.4.0-83-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=OFF

Revision history for this message
henrik (henrik-forsten) wrote :
Changed in kicad:
importance: Undecided → Critical
status: New → In Progress
assignee: nobody → Maciej Sumiński (orsonmmz)
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: In Progress → Fix Committed
Jeff Young (jeyjey)
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.