Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Release Mode Bugs with Visual Studio .Net 2003

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2005
    Posts
    2

    Release Mode Bugs with Visual Studio .Net 2003

    I've been writing my own graphics engine for quite some time now, and have reached th epoint where adding a lot of objects causes the framerate to drop to an unacceptable level when using executables compiled in Debug mode. Switching to the Release mode has given me a 10fold performance increase, but has caused strange run time errors that I can't account for. For instance, some objects won't render, some calculations are off, etc. Does anyone know of any common compiler options that can be set to alleviate some of these problems?

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Jan 2003
    Location
    Virginia
    Posts
    601

    Re: Release Mode Bugs with Visual Studio .Net 2003

    I use .net 2003 and haven't had any unexpected issues. Verify that you are initializing all variables that require it. Also, verify that you don't have wild pointers - pointers pointing into the wrong memory space (though in debug mode it would likely warn you or fail nicely). Also, verify you are freeing up dynamically allocated memory. In debug mode uninitialized variables are given a default value including uninitialized pointers and manages memory freeing up all dynamically allocated memory after the program exits. There are others aspects of debug mode which help to maintain stability but for release it is up to you to verify the integrity of your variables, memory, etc.

  3. #3
    Intern Newbie
    Join Date
    Apr 2002
    Location
    CA, USA
    Posts
    41

    Re: Release Mode Bugs with Visual Studio .Net 2003

    Surviving the Release Version is one of the most complete sources of information on release build problems.

    PS: Most of the resources, you allocated (memory, handles etc.) in your process will be released by the operating system, when the process ends. It does not depend on the type of build (ie debug vs release), although most of the time this is not an excuse not to clean them up before exiting.
    Orhun Birsoy

  4. #4
    Junior Member Regular Contributor
    Join Date
    Jun 2001
    Posts
    198

    Re: Release Mode Bugs with Visual Studio .Net 2003

    Originally posted by M. Wassmer:
    Switching to the Release mode has given me a 10fold performance increase, but has caused strange run time errors that I can't account for. For instance, some objects won't render, some calculations are off, etc.
    Also, if your floating point operations are going off, try enabling improve floating point consistency with the /Op flag.

  5. #5
    Junior Member Newbie
    Join Date
    Mar 2005
    Posts
    2

    Re: Release Mode Bugs with Visual Studio .Net 2003

    Thanks for the replies. I've fixed the problem. The trouble was an uninitialized variable. I had initialized it in a constructor, but then Visual Studio crashed and hadn't autosaved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •