Re: Release version crashes - again
From: Bruce Eitman \(eMVP\) (beitmannospam_at_NOSPAM_applieddata.NOSPAM_net)
Date: 09/15/04
- Next message: Paul G. Tobey [eMVP]: "Re: Interrupts"
- Previous message: Paul G. Tobey [eMVP]: "Re: Release version crashes - again"
- In reply to: Charles Gilley: "Release version crashes - again"
- Next in thread: Charles Gilley: "Re: Release version crashes - again"
- Reply: Charles Gilley: "Re: Release version crashes - again"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 15 Sep 2004 11:35:56 -0400
I would take a look at any assumptions about the values of variables prior
to them being initialized.
For example
DWORD * pointer;
and
DWORD *pointer = NULL;
are not usually equal in retail, but they usually are in debug. So code
that does
if( pointer == NULL)
initPointer( pointer );
will execute initPointer in debug, but might not in retail. The solution is
to always explicitly init varialbles somehow, someplace prior to reading
them. One quick way to test this, is to set a compiler/linker flag that
causes all variables to be cleared by default (which is what usually happens
in debug) I don't know off the top of my head what the flag is.
-- Bruce Eitman (eMVP) Senior Engineer beitman AT applieddata DOT net Applied Data Systems www.applieddata.net An ISO 9001:2000 Registered Company Microsoft WEP Gold-level Member Do have an opinion on the effectiveness of Microsoft Windows Mobile and Embedded newsgroups? Let us know! https://www.windowsembeddedeval.com/community/newsgroups "Charles Gilley" <cgilley@bravesw.com> wrote in message news:de3cdf0.0409150636.14c89f51@posting.google.com... > Okay, I've read all of the assorted notes for this issue, and I'm > still beating my head against the wall, and I'm about ready to find > another career. > > The program works fine in debug, and it C0000005's in release mode. > Yes, I know this means something didn't get initialized. I need some > suggestions for tracking the thing down. > > In release mode, nothing works in terms of printing. DEBUG, TRACE, > etc. all evaluate to zero, besides there isn't a debugger window to > send it to. Hmmm. > > Read an article on using UDP to broadcast the print debug: this is a > GREAT idea, but my code is crashing in the CONSTRUCTOR area (long > story about this), so I cannot even get to the point of getting the > UDP broadcast operational. > > I have Entrek's CodeSnitch. Good product, but it isn't finding > anything in debug mode. > > The map of the image provides next to nothing in terms of information. > > AfxMessageBox - doesn't work because nothing is set up this early in > the application launch process. > > I'm running out of ideas... anyone have any tricks or suggestions to > isolate this SOB? > > Constructor: The way this code is written, the original developer > coded it as a static object: CObjectClass m_MyObject. So, as soon > as the program starts, the infrastructure sees the declared object and > fires the constructor for this object. This constructor has other > application objects in it that, you guessed it, are declared static. > And on and on it goes. So, when the parent object is declared, I get > dozens of constructors firing before I execute one bit of code for the > application itself. If I have to, I'll redesign this to require > NEW's, but for the moment, I don't have the time to consider this > approach. > > Thanks for any pointers.... and prozac shipments :)
- Next message: Paul G. Tobey [eMVP]: "Re: Interrupts"
- Previous message: Paul G. Tobey [eMVP]: "Re: Release version crashes - again"
- In reply to: Charles Gilley: "Release version crashes - again"
- Next in thread: Charles Gilley: "Re: Release version crashes - again"
- Reply: Charles Gilley: "Re: Release version crashes - again"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|