After sucessfull reading a IGES file, my application crashes on cleaning up.
Environment:
Visual Studio 2022
Version 17.9.2
OCCT via vcpkg
Windows 11
compiled with cpplatest
Usage,
IGESControl_Reader myIgesReader;
myIgesReader.ReadFile ("c:\\temp\\filge.igs");
Crash in Standard_Type.cxx
Standard_Type::~Standard_Type ()
{
// remove descriptor from the registry
registry_type& aRegistry = GetRegistry();
Standard_ASSERT(aRegistry.erase(myInfo) > 0, "Standard_Type::~Standard_Type() cannot find itself in registry",);
}
while the registry contains 225 items uppon begin of clean up. This code crashes when reaching first added 149 items
Ausgelöste Ausnahme: Lesezugriffsverletzung
"this->_Vec._Mypair._Myval2.**_Myfirst**" war "0x11101110111091A".
Alle Items added via e.g. atype01 = STANDARD_TYPE(IGESGeom_BSplineCurve); are no longer valid in the registry uppon clean up
Callstack
> cirosPluginOCImportWorker.exe!std::_Hash<std::_Umap_traits<std::type_index,Standard_Type *,std::_Uhash_compare<std::type_index,std::hash<std::type_index>,std::equal_to<std::type_index>>,std::allocator<std::pair<std::type_index const ,Standard_Type *>>,0>>::_Find_last<std::type_index>(const std::type_index & _Keyval={...}, const unsigned __int64 _Hashval=13812902102746794112) Zeile 1565 C++
cirosPluginOCImportWorker.exe!std::_Hash<std::_Umap_traits<std::type_index,Standard_Type *,std::_Uhash_compare<std::type_index,std::hash<std::type_index>,std::equal_to<std::type_index>>,std::allocator<std::pair<std::type_index const ,Standard_Type *>>,0>>::_Erase<std::type_index>(const std::type_index & _Keyval={...}) Zeile 1109 C++
cirosPluginOCImportWorker.exe!std::_Hash<std::_Umap_traits<std::type_index,Standard_Type *,std::_Uhash_compare<std::type_index,std::hash<std::type_index>,std::equal_to<std::type_index>>,std::allocator<std::pair<std::type_index const ,Standard_Type *>>,0>>::erase(const std::type_index & _Keyval={...}) Zeile 1137 C++
cirosPluginOCImportWorker.exe!Standard_Type::~Standard_Type() Zeile 106 C++
cirosPluginOCImportWorker.exe!Standard_Type::`scalar deleting destructor'(unsigned int) C++
cirosPluginOCImportWorker.exe!Standard_Transient::Delete() Zeile 111 C++
cirosPluginOCImportWorker.exe!opencascade::handle<Standard_Type>::EndScope() Zeile 387 C++
cirosPluginOCImportWorker.exe!opencascade::handle<Standard_Type>::~handle<Standard_Type>() Zeile 82 C++
cirosPluginOCImportWorker.exe!`dynamic atexit destructor for 'atype16''() C++
ucrtbased.dll!00007ff98aa72c21() Unbekannt
Works fine with OCCT 7.7.0