• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: variable weirdness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: variable weirdness
      • From: Erik Grumstrup <email@hidden>
References: 
 >Re: variable weirdness (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: [REPOST] Data Modeler/Core Data
  • Next by Date: external declares
  • Previous by thread: Re: variable weirdness
  • Next by thread: Re: variable weirdness
  • Index(es):
    • Date
    • Thread