Remote-debugger lies about release version? 
Author Message
 Remote-debugger lies about release version?

Hi

yes, it can lie. For example, call stack can be corrupted. There is a common
mistake that can cause this behavior. Check all your message handlers that
you added without using a Class Wizard. They should contain the correct
number of parameters. For example,

ON_MESSAGE(WM_MY_MESSAGE, OnMyMessage)
....

OnMyMessage(WPARAM wParam, LPARAM lParam); // correct
OnMyMessage(WPARAM wParam);  // NOT correct; will work in debug version, but
will crash in release

--
Yaroslav Goncharov
Smartphone Developer Network
www.smartphonedn.com


Quote:
> Hello,

> I'm trying to debug an app which only fails in the release version. It
> *appears* that I can't do that under eVC, because the de{*filter*} seems
> to be lying to me.

> WHAT I DID:

> I compiled the Win32(WCE ARM)Release version of my app, but changed
> the project settings in two ways. First, I told it to generate debug
> information. Second, I completely disabled optimization. I was careful
> to recompile everything.

> Then I launched the app under the de{*filter*}. I had narrowed down the
> problem to the constuctor of a Filestream object[1], which I'm using
> to read and write XML files using MSXML and the DOM, as per Chris
> Muench's example article[2].

> Inside the constructor I do nothing but intialize a few fields. I set
> a breakpoint at the start and end of the constructor, and used the
de{*filter*}
> to inspect those fields. According to the de{*filter*}, they were not
> initialized. (Specifically, I initialized an integer field to '1', and
> its value appeared, in various runs, to be some number like 2470336,
> 63421, etc.)

> Finally I instrumented the constructor with print statements, and the
> output file indicates that the fields were indeed initialized
> properly. (The control flow indicates the same thing--e.g. as I walk
> through switch statements on that integer value.)

> In addition, the de{*filter*}'s line pointer sometimes bounced around
> randomly, as if I were debugging optimized code--but I carefully
> turned off ALL optimizations, so that can't (shouldn't!) be happening.

> Does anyone else have experience with this? Does eVC 3.0's de{*filter*}
> lie when debugging release code? Everything was fine when I ran the
> debug code.

> Thanks!
> Len.

> [1] Version of Filestream posted by  Lars Lundstedt:

< http://www.*-*-*.com/ %23wHQ%23%24%23GBHA.1604%4...
tngp04>
Quote:

> [2] Original Article by Chris Muench:

< http://www.*-*-*.com/ ;


Mon, 04 Oct 2004 14:48:42 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Help: Visual C++ Debugger Lies!

2. lies, damned lies and breakpoints

3. Lies, damn lies, and documentation: %lS format specifier incorrect

4. Debug version - Release version

5. 4tH version 3.3d, release 2 released!

6. Debug version ok but release version problem

7. Debug Version and Release Version

8. Win32 debug version and Win32 release version

9. Why the Font size is not same between Debug version and Release Version

10. Debug version Ok, Release version Failed

11. Debug version ok but release version problem

12. Debug version works, Release version does not?!

 

 
Powered by phpBB® Forum Software