Crash: Stale ratsnest in BOARD::UpdateRatsnestExclusions
Description
When mouse dragging zone outline in certain scenario, PCB Editor crashes when releasing LMB.
This is what I get with WinDbg:
(46b8.47e4): C++ EH exception - code e06d7363 (first chance)
(46b8.47e4): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
_pcbnew!std::pair<KIID,KIID>::{ctor} [inlined in _pcbnew!<lambda_97e6890e38022d2f61e2a8daec4861a5>::operator()+0x131]:
00007ffba2a78fd1 0f104510 movups xmm0,xmmword ptr [rbp+10h] ss:feeefeee
feeefefe=????????????????????????????????
[0x0] _pcbnew!std::pair<KIID,KIID>::{ctor}
[0x1] _pcbnew!<lambda_97e6890e38022d2f61e2a8daec4861a5>::operator() + 0x131
[0x2] _pcbnew!std::_Func_class<bool,CN_EDGE &>::operator() + 0x12
[0x3] _pcbnew!CONNECTIVITY_DATA::RunOnUnconnectedEdges + 0x52
[0x4] _pcbnew!BOARD::UpdateRatsnestExclusions + 0x51f
[0x5] _pcbnew!BOARD_COMMIT::Push + 0xdb1
[0x6] _pcbnew!PCB_POINT_EDITOR::OnSelectionChange + 0xbe0
[0x7] _pcbnew!std::_Func_class<int,TOOL_EVENT const &>::operator() + 0x13
[0x8] _pcbnew!COROUTINE<int,TOOL_EVENT const &>::callerStub + 0x31
[0x9] _pcbnew!make_fcontext + 0x5a
Will try to upload stub PCB that exhibit this issue.
Steps to reproduce
- Drag the Zone outline outside PCB, high zoom, move the mouse cursor outside edit window
- Release LMB
- See PCB Editor crashes
KiCad Version
Application: KiCad PCB Editor x64 on x64
Version: 7.0.1-2-g9e1fd16329, release build
Libraries:
wxWidgets 3.2.2
FreeType 2.12.1
HarfBuzz 5.0.1
FontConfig 2.14.1
libcurl/7.83.1-DEV Schannel zlib/1.2.13
Platform: Windows 10 (build 19044), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: Mar 11 2023 05:10:00
wxWidgets: 3.2.2 (wchar_t,wx containers)
Boost: 1.80.0
OCC: 7.6.2
Curl: 7.83.1-DEV
ngspice: 39
Compiler: Visual C++ 1934 without C++ ABI
Build settings:
KICAD_SPICE=ON