• 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: pointer address changes for no reason (SOLVED)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pointer address changes for no reason (SOLVED)


  • Subject: Re: pointer address changes for no reason (SOLVED)
  • From: "Ewan Delanoy" <email@hidden>
  • Date: Fri, 13 Apr 2007 10:42:02 +0200 (CEST)
  • Importance: Normal

> Given that numPagesField changed value is 0x15, which translates to
> decimal 21; given that printedPages first element was 21; and given
> that the contents of printedPages has changed in the "After"
> snapshot, I would suspect that you may have some code that
> manipulates/changes printedPages and it is overwriting the
> numPagesField. I'd closely scrutinize any code that updates
> printedPages, using the debugger to step through any such code and
> checking the numPagesField value at each step.
>
> Just a guess based on the data provided. Hope it helps.
>

      Your guess is absolutely correct. I owe many thanks to you Michael.
It all came from a typo in the code, where
k=0 was written instead of k=1, so that
at some point the program tried to execute the
command printedPages[-1]=21. And Xcode/gdb's watch command
("p &numPagesField; watch *(NSTextField*) <value printed above>")
noticed nothing : as someone else said on this thread, it's worse
than useless.

                  Thanks to all those who answered me on this thread.

                                                                       Ewan




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: pointer address changes for no reason (From: Scott Ribe <email@hidden>)
 >Re: pointer address changes for no reason (From: John Stiles <email@hidden>)
 >Re: pointer address changes for no reason (From: "Ewan Delanoy" <email@hidden>)
 >Re: pointer address changes for no reason (From: Michael Babin <email@hidden>)

  • Prev by Date: Does NSFileWrapper implement a lazy read?
  • Next by Date: Re: hey, who's enabling my window's close button?
  • Previous by thread: Re: pointer address changes for no reason
  • Next by thread: re: pointer address changes for no reason
  • Index(es):
    • Date
    • Thread