When Debugging my solution an exception is thrown at the end of the deallocate (QArrayData) function. The output shows me this : HEAP[MappingMidi.exe]: Invalid address specified to RtlValidateHeap( 000001C0B6DB0000, 000001C0BB383860 ) MappingMidi.exe has triggered a breakpoint.
I am developping an application using Qt 6.3.2 on Visual Studio 2019. I want to read the data of a xml file and to do so I am using the QDomDocument library ; In Properties->Qt Project Setting->Qt Modules I added "xml". The code that throws the exception is this :
QDomDocument xml;
QFile mappingData(QCoreApplication::applicationDirPath() + "/mappingData.xml");
if (!mappingData.open(QIODevice::ReadWrite)) {
return;
}
QString errorMsg;
int errorLine = 0;
int errorColumn = 0;
if (!xml.setContent(&mappingData, &errorMsg, &errorLine, &errorColumn)) {
qDebug() << errorMsg;
qDebug() << errorLine;
}
mappingData.close();
In debug mode I figgured out it's the setContent that throws the exception, because when I only initialize QDomDocument xml it works fine so I assume that it's not a problem of importing the xml library but it comes from somewhere else triggered by the setContent method.