Re: pointer address changes for no reason (SOLVED)
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