Re: variables using ClassView and Class wizard

From: Scott McPhillips [MVP] (scottmcp_at_mvps.org.nothere)
Date: 04/03/04


Date: Sat, 03 Apr 2004 14:31:58 -0500

seia0106 wrote:
> Thank you Scott for your reply.
>
> I only have the 'release version' of the program that i am trying to
> improve. Iniitally the breakpoints could not be set. After changing
> project settings in C++ tab to 'program database' and in Linker tab to
> generate debug info the release version can be debugged now.
> But my problem persists. That is when i define a new variable in my
> main class(mytemplateclass<int> X or when i assign variables(of any
> type) to a control(any control) on my MFC GUI, then program runs fine
> and gives correct results but when program exits then above 'access
> violation error' occurs. I wonder if this has something to do with
> Debug/Release. And if it is so how can
> I solve it or what changes i have to made to prject settings or what i
> have to do for making changes to this program, which i only have in
> release mode?
> I am quite new to MFC programming and this problem is puzzling for me.
> Can someone please give some hint what could be causing this error and
> how to fix it? thanks.

Your post shows that there are a couple of basic things about debugging
with VC that you don't understand. There is no such thing as having
only the release version. If you have the code you have what you need to
make a debug version. Investigate the Configurations command on the
Build menu (VC6). You can make a debug build, and it will make analysis
much easier.

Nobody here can tell you where your access violation is occuring. But
the debugger can. If you have not done so, first install the MFC source
code. When the AV occurs study the debugger stack window, and double
click on each call level to learn where the code was executing. You
need to get some information about what is happening, with what, where.

-- 
Scott McPhillips [VC++ MVP]


Relevant Pages

  • Re: Debugger / message pump problems
    ... > on the CE platform get processed, and the debug application runs as ... > hangs is in a debug build running with the debugger - a release ... I am experiencing about the same kind of problem you have with MFC ... not display a certain dialog. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: debug symbols VS 2005
    ... There is nothing special i need to do for the debug ... How exactly are the debug symbols being loaded by debugger ... If the assemblies are considered "My Code" ... >P.S. I'm spending tommorrow reading up all the articles on Scott Alen's ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: error R6031
    ... MFC Application and both dlls are created in VS2005. ... I added debug info into release versions and here is "!analyze -v" from ... debugger was awakened by an interrupt. ...
    (microsoft.public.vc.mfc)
  • Re: The application has requested the Runtime to terminate it in an unusual way, please contact the
    ... I have a MFC application programmed/complied/linked with VS2005, ... Runtime Error: ... Have you tried running a debug build in the debugger? ...
    (microsoft.public.vc.mfc)
  • Re: How to connect to children process
    ... Main problem is amount of manual operations required per debug cycle. ... connection to DLL with debugger takes sensible amount of time and manual ... Is the main problem that the debugger keeps symbols file loaded ... AFAIK that's how VS2003 debugger works, but WinDbg should usually ...
    (microsoft.public.vsnet.debugging)