Results 1 to 2 of 2

Thread: Parsing XML: QWaitCondition: Destroyed while threads are still waiting

  1. #1
    Join Date
    Jan 2011
    Location
    Nagercoil,Tamilnadu,India
    Posts
    12
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Parsing XML: QWaitCondition: Destroyed while threads are still waiting

    Hi all,
    I want to parse a xml response while parsing it shows following error whether any problem with my code. Please help me.

    Qt Code:
    1. QXmlInputSource *xmlSrc=new QXmlInputSource(reply);
    2. QXmlReader *reader;
    3. bool ok = reader->parse(xmlSrc);
    4. if(ok){
    5. QMessageBox::about(this,"Xml","Xml is parsed");
    6. }else{
    7. QMessageBox::about(this,"Error","Unable to parse");
    8. }
    To copy to clipboard, switch view to plain text mode 

    It shows following error while it is running
    Qt Code:
    1. QWaitCondition: Destroyed while threads are still waiting
    To copy to clipboard, switch view to plain text mode 
    If anyone knows please help me...

  2. #2
    Join Date
    Oct 2010
    Posts
    55
    Thanks
    1
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    9

    Default Re: Parsing XML: QWaitCondition: Destroyed while threads are still waiting

    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:

    Qt Code:
    1. QXmlReader *reader;
    2. bool ok = reader->parse(xmlSrc); // !!!!
    To copy to clipboard, switch view to plain text mode 

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

Similar Threads

  1. Replies: 3
    Last Post: 4th December 2013, 12:23
  2. Replies: 0
    Last Post: 15th April 2010, 13:44
  3. Replies: 0
    Last Post: 27th February 2010, 17:14
  4. Replies: 0
    Last Post: 8th June 2009, 08:12
  5. Waiting for multiple threads
    By Bebee in forum Qt Programming
    Replies: 1
    Last Post: 18th November 2008, 17:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.