Results 1 to 4 of 4

Thread: Qt application crashing - Heap errors?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Default Re: Qt application crashing - Heap errors?

    Thanks

    You are correct, it is my delete[] statements that are causing the errors, but I don't know why because I am quite sure I implemented them correctly. All my Heighmap and GaussKernel structs can only be created using the constructor.

    I have reprogrammed the way somethings work, but I am still getting the same problems.

    here is the stack trace from Qt Creator

    Qt Code:
    1. 0 ntdll!RtlQueryEnvironmentVariable_U C:\Windows\system32\ntdll.dll 0
    2. 1 ntdll!RtlAreBitsClear C:\Windows\system32\ntdll.dll 0
    3. 2 ntdll!RtlAreBitsClear C:\Windows\system32\ntdll.dll 0
    4. 3 ntdll!RtlUnicodeStringToOemString C:\Windows\system32\ntdll.dll 0
    5. 4 ntdll!RtlpSetUserPreferredUILanguages C:\Windows\system32\ntdll.dll 0
    6. 5 ntdll!RtlTraceDatabaseValidate C:\Windows\system32\ntdll.dll 0
    7. 6 ntdll!RtlUnicodeStringToOemString C:\Windows\system32\ntdll.dll 0
    8. 7 msvcrt!malloc C:\Windows\system32\msvcrt.dll 0
    9. 8 operator new 0
    10. 9 operator new[] 0
    11. 10 HeightMap::HeightMap Types.cpp 29
    12. 11 TerrainAnalyser::analyseTerrain terrainanalyser.cpp 97
    13. 12 GUI::openFile GUI.cpp 160
    14. 13 GUI::qt_metacall moc_GUI.cpp 71
    15. 14 QMetaObject::activate qobject.cpp 3104
    16. 15 QMetaObject::activate qobject.cpp 3198
    17. 16 QAction::triggered moc_qaction.cpp 236
    18. 17 QAction::activate qaction.cpp 1160
    19. 18 QMenuPrivate::activateCausedStack qmenu.cpp 967
    20. 19 QMenuPrivate::activateAction qmenu.cpp 1060
    21. 20 QMenu::mouseReleaseEvent qmenu.cpp 2254
    22. ... <More>
    To copy to clipboard, switch view to plain text mode 

    Attatched is the debugger output. Debugger Output.pdf
    If anyone would like to look at the code e-mail me and I will send the full code to you, I don't want to attach it because it is a current project.

    Thanks

  2. #2
    Join Date
    Aug 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Default [RESOLVED] Qt application crashing - Heap errors?

    Thanks for the help, it was a stupid problem of me not editing using the correct variable when in the array, so the array index was negative.

Similar Threads

  1. Application crashing
    By addu in forum Qt Programming
    Replies: 9
    Last Post: 22nd May 2009, 11:37
  2. Application crashing on setting Model in QComboBox.
    By kaushal_gaurav in forum Qt Programming
    Replies: 6
    Last Post: 13th February 2009, 19:20
  3. Replies: 4
    Last Post: 1st December 2008, 12:13
  4. application freezes without crashing (and closing)
    By nass in forum Qt Programming
    Replies: 15
    Last Post: 25th September 2007, 12:21
  5. Application is Crashing
    By shyam prasad in forum Qt Programming
    Replies: 1
    Last Post: 9th January 2007, 18:04

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.