Code crash in MS Visual Studio 2005 in RELEASE configuration

Question :

Code crash in MS Visual Studio 2005 in RELEASE configuration,

Answer :

I have a workspace for running an H.263 Video Encoder in a loop for 31 times i.e. the main is executed 31 times to generate 31 different encoded bit streams. This MS Visual Studio 2005 Workspace has all C source files. When i create a “DEBUG” configuration for the workspace and build and execute it, it runs fine, i.e. it generates all the 31 output files as expected.
But when I set the configuration of the workspace to “RELEASE” mdoe, and repeat the process, the encoder crashes at some test case run.

Read More  “Beautifying” an OS X disk image

Now to debug this is verified following:

  1. Analyzed the code to see if there was any variable initialization being missed out in every run of the encoder
  2. Checked the various Workspace(Solution) options in both the modes (DEBUG and RELEASE).

There are some obvious differences, but i turned the optimization related options explicitly same in both modes.

But still could not nail the problem and find a fix for that. Any pointers?



It’s hard to say what the problem might be without carefully inspecting the code. However…

Read More  Opening a file in my application from File Explorer

One of the differences between debug and release builds is how the function call stack frame is set up. There are certain classes of bad things you can do (like calling a function with the wrong number of arguments) that are not fatal in a debug build but crash horribly in a release build. Perhaps you could try changing the stack frame related options (I forget what they’re called, sorry) in the release build to the same as the debug build and see whether that helps.

Another thing might be to enable all the warnings you possibly can, and fix them all.

Read More  “Could not find type” error loading a form in the Windows Forms Designer

That’s the answer Code crash in MS Visual Studio 2005 in RELEASE configuration, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you