Crash when importing 5.1 settings and trying to open Footprint editor
Steps to reproduce
- Delete 7.0 (7.99) config directory
- Launch KiCad, choose to import settings from version 5.x
- From the project manager, click on the Footprint editor icon
- Crash
Details
Cause
It trips at FOOTPRINT_EDITOR_SETTINGS, which comes right after PCBNEW_SETTINGS:
When loading PCBNEW_SETTINGS, it registers migrated color settings, which modifies m_settings, which invalidates the iterator.
KiCad Version
Application: KiCad x64 on x64
Version: 7.0.2-109-ga6b23a751e, release build
Libraries:
wxWidgets 3.2.2
FreeType 2.12.1
HarfBuzz 6.0.0
FontConfig 2.14.1
libcurl/7.88.1-DEV Schannel zlib/1.2.13
Platform: Windows 11 (build 22621), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: May 5 2023 05:14:01
wxWidgets: 3.2.2 (wchar_t,wx containers)
Boost: 1.81.0
OCC: 7.6.3
Curl: 7.88.1-DEV
ngspice: 40
Compiler: Visual C++ 1934 without C++ ABI
Build settings:
KICAD_SPICE=ON