PDA

View Full Version : Parsing XML: QWaitCondition: Destroyed while threads are still waiting



dineshkumar
27th January 2011, 11:57
Hi all,
I want to parse a xml response while parsing it shows following error whether any problem with my code. Please help me.


QXmlInputSource *xmlSrc=new QXmlInputSource(reply);
QXmlReader *reader;
bool ok = reader->parse(xmlSrc);
if(ok){
QMessageBox::about(this,"Xml","Xml is parsed");
}else{
QMessageBox::about(this,"Error","Unable to parse");
}

It shows following error while it is running
QWaitCondition: Destroyed while threads are still waiting

If anyone knows please help me...

helloworld
27th January 2011, 15:02
Not sure if this is any way related to your problem but it seems you are calling parse() on a pointer that is never initialized:



QXmlReader *reader;
bool ok = reader->parse(xmlSrc); // !!!!


My guess is that this causes your program to crash, and the QWaitCondition being destroyed is a side-effect of that.