Answer the question
In order to leave comments, you need to log in
Why Debug Assertion Failed?
I am parsing some xml file.
bool function::test_xml()
{
...
const QString &fileName = "read.xml";
QFile file(fileName);
if (!file.open(QFile::ReadOnly | QFile::Text))
{
qDebug() << "Error: Cannot read file " << fileName << ": " << file.errorString();
return false;
}
QString errorStr;
int errorLine;
int errorColumn;
QDomDocument doc;
if (!doc.setContent(&file, false, &errorStr, &errorLine,&errorColumn))
{
qDebug() << "Error: Parse error at line " << errorLine << ", " << "column " << errorColumn << ": " << errorStr;
return false;
}
...
return true;
}
Answer the question
In order to leave comments, you need to log in
By eye in the code of errors in work with memory it is not visible. I can suggest once again to carefully check whether the correct libraries are being used. Libraries must match the compiler version and runtime, the bitness of the built executable and the build configuration (debug/release). Check if everything is connected correctly. A lot of strange floating errors can appear if, for example, a kit is built for the 2010 studio, but is used in a project with a compiler from 2013 and vice versa.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question