PCBNew crash when copy and pasting silkscreen text
Description
Copy silkscreen text with multiple pastes throws null pointer exception
Steps to reproduce
- project files: Max Breakout
- Open PCBNew from EESchema
- CMD-C select text "PB0"
- Attempt to paste more than 2 times quickly in succession
0 _pcbnew.kiface 0x000000012b74847e POINT_EDITOR::OnSelectionChange(TOOL_EVENT const&) + 1102
1 _pcbnew.kiface 0x000000012b761275 int std::__1::__invoke_void_return_wrapper<int>::__call<std::__1::__bind<int (POINT_EDITOR::*&)(TOOL_EVENT const&), POINT_EDITOR*, std::__1::placeholders::__ph<1> const&>&, TOOL_EVENT const&>(std::__1::__bind<int (POINT_EDITOR::*&)(TOOL_EVENT const&), POINT_EDITOR*, std::__1::placeholders::__ph<1> const&>&, TOOL_EVENT const&) + 645
2 _pcbnew.kiface 0x000000012b760f39 std::__1::__function::__func<std::__1::__bind<int (POINT_EDITOR::*&)(TOOL_EVENT const&), POINT_EDITOR*, std::__1::placeholders::__ph<1> const&>, std::__1::allocator<std::__1::__bind<int (POINT_EDITOR::*&)(TOOL_EVENT const&), POINT_EDITOR*, std::__1::placeholders::__ph<1> const&> >, int (TOOL_EVENT const&)>::operator()(TOOL_EVENT const&) + 57
3 _pcbnew.kiface 0x000000012c2de08e std::__1::function<int (TOOL_EVENT const&)>::operator()(TOOL_EVENT const&) const + 142
4 _pcbnew.kiface 0x000000012c2ddfdd COROUTINE<int, TOOL_EVENT const&>::callerStub(long) + 109
5 _pcbnew.kiface 0x000000012c24c42a make_fcontext + 42
Full Stack Trace:
kicad_5.1.6-rc1-10-g4523e94f9.log
KiCad Version
Application: KiCad
Version: (5.1.6-rc1-10-g4523e94f9), debug build
Libraries:
wxWidgets 3.0.4
libcurl/7.64.1 SecureTransport (LibreSSL/2.8.3) zlib/1.2.11 nghttp2/1.39.2
Platform: macOS Catalina Version 10.15.4 (Build 19E287), 64 bit, Little endian, wxMac
Build Info:
wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
Boost: 1.72.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.54.0
Compiler: Clang 9.0.0 with C++ ABI 1002
Build settings:
USE_WX_GRAPHICS_CONTEXT=ON
USE_WX_OVERLAY=ON
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
Edited by hyiger