Re: App crashes when debugging, not in normal execution
Re: App crashes when debugging, not in normal execution
- Subject: Re: App crashes when debugging, not in normal execution
- From: "Michael Crawford" <email@hidden>
- Date: Fri, 21 Sep 2007 16:20:40 -0700
It might be an uninitialized variable. They'll pick up whatever value
happened to be left in memory by the last user of it. Possibly when
you debug your memory is laid out differently.
One way to check for this is to malloc a big buffer at the beginning
of main, fill it with 0xFF bytes, then free it. Try filling it with
other values too.
Is your program written in C++? Do you initialize all your member
variables in constructor initialization lists? If not you should.
While class or struct types will have their default constructor called
if you don't mention them explicitly in the initialization lists,
scalar types are not initialized by default.
Hope this helps.
Mike Crawford
mdcrawford at gmail dot com
Download my music at http://www.geometricvisions.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden