Results 1 to 2 of 2

Thread: _CrtIsValidHeapPointer Error

  1. #1
    Join Date
    Aug 2008
    Posts
    134
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default _CrtIsValidHeapPointer Error

    Hi,
    Can anyone tell what is the reason for cause of _CrtIsValidHeapPointer Error???

    Thank You

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: _CrtIsValidHeapPointer Error

    For example deleting something twice.
    Qt Code:
    1. int* i = new int;
    2. delete i;
    3. delete i;
    To copy to clipboard, switch view to plain text mode 
    Remember that QObjects take ownership of their children. Here's an example how it could happen with QObjects:
    Qt Code:
    1. {
    2. a.setParent(&b);
    3. }
    To copy to clipboard, switch view to plain text mode 
    First "b" goes out of scope and gets destructed according to normal C++ rules. "b" is a parent of "a" so it will automatically delete "a". Then "a" goes out of scope and gets destructed, but it was already deleted by "b" --> crash.
    J-P Nurmi

Similar Threads

  1. QPSQL problem
    By LoneWolf in forum Installation and Deployment
    Replies: 60
    Last Post: 4th November 2009, 14:22
  2. Compile 4.4.0
    By LordQt in forum Installation and Deployment
    Replies: 18
    Last Post: 29th May 2008, 13:43
  3. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  4. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 02:49
  5. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 12:19

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.