debug-mode

Common reasons for bugs in release version not present in debug mode

What are the typical reasons for bugs and abnormal program behavior that manifest themselves only in release compilation mode but which do not occur when in debug mode? ...

Visual Studio freezes when switching to debug mode

Strange visual studio (TS 2008) problem: The IDE completely freezes whenever I switch from Release to Debug mode in a specific project. It happens right as I switch, before I try to build or do anything else. The whole thing started out of the blue, without any abnormal change I can think of. I tried to clean the solution, but it didn't...

Why "Optimize Code" is needed to be turned on for my program to run without crashing?

I was given this WPF application, when I tried to run the program in Debug mode it would crash before getting to Windows1.xml. I later tried running in Release Mode and it would run successfully. I narrowed it down to that, I needed to turn on "Optimize Code" for it to work. Note: Breakpoints, stepping into from debug, and stopping on t...

iPhone App Has Bugs in Release Mode, But Not in Ad Hoc Distribution or Debug Mode

I'm working on a relatively simple iPhone app which retrieves external data and subscribes to push notifications. Both of these features work flawlessly on all OS versions in debug and ad hoc distribution mode -- which is likely why the application was admitted to the app store -- but both of these features work unpredictably and often f...

OnCtrlColor Not Working?

Hi, I used the following overloaded method to change the text color to red in a listbox, in a Visual C++ MFC dialog based application. When I build the program in DEBUG mode, it works perfectly. But when I use the RELEASE mode the text color doesn't change. Why is this and how can I overcome this problem?? Thanks!! HBRUSH MyDlg::OnCtl...

My code works in Debug mode, but not in Release mode.

Hi, I have a code in Visual Studio 2008 in C++ that works with files just by fopen and fclose. Everything works perfect in Debug mode. and I have tested with several datasets. But it doesn't work in release mode. It crashes all the time. I have turned off all the optimizations, also there is no dependency to anything(in the linker), and...

Weird behavior of std::vector

I have a class like this: class OBJ{...}; class A { public: vector<OBJ> v; A(int SZ){v.clear(); v.reserve(SZ);} }; A *a = new A(123); OBJ something; a->v.push_back(something); This is a simplified version of my code. The problem is in debug mode it works perfect. But in release mode it crashes at "push_back" line. (with all...

Why would Silverlight be crashing in Release but not in Debug mode?

I have a Silverlight App that has worked well in Debug and Release modes for weeks. It still works well in Debug mode. However, now when I run it in Release mode, it starts, shows me the screen, loads the data, then hangs, and the browser (Firefox) closes automatically. I've tried other browsers and each of them crashes, Chrome says "T...

Release mode static library much larger than debug mode version

Hi everyone, today i found out that the compiled static library i'm working on is much larger in Release mode than in Debug. I found it very surprising, since most of the time the exact opposite happens (as far as i can tell). The size in debug mode is slightly over 3 MB (its a fairly large project), but in release it goes up to 6,5 MB...

VS2010 Debug build works, but Release does not

I have an app that I've recently added two C# classes to. It always built in both debug and release. The differences between the two configs are nothing. Now when I build the release, it says that one of the dependencies cannot be accessed. This is only for the release build. Nothing changed to that dependency and it always worked. Any ...