@Seth. I can reproduce this on the pic programmer demo project using these steps and the Python plugin attached (locate it inside ~/.kicad_plugins):
1) Open pcbnew
2) Run the Python action plugin "AAAAAAAA"
3) Close pcbnew (discard changes if any)
Crash
The error is:
0x00007fffe055e41c in NETINFO_ITEM::GetNet (this=0x0) at /home/imcinerney/Documents/kicadDev/kicad-master/pcbnew/./netinfo.h:226
226 int GetNet() const { return m_NetCode; }
The backtrace I receive is:
#0 0x00007fffe055e41c in NETINFO_ITEM::GetNet() const (this=0x0) at /home/imcinerney/Documents/kicadDev/kicad-master/pcbnew/./netinfo.h:226
#1 0x00007fffe05e6346 in BOARD_CONNECTED_ITEM::GetNetCode() const (this=0x51b41e0) at /home/imcinerney/Documents/kicadDev/kicad-master/pcbnew/./board_connected_item.h:106
#2 0x00007fffe0c7f192 in BOARD::GetNodesCount(int) (this=0x5726f90, aNet=-1) at /home/imcinerney/Documents/kicadDev/kicad-master/pcbnew/class_board.cpp:753
#3 0x00007fffe0c7fddf in BOARD::GetMsgPanelInfo(EDA_UNITS_T, std::vector<MSG_PANEL_ITEM, std::allocator<MSG_PANEL_ITEM> >&) (this=0x5726f90, aUnits=INCHES, aList=std::vector of length 3, capacity 4 = {...})
at /home/imcinerney/Documents/kicadDev/kicad-master/pcbnew/class_board.cpp:864
#4 0x00007fffe0dfd8c7 in EDA_DRAW_FRAME::SetMsgPanel(EDA_ITEM*) (this=0x246b3e0, aItem=0x5726f90) at /home/imcinerney/Documents/kicadDev/kicad-master/common/legacy_gal/eda_draw_frame.cpp:582
#5 0x00007fffe08b8473 in PCB_EDITOR_CONTROL::ClearHighlight(TOOL_EVENT const&) (this=0x516dc10, aEvent=...) at /home/imcinerney/Documents/kicadDev/kicad-master/pcbnew/tools/pcb_editor_control.cpp:1148
#6 0x00007fffe08c3454 in std::__invoke_impl<int, int (PCB_EDITOR_CONTROL::*&)(TOOL_EVENT const&), PCB_EDITOR_CONTROL*&, TOOL_EVENT const&>(std::__invoke_memfun_deref, int (PCB_EDITOR_CONTROL::*&)(TOOL_EVENT const&), PCB_EDITOR_CONTROL*&, TOOL_EVENT const&) (__f=@0x4e0de70: (int (PCB_EDITOR_CONTROL::*)(PCB_EDITOR_CONTROL * const, const TOOL_EVENT &)) 0x7fffe08b83b6 <PCB_EDITOR_CONTROL::ClearHighlight(TOOL_EVENT const&)>, __t=@0x4e0de80: 0x516dc10, __args#0=...)
at /usr/include/c++/8/bits/invoke.h:73
#7 0x00007fffe08c30eb in std::__invoke<int (PCB_EDITOR_CONTROL::*&)(TOOL_EVENT const&), PCB_EDITOR_CONTROL*&, TOOL_EVENT const&>(int (PCB_EDITOR_CONTROL::*&)(TOOL_EVENT const&), PCB_EDITOR_CONTROL*&, TOOL_EVENT const&) (__fn=
@0x4e0de70: (int (PCB_EDITOR_CONTROL::*)(PCB_EDITOR_CONTROL * const, const TOOL_EVENT &)) 0x7fffe08b83b6 <PCB_EDITOR_CONTROL::ClearHighlight(TOOL_EVENT const&)>, __args#0=@0x4e0de80: 0x516dc10, __args#1=...)
at /usr/include/c++/8/bits/invoke.h:95
#8 0x00007fffe08c2781 in std::_Bind<int (PCB_EDITOR_CONTROL::*(PCB_EDITOR_CONTROL*, std::_Placeholder<1>))(TOOL_EVENT const&)>::__call<int, TOOL_EVENT const&, 0ul, 1ul>(std::tuple<TOOL_EVENT const&>&&, std::_Index_tuple<0ul, 1ul>) (this=0x4e0de70, __args=...) at /usr/include/c++/8/functional:400
#9 0x00007fffe08c1d63 in std::_Bind<int (PCB_EDITOR_CONTROL::*(PCB_EDITOR_CONTROL*, std::_Placeholder<1>))(TOOL_EVENT const&)>::operator()<TOOL_EVENT const&, int>(TOOL_EVENT const&) (this=0x4e0de70, __args#0=...)
at /usr/include/c++/8/functional:484
#10 0x00007fffe08c14f9 in std::_Function_handler<int (TOOL_EVENT const&), std::_Bind<int (PCB_EDITOR_CONTROL::*(PCB_EDITOR_CONTROL*, std::_Placeholder<1>))(TOOL_EVENT const&)> >::_M_invoke(std::_Any_data const&, TOOL_EVENT const&) (__functor=..., __args#0=...) at /usr/include/c++/8/bits/std_function.h:282
#11 0x00007fffe0f45a39 in std::function<int (TOOL_EVENT const&)>::operator()(TOOL_EVENT const&) const (this=0x53d8ff8, __args#0=...) at /usr/include/c++/8/bits/std_function.h:687
#12 0x00007fffe0f42bfa in COROUTINE<int, TOOL_EVENT const&>::callerStub(long) (aData=90083632) at /home/imcinerney/Documents/kicadDev/kicad-master/include/tool/coroutine.h:331
#13 0x00007fffe0f9f021 in make_fcontext () at /usr/local/bin/_pcbnew.kiface
#14 0x00c2c200c2c200c2 in ()
#15 0x0000000000000000 in ()
The problem seems to be caused by trying to redraw the message box, and it is running into a null pointer in a m_netinfo object inside a pad when counting the nodes.
Application: Pcbnew
Version: (5.1.0-844-g7e1407f20), debug build
Libraries:
wxWidgets 3.0.4
libcurl/7.59.0 OpenSSL/1.1.0i zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) libssh/0.8.6/openssl/zlib nghttp2/1.32.1
Platform: Linux 5.0.16-100.fc28.x86_64 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.66.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.59.0
Compiler: GCC 8.3.1 with C++ ABI 1013
@Seth. I can reproduce this on the pic programmer demo project using these steps and the Python plugin attached (locate it inside ~/.kicad_plugins):
1) Open pcbnew
2) Run the Python action plugin "AAAAAAAA"
3) Close pcbnew (discard changes if any)
Crash
The error is: ITEM::GetNet (this=0x0) at /home/imcinerne y/Documents/ kicadDev/ kicad-master/ pcbnew/ ./netinfo. h:226
0x00007fffe055e41c in NETINFO_
226 int GetNet() const { return m_NetCode; }
The backtrace I receive is:
#0 0x00007fffe055e41c in NETINFO_ ITEM::GetNet( ) const (this=0x0) at /home/imcinerne y/Documents/ kicadDev/ kicad-master/ pcbnew/ ./netinfo. h:226 _ITEM:: GetNetCode( ) const (this=0x51b41e0) at /home/imcinerne y/Documents/ kicadDev/ kicad-master/ pcbnew/ ./board_ connected_ item.h: 106 GetNodesCount( int) (this=0x5726f90, aNet=-1) at /home/imcinerne y/Documents/ kicadDev/ kicad-master/ pcbnew/ class_board. cpp:753 GetMsgPanelInfo (EDA_UNITS_ T, std::vector< MSG_PANEL_ ITEM, std::allocator< MSG_PANEL_ ITEM> >&) (this=0x5726f90, aUnits=INCHES, aList=std::vector of length 3, capacity 4 = {...}) y/Documents/ kicadDev/ kicad-master/ pcbnew/ class_board. cpp:864 FRAME:: SetMsgPanel( EDA_ITEM* ) (this=0x246b3e0, aItem=0x5726f90) at /home/imcinerne y/Documents/ kicadDev/ kicad-master/ common/ legacy_ gal/eda_ draw_frame. cpp:582 CONTROL: :ClearHighlight (TOOL_EVENT const&) (this=0x516dc10, aEvent=...) at /home/imcinerne y/Documents/ kicadDev/ kicad-master/ pcbnew/ tools/pcb_ editor_ control. cpp:1148 invoke_ impl<int, int (PCB_EDITOR_ CONTROL: :*&)(TOOL_ EVENT const&), PCB_EDITOR_ CONTROL* &, TOOL_EVENT const&> (std::_ _invoke_ memfun_ deref, int (PCB_EDITOR_ CONTROL: :*&)(TOOL_ EVENT const&), PCB_EDITOR_ CONTROL* &, TOOL_EVENT const&) (__f=@0x4e0de70: (int (PCB_EDITOR_ CONTROL: :*)(PCB_ EDITOR_ CONTROL * const, const TOOL_EVENT &)) 0x7fffe08b83b6 <PCB_EDITOR_ CONTROL: :ClearHighlight (TOOL_EVENT const&)>, __t=@0x4e0de80: 0x516dc10, __args#0=...) c++/8/bits/ invoke. h:73 CONTROL: :*&)(TOOL_ EVENT const&), PCB_EDITOR_ CONTROL* &, TOOL_EVENT const&>(int (PCB_EDITOR_ CONTROL: :*&)(TOOL_ EVENT const&), PCB_EDITOR_ CONTROL* &, TOOL_EVENT const&) (__fn= CONTROL: :*)(PCB_ EDITOR_ CONTROL * const, const TOOL_EVENT &)) 0x7fffe08b83b6 <PCB_EDITOR_ CONTROL: :ClearHighlight (TOOL_EVENT const&)>, __args# 0=@0x4e0de80: 0x516dc10, __args#1=...) c++/8/bits/ invoke. h:95 CONTROL: :*(PCB_ EDITOR_ CONTROL* , std::_Placehold er<1>)) (TOOL_EVENT const&) >::__call< int, TOOL_EVENT const&, 0ul, 1ul>(std: :tuple< TOOL_EVENT const&>&&, std::_Index_ tuple<0ul, 1ul>) (this=0x4e0de70, __args=...) at /usr/include/ c++/8/functiona l:400 CONTROL: :*(PCB_ EDITOR_ CONTROL* , std::_Placehold er<1>)) (TOOL_EVENT const&) >::operator( )<TOOL_ EVENT const&, int>(TOOL_EVENT const&) (this=0x4e0de70, __args#0=...) c++/8/functiona l:484 handler< int (TOOL_EVENT const&), std::_Bind<int (PCB_EDITOR_ CONTROL: :*(PCB_ EDITOR_ CONTROL* , std::_Placehold er<1>)) (TOOL_EVENT const&)> >::_M_invoke( std::_Any_ data const&, TOOL_EVENT const&) (__functor=..., __args#0=...) at /usr/include/ c++/8/bits/ std_function. h:282 >::operator( )(TOOL_ EVENT const&) const (this=0x53d8ff8, __args#0=...) at /usr/include/ c++/8/bits/ std_function. h:687 ::callerStub( long) (aData=90083632) at /home/imcinerne y/Documents/ kicadDev/ kicad-master/ include/ tool/coroutine. h:331 bin/_pcbnew. kiface
#1 0x00007fffe05e6346 in BOARD_CONNECTED
#2 0x00007fffe0c7f192 in BOARD::
#3 0x00007fffe0c7fddf in BOARD::
at /home/imcinerne
#4 0x00007fffe0dfd8c7 in EDA_DRAW_
#5 0x00007fffe08b8473 in PCB_EDITOR_
#6 0x00007fffe08c3454 in std::__
at /usr/include/
#7 0x00007fffe08c30eb in std::__invoke<int (PCB_EDITOR_
@0x4e0de70: (int (PCB_EDITOR_
at /usr/include/
#8 0x00007fffe08c2781 in std::_Bind<int (PCB_EDITOR_
#9 0x00007fffe08c1d63 in std::_Bind<int (PCB_EDITOR_
at /usr/include/
#10 0x00007fffe08c14f9 in std::_Function_
#11 0x00007fffe0f45a39 in std::function<int (TOOL_EVENT const&)
#12 0x00007fffe0f42bfa in COROUTINE<int, TOOL_EVENT const&>
#13 0x00007fffe0f9f021 in make_fcontext () at /usr/local/
#14 0x00c2c200c2c200c2 in ()
#15 0x0000000000000000 in ()
The problem seems to be caused by trying to redraw the message box, and it is running into a null pointer in a m_netinfo object inside a pad when counting the nodes.
Application: Pcbnew 844-g7e1407f20) , debug build 0.8.6/openssl/ zlib nghttp2/1.32.1 100.fc28. x86_64 x86_64, 64 bit, Little endian, wxGTK compatible with 2.8) GTK+ 3.22
Version: (5.1.0-
Libraries:
wxWidgets 3.0.4
libcurl/7.59.0 OpenSSL/1.1.0i zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) libssh/
Platform: Linux 5.0.16-
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,
Boost: 1.66.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.59.0
Compiler: GCC 8.3.1 with C++ ABI 1013
Build settings: WX_GRAPHICS_ CONTEXT= OFF WX_OVERLAY= ON SCRIPTING= ON SCRIPTING_ MODULES= ON SCRIPTING_ PYTHON3= OFF SCRIPTING_ WXPYTHON= ON SCRIPTING_ WXPYTHON_ PHOENIX= ON SCRIPTING_ ACTION_ MENU=ON GITHUB_ PLUGIN= ON USE_OCE= ON USE_OCC= OFF
USE_
USE_
KICAD_
KICAD_
KICAD_
KICAD_
KICAD_
KICAD_
BUILD_
KICAD_
KICAD_
KICAD_SPICE=ON