Debugging problems with a release configuration

Hello!

I am writing a subprogram for a larger application in VC++. A few days ago, my technical project manager asked me to hand over a running test version for the parts that are already finished. I prepared one that runs in the debug mode fine. But he needs, of course, the release mode to install it on the testers PC. So I compiled with Microsoft Visual Studio 2008 the release mode version & cleaned it from bugs that were not visible in the debug mode.

The application consists of a general window where all subprograms are listed and clients (users of the product) can be selected. This part is written in VBP. All the subprograms are written in VC++. The subprogram I have written uses GDI+. Other parts use DirectX. As DirectX does not work fine with the Windows GUI, the program has it’s own windows and controls (such as buttons…).

Problem
The code runs fine in the debug mode. When I open the main window (written in Visual Basic) & start in debug mode of this program (to be set in a separate text file with DebugMode=1), the instruction windows open and their buttons work as requested. However, I can neither see the loaded background nor the animations that should be there. The screen is white. To be sure that the application is running, I added message boxes that report that the program is in method such-and-such. This showed me that the code is running (and uses memory and CPU according to the task manager). Also, the windows are functioning correctly.

Now, the interesting point: I STOP the running program by pressing the [STOP] button of the Microsoft Visual Studio 2008 & start it again. The background is now visible and all animations are running. If I close the main program (written in VBP) & start it again, I will have the same problem the first time.

If my technical project manager starts the EXE file directly, he has always a blank background and cannot see any animation.

To find out what is going wrong, I downloaded WinDBG & started to read a tutorial.

Question
Although it is very hard to give advices about a problem in an alien environment: Has anybody had a similar problem with an application? Is using WinDBG a good idea for this case, where there is no memory dump (the program doesn’t crash)?

I prepared one that runs in the debug mode fine. But
he needs, of course, the release mode to install it on the
testers PC. So I compiled with Microsoft Visual Studio 2008
the release mode version & cleaned it from bugs that were not
visible in the debug mode.

As you have written it’s rather difficult to give advice without knowing the project directly. The only thing I can think of is whether the fixing of bugs which weren’t visible in debug mode changed something which it shouldn’t really have. - Did you try to compile a debug-version after this cleaning-step?

Unfortunately I’m not much help with the Windows-specific parts of your question, because I’m doing Linux-development only.

I think though, that it’s never a wrong move to use a debugger - perhaps try to single step through the corresponding code-parts in the release and in the debug-version and take a look what happens differently.

Good luck