Thread: debug release conf problem

  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    62

    debug release conf problem

    Hello!
    I have a weird problem. My DirectX game works like it should only with debug configurations. With Release it does not. The same code works differently somehow.

    When I try the release version, the view is frozen. The camera is follows my character in the game, but in the release version only the character moves.

    Honestly I'm not aware of the differences of debug and release. I thought the debug version was only easier to debug and slower because of that. I think the problem might be caused of the configuration differences, but I unfortunately know nothing about them.

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by fighter92 View Post
    Hello!
    I have a weird problem. My DirectX game works like it should only with debug configurations. With Release it does not. The same code works differently somehow.

    When I try the release version, the view is frozen. The camera is follows my character in the game, but in the release version only the character moves.

    Honestly I'm not aware of the differences of debug and release. I thought the debug version was only easier to debug and slower because of that. I think the problem might be caused of the configuration differences, but I unfortunately know nothing about them.
    one of the differencies between debug/release builds - debug initializes vars to 0
    release does not

    check that you are not using notinitialized pointers
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Registered User
    Join Date
    Aug 2006
    Posts
    62
    There seems to be no uninitialized variables in places connected to view. Although I didn't know that difference, I usually give them a value anyway, if it's important.

    Are there more important differences?

  4. #4
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  5. #5
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    You should read the following article http://www.flounder.com/debug_release.htm
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  6. #6
    Registered User
    Join Date
    Aug 2006
    Posts
    62
    I found out the problem and fixed it. It seems I've been lazy and written if(charname=="blabla"). It works perfectly in debug, but not in release.

  7. #7
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    one of the differencies between debug/release builds - debug initializes vars to 0
    MSVC 2003 does not.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Hash works in debug but not release
    By VirtualAce in forum C++ Programming
    Replies: 2
    Last Post: 01-19-2009, 10:31 PM
  2. Debug Assertion failure problem
    By uldaman in forum C++ Programming
    Replies: 8
    Last Post: 01-21-2008, 02:22 AM
  3. Bin packing problem....
    By 81N4RY_DR460N in forum C++ Programming
    Replies: 0
    Last Post: 08-01-2005, 05:20 AM
  4. DirectMusic engine problem
    By VirtualAce in forum Game Programming
    Replies: 7
    Last Post: 03-17-2005, 06:12 PM
  5. Linker error in release but not debug
    By Robert602 in forum Game Programming
    Replies: 4
    Last Post: 12-08-2001, 01:32 AM