Results 1 to 9 of 9

Thread: Program runs on Windows 7, crashes on Windows XP

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: Program runs on Windows 7, crashes on Windows XP

    The memory map will be different on XP and 7, but that should be invisible to the application, unless it does undefined things like trash memory or double free some pointers. On 7, you might be causing the same fault but because different code lives there, the same fault doesn't happen.

  2. #2
    Join Date
    Mar 2010
    Posts
    55
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    9

    Default Re: Program runs on Windows 7, crashes on Windows XP

    Ok, I found the problem.
    After spending DAYS troubleshooting this, and having the program crash in multiple locations, I finally traced it down to the root cause.

    At some points in the program, I would create a new pointer by static_cast'ing an existing pointer. The problem is I would then deallocate that new pointer, not realizing when I did so, I was also deallocating the ORIGINAL pointer. For some reason I thought that when I used static_cast I created a copy of the existing pointer.

    I went through my code and removed all relevant delete statements, and now all is well.

Similar Threads

  1. 64-bit Qt for windows: QtScript crashes.
    By eyeofhell in forum Qt Programming
    Replies: 38
    Last Post: 22nd January 2010, 15:18
  2. I need example for Windows Mobile working program
    By Mr.QT in forum Qt Programming
    Replies: 3
    Last Post: 22nd June 2009, 09:19
  3. Replies: 5
    Last Post: 5th October 2008, 05:12
  4. I can't compile my program in windows!!
    By brevleq in forum Qt Programming
    Replies: 12
    Last Post: 29th November 2007, 22:08

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.