Re: variables using ClassView and Class wizard

From: seia0106 (miahmed67_at_yahoo.com)
Date: 04/08/04


Date: 8 Apr 2004 03:04:02 -0700


"Scott McPhillips [MVP]" <scottmcp@mvps.org.nothere> wrote in message news:<OIi3CLbGEHA.3928@TK2MSFTNGP10.phx.gbl>...
> 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.

Hi thanks again for the reply.
I have done as you said setting the active config to Debug.
When i run the program it runs fine but when i exit it gives an error
'Unhandled excpeption in BerechnungAnzeigen.exe kernel32.dll
c:0xc0000000:access violation'
which takes me to dissassmebling
'77E7B59E xadd dword ptr [ecx],eax'
the call window shows a message like this
KERNEL32! 77e7b59e()
 and it stucks there which does not tell me much.
in variables window i am told that
'ZeitMatrix CXX0017: Error: Symbol "ZeitMatrix" not found'
and in the last line
CXX0017: CXX0014: error: Operand missing

since this variable (MyMatrixClass<int>Zeitmatrix) is not so
important for my calulations so i deleted it from the main class
constructor but it did not make any difference.
Seems I will have to teach myself lot about debugging in MFC.

Specially puzzling for me why it is happening that when i put a
control a on my Gui and assign a variable to it then 'access
violation' message pops up.



Relevant Pages

  • Re: cant bebug a dll
    ... You cannot mix debug and release MFC environments without expecting serious disasters. ... other aids for debugging, but you have to give up something here. ... >> debugging the DLL, this message can obviously be ignored. ...
    (microsoft.public.vc.mfc)
  • Re: How do i debug in Release mode
    ... it might sound easy for everyone but please if someone colud tell ... >> me how to debug my MFC application in Release mode. ... > application in release mode is not designed to provide debugging. ...
    (comp.lang.cpp)
  • Re: How do i debug in Release mode
    ... it might sound easy for everyone but please if someone colud tell ... > me how to debug my MFC application in Release mode. ... MFC is not C++ and even less STL so your question is off topic. ... application in release mode is not designed to provide debugging. ...
    (comp.lang.cpp)
  • Re: Office or InDesign breaks VS 2005 debugging?
    ... Given tha I was using and debugging the sub-projects in this solution before ... some getting used to) and the debug symbols for the child project are no ...
    (microsoft.public.vsnet.debugging)
  • 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)