Re: variable weirdness
Re: variable weirdness
- Subject: Re: variable weirdness
- From: Scott Ribe <email@hidden>
- Date: Fri, 10 Feb 2006 18:10:41 -0700
- Thread-topic: variable weirdness
> When I run it in debug however, the program runs
> perfectly and the argument is the correct value. Anybody run into
> this...have I revealed myself as an ignoramus?
As suggested, showing the code would help, but I can give you a general
hint. Switching between debug & build changes memory layout, and I've seen
similar bugs in my code caused by my not setting a variable correctly
somewhere, and its memory just coincidentally holding a correct (or at least
non-crashing) value left over from some other function invocation. You'd
think at first the odds against this would be ridiculously large, but
actually, considering the stack and how things are laid out, it's not that
uncommon for an uninitialized variable to have a reasonable-looking value.
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
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