AnsweredAssumed Answered

Crash in Runtime when iterating through list during sync in 100.5

Question asked by cwaller on Apr 26, 2019
Latest reply on Apr 30, 2019 by cwaller

Everything loads fine and inputs correctly, however upon trying to sync the data back to the portal I get an error. It happens when iterating through a list model during the syncing process,  It works fine in 100.2(qt 5.12) but not when updated to 100.5(qt 5.12) I get the error. When I debug I get this error, 


In a dialog popup....

Exception Triggered: The inferior stopped because it triggered an exception. Stopped in thread 0 by: Exception at 0x7ffbaa518e6e, code 0x0000005: read access violation at : 0x4, flags=0x0 (first chance)


In output...

Exception at 0x7ffbfeb1a388, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in runtimecore!RT_WMTSTileMatrixSet_getWellKnownScaleSetId


in output...

Exception at 0x7ffbfeb1a388, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in MSVCP140!__ExceptionPtrRethrow


In debugger Console...

qrc:/qml/Components/SurveyRunningPage.qml:142: TypeError: Value is undefined and could not be converted to an object qrc:/qml/Components/SurveyRunningPage.qml: 142



    property var itemTypes: parent.itemTypes
    function updateRunningPageButtons()
        for(var i = 0; i < itemTypes.length; i++ )
            console.debug("adding text to button " + (i+1) + ": " + itemTypes[i]);
142            children[i+1].text = itemTypes[i]; //children[0] is runMenu at the top of the UI. children[1-12] are the SurveyItemButtons listed below
Q_PROPERTY(QStringList itemTypes READ itemTypes NOTIFY itemTypesChanged) //This is set to the domain of the collection items
 QStringList itemTypes()  const { return m_itemTypes;}    //called itemTypes in QML
 QStringList m_itemTypes; //The list of all the domain values of the item list


void CollectionMap::setItemDomain()
    //Find the domain
CodedValueDomain domain;
    int numFields = m_observationsFeatureTable->fields().size();
    qDebug() << "CollectionMap::setItemDomain " << numFields;
    for(int i = 0; i < numFields; i++)
        qDebug() << "\t\t" << m_observationsFeatureTable->fields().at(i).name();
        if(m_observationsFeatureTable->fields().at(i).name() == VSItemTypeField) //When the field is matched to the VSItemTypeField defined in NameDefinitions.h
            qDebug() << "CollectionMap::setItemDomain: found the observation item domain for field called " << VSItemTypeField;
            domain = m_observationsFeatureTable->fields().at(i).domain(); //make a copy of the domain
            m_itemTypeDomain = domain;
            break; //break out of the for loop.
    for(int i = 0; i < domain.codedValues().size(); i++)
        qDebug() << "CollectionMap::setItemDomain: added domain name " << domain.codedValues().at(i).name() << " to the item type list";
    emit itemTypesChanged();