Results 1 to 4 of 4

Thread: Invalid Address specified to RtlFreeHeap( 003E0000, 0022FE1C )

  1. #1
    Join Date
    May 2010
    Posts
    86
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Invalid Address specified to RtlFreeHeap( 003E0000, 0022FE1C )

    There is a segmentation fault error when I close the program. It looks like it fails at the point when destructor of main class calls delete ui;.
    It doesn't really give more info which ui element could already be deleted, so what can you advise for troubleshooting in such case?

    I'm using the latest, 4.7.3 version.

    Qt Code:
    1. warning: HEAP[NESA.exe]:
    2. warning: Invalid Address specified to RtlFreeHeap( 003E0000, 0022FE1C )
    3.  
    4.  
    5. Program received signal SIGTRAP, Trace/breakpoint trap.
    6. 0x7c90120f in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll.dll
    7. (gdb) backtrace
    8. #0 0x7c90120f in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll.dll
    9. #1 0x7c96ee31 in ntdll!RtlpNtMakeTemporaryKey () from C:\WINDOWS\system32\ntdll.dll
    10. #2 0x7c96f26e in ntdll!RtlpNtMakeTemporaryKey () from C:\WINDOWS\system32\ntdll.dll
    11. #3 0x7c970456 in ntdll!RtlpNtMakeTemporaryKey () from C:\WINDOWS\system32\ntdll.dll
    12. #4 0x7c94bafc in ntdll!LdrFindEntryForAddress () from C:\WINDOWS\system32\ntdll.dll
    13. #5 0x003e0000 in ?? ()
    14. #6 0x7c91a1ba in ntdll!RtlpUnWaitCriticalSection () from C:\WINDOWS\system32\ntdll.dll
    15. #7 0x77c2c2de in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll
    16. #8 0x003e0000 in ?? ()
    17. #9 0x6a2c1768 in ZN7QObject5eventEP6QEvent () from c:\Qt\Desktop\Qt\4.7.3\mingw\bin\QtCore4.dll
    18. #10 0x6515961e in ZN7QWidget5eventEP6QEvent () from c:\Qt\Desktop\Qt\4.7.3\mingw\bin\QtGui4.dll
    19. #11 0x654ab1c8 in ZN11QMainWindow5eventEP6QEvent () from c:\Qt\Desktop\Qt\4.7.3\mingw\bin\QtGui4.dll
    20. #12 0x6510fa38 in ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent ()
    21. from c:\Qt\Desktop\Qt\4.7.3\mingw\bin\QtGui4.dll
    22. #13 0x65118382 in ZN12QApplication6notifyEP7QObjectP6QEvent () from c:\Qt\Desktop\Qt\4.7.3\mingw\bin\QtGui4.dll
    23. #14 0x6a2b419c in ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent ()
    24. from c:\Qt\Desktop\Qt\4.7.3\mingw\bin\QtCore4.dll
    25. #15 0x6a2b6f8c in ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData ()
    26. from c:\Qt\Desktop\Qt\4.7.3\mingw\bin\QtCore4.dll
    27. #16 0x6a2d6cee in ZN21QEventDispatcherWin3221registerEventNotifierEP17QWinEventNotifier ()
    28. from c:\Qt\Desktop\Qt\4.7.3\mingw\bin\QtCore4.dll
    29. #17 0x7e418734 in USER32!GetDC () from C:\WINDOWS\system32\user32.dll
    30. #18 0x00000000 in ?? ()
    To copy to clipboard, switch view to plain text mode 


    Added after 18 minutes:


    OK, I have started to comment out some new parts of the code, and it looks like I have accidentally called setAttribute(Qt::WA_DeleteOnClose, true); for my main class. So I started to find the reason of it with google and found out that the class should be created on the heap instead of stack. I thought that it could mean that I should have had to create an object of the class in main.cpp instead of declaring it as a fix variable, so I was going to try that. Voila! It worked (and of course, removing setAttribute(Qt::WA_DeleteOnClose, true); also works the vice-versa way).

    I leave this thread here for future newbies .
    Last edited by falconium; 23rd April 2011 at 03:23.

  2. #2
    Join Date
    May 2010
    Posts
    86
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Invalid Address specified to RtlFreeHeap( 003E0000, 0022FE1C )

    I again have the similar problem, but it has a different manner.
    If I run the release version of the program, then everything is fine, but it crashes in debug mode when i quit the application.
    It happened after rebuilding the code. My only guess is that the path is net set for the right DLLs.
    Any guess, idea?

    Thanks!

  3. #3
    Join Date
    May 2010
    Posts
    86
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Invalid Address specified to RtlFreeHeap( 003E0000, 0022FE1C )

    Update: the app crashes randomly. I don't know what could the problem be.
    Please, help! I have always reached the end of a complex app, and now it crashes... I don't have anything in my hand to overcome this. I have tried to find memory handling issues with external debugger and leak finder, but it only found those in ui_*.h which are Qt generated. Please, help!

    This is what I get all the time:

    Dump of assembler code for function ntdll!DbgUiConnectToDbg:
    0x7c90120e <+0>: int3
    0x7c90120f <+1>: ret
    0x7c901210 <+2>: mov %edi,%edi
    End of assembler dump.


    Added after 34 minutes:


    It looks like anytime I free memory up with 'delete', it crashes. However, those were working before...
    Could it be that the size of occupied space changed somehow meanwhile? Can it be caused by some release/debug dll mixings? If yes, how should I setup it correctly?
    Last edited by falconium; 4th May 2011 at 23:29.

  4. #4
    Join Date
    May 2010
    Posts
    86
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Invalid Address specified to RtlFreeHeap( 003E0000, 0022FE1C )

    It seems so that debug_new.cpp/h tool for searching for memory leakage is not really working under Qt. Sad. After removing it from the project, it runs smoothly.
    Do you have any better idea for tools which are available for free?

Similar Threads

  1. Invalid Address specified to RtlFreeHeap
    By abrou in forum Newbie
    Replies: 5
    Last Post: 7th January 2018, 11:06
  2. Replies: 3
    Last Post: 20th June 2017, 01:13
  3. getting IP-address
    By jefklak in forum Qt Programming
    Replies: 2
    Last Post: 23rd October 2010, 09:19
  4. how can i get IP address
    By dognzhe in forum Qt Programming
    Replies: 1
    Last Post: 12th May 2009, 05:27
  5. IP Address
    By rajveer in forum Qt Programming
    Replies: 2
    Last Post: 11th November 2008, 08:30

Tags for this Thread

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.