Eeschema - ERC exception - "Cannot dereference string iterator because it is out of range"
Description
Loaded a simple schematic, ran ERC and got an exception.
Steps to reproduce
- Start KiCad
- Load attached project file
- Navigate to page 2
- Perform ERC
- Exception generated
It's not really important to go to page 2, but that's how I captured the video. Just didn't want anyone to be confused by the video showing page 2 versus opening the file and seeing page 1. Very different sheets.
This is a debug build from very recent sources (commit 81b83a8f) ERC_Exception_Crash.zip ERC_Exception
STACK TRACE:
wxbase314ud_vc_custom.dll!std::_String_const_iterator<std::_String_val<std::_Simple_types<wchar_t>>>::operator*() Line 1783 C++
> wxbase314ud_vc_custom.dll!wxStringOperationsWchar::DecodeChar(const std::_String_const_iterator<std::_String_val<std::_Simple_types<wchar_t>>> & i) Line 81 C++
wxbase314ud_vc_custom.dll!wxString::at(unsigned __int64 n) Line 1466 C++
wxbase314ud_vc_custom.dll!wxString::operator[](unsigned __int64 n) Line 1501 C++
_eeschema.kiface!KIwxExpandEnvVars(const wxString & str, const PROJECT * aProject) Line 173 C++
_eeschema.kiface!ExpandEnvVarSubstitutions(const wxString & aString, PROJECT * aProject) Line 270 C++
_eeschema.kiface!ERC_TESTER::TestTextVars::__l2::<lambda>(wxString str) Line 168 C++
_eeschema.kiface!ERC_TESTER::TestTextVars(KIGFX::WS_PROXY_VIEW_ITEM * aWorksheet) Line 200 C++
_eeschema.kiface!DIALOG_ERC::testErc() Line 396 C++
_eeschema.kiface!DIALOG_ERC::OnRunERCClick(wxCommandEvent & event) Line 300 C++
wxbase314ud_vc_custom.dll!wxAppConsoleBase::HandleEvent(wxEvtHandler * handler, void(wxEvtHandler::*)(wxEvent &) func, wxEvent & event) Line 658 C++
wxbase314ud_vc_custom.dll!wxAppConsoleBase::CallEventHandler(wxEvtHandler * handler, wxEventFunctor & functor, wxEvent & event) Line 669 C++
wxbase314ud_vc_custom.dll!wxEvtHandler::ProcessEventIfMatchesId(const wxEventTableEntryBase & entry, wxEvtHandler * handler, wxEvent & event) Line 1426 C++
wxbase314ud_vc_custom.dll!wxEvtHandler::SearchDynamicEventTable(wxEvent & event) Line 1897 C++
wxbase314ud_vc_custom.dll!wxEvtHandler::TryHereOnly(wxEvent & event) Line 1618 C++
wxbase314ud_vc_custom.dll!wxEvtHandler::TryBeforeAndHere(wxEvent & event) Line 3927 C++
wxbase314ud_vc_custom.dll!wxEvtHandler::ProcessEventLocally(wxEvent & event) Line 1555 C++
wxbase314ud_vc_custom.dll!wxEvtHandler::ProcessEvent(wxEvent & event) Line 1528 C++
wxbase314ud_vc_custom.dll!wxEvtHandler::SafelyProcessEvent(wxEvent & event) Line 1646 C++
wxmsw314ud_core_vc_custom.dll!wxWindowBase::HandleWindowEvent(wxEvent & event) Line 1571 C++
wxmsw314ud_core_vc_custom.dll!wxControl::ProcessCommand(wxCommandEvent & event) Line 257 C++
wxmsw314ud_core_vc_custom.dll!wxButton::SendClickEvent() Line 388 C++
wxmsw314ud_core_vc_custom.dll!wxButton::MSWCommand(unsigned int param, unsigned short __formal) Line 432 C++
wxmsw314ud_core_vc_custom.dll!wxWindow::HandleCommand(unsigned short id_, unsigned short cmd, HWND__ * control) Line 5823 C++
wxmsw314ud_core_vc_custom.dll!wxWindow::MSWHandleMessage(__int64 * result, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 3192 C++
wxmsw314ud_core_vc_custom.dll!wxWindow::MSWWindowProc(unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 3885 C++
wxmsw314ud_core_vc_custom.dll!wxNonOwnedWindow::MSWWindowProc(unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 247 C++
wxmsw314ud_core_vc_custom.dll!wxTopLevelWindowMSW::MSWWindowProc(unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 327 C++
wxmsw314ud_core_vc_custom.dll!wxDialog::MSWWindowProc(unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 357 C++
wxmsw314ud_core_vc_custom.dll!wxWndProc(HWND__ * hWnd, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 2926 C++
user32.dll!00007fff70dce858() Unknown
user32.dll!00007fff70dce3dc() Unknown
user32.dll!00007fff70de0bc3() Unknown
ntdll.dll!00007fff7158fde4() Unknown
win32u.dll!00007fff6f101124() Unknown
user32.dll!00007fff70dcdf33() Unknown
user32.dll!00007fff70dcd68a() Unknown
comctl32.dll!00007fff628529f7() Unknown
comctl32.dll!00007fff62862680() Unknown
user32.dll!00007fff70dce858() Unknown
user32.dll!00007fff70dce4ee() Unknown
wxmsw314ud_core_vc_custom.dll!wxWindow::MSWDefWindowProc(unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 2466 C++
wxmsw314ud_core_vc_custom.dll!wxWindow::MSWWindowProc(unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 3891 C++
wxmsw314ud_core_vc_custom.dll!wxAnyButton::MSWWindowProc(unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 637 C++
wxmsw314ud_core_vc_custom.dll!wxButton::MSWWindowProc(unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 457 C++
wxmsw314ud_core_vc_custom.dll!wxWndProc(HWND__ * hWnd, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 2926 C++
user32.dll!00007fff70dce858() Unknown
user32.dll!00007fff70dce299() Unknown
user32.dll!00007fff70dcc050() Unknown
wxmsw314ud_core_vc_custom.dll!wxWindow::MSWSafeIsDialogMessage(tagMSG * msg) Line 2791 C++
wxmsw314ud_core_vc_custom.dll!wxWindow::MSWProcessMessage(tagMSG * pMsg) Line 2673 C++
wxmsw314ud_core_vc_custom.dll!wxGUIEventLoop::PreProcessMessage(tagMSG * msg) Line 145 C++
wxmsw314ud_core_vc_custom.dll!wxGUIEventLoop::ProcessMessage(tagMSG * msg) Line 163 C++
wxmsw314ud_core_vc_custom.dll!wxGUIEventLoop::Dispatch() Line 229 C++
wxbase314ud_vc_custom.dll!wxEventLoopManual::ProcessEvents() Line 237 C++
wxbase314ud_vc_custom.dll!wxEventLoopManual::DoRun() Line 291 C++
wxbase314ud_vc_custom.dll!wxEventLoopBase::Run() Line 90 C++
wxbase314ud_vc_custom.dll!wxAppConsoleBase::MainLoop() Line 380 C++
wxbase314ud_vc_custom.dll!wxAppConsoleBase::OnRun() Line 302 C++
wxmsw314ud_core_vc_custom.dll!wxAppBase::OnRun() Line 336 C++
kicad.exe!APP_KICAD::OnRun() Line 310 C++
wxbase314ud_vc_custom.dll!wxEntryReal(int & argc, wchar_t * * argv) Line 507 C++
wxbase314ud_vc_custom.dll!wxEntry(int & argc, wchar_t * * argv) Line 184 C++
wxmsw314ud_core_vc_custom.dll!wxEntry(HINSTANCE__ * hInstance, HINSTANCE__ * __formal, char * __formal, int nCmdShow) Line 306 C++
kicad.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 356 C++
kicad.exe!invoke_main() Line 107 C++
kicad.exe!__scrt_common_main_seh() Line 288 C++
kicad.exe!__scrt_common_main() Line 331 C++
kicad.exe!WinMainCRTStartup() Line 17 C++
kernel32.dll!00007fff70c37034() Unknown
ntdll.dll!00007fff7153d0d1() Unknown
KiCad Version
Application: KiCad
Version: (5.99.0-8932-g81b83a8f5b), debug build
Libraries:
wxWidgets 3.1.4
libcurl/7.71.1-DEV Schannel zlib/1.2.11
Platform: Windows 10 (build 19041), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: Feb 7 2021 21:22:58
wxWidgets: 3.1.4 (wchar_t,STL containers)
Boost: 1.73.0
Curl: 7.71.1-DEV
Compiler: Visual C++ 1928 without C++ ABI
Build settings:
KICAD_SCRIPTING=OFF
KICAD_SCRIPTING_MODULES=OFF
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=OFF
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=OFF
KICAD_SPICE=OFF
KICAD_STDLIB_DEBUG=OFF
KICAD_STDLIB_LIGHT_DEBUG=OFF
KICAD_SANITIZE=OFF
Edited by Peter Montgomery