Re: Logical and - second operator evaluated?
Re: Logical and - second operator evaluated?
- Subject: Re: Logical and - second operator evaluated?
- From: Martijn van Exel <email@hidden>
- Date: Sun, 1 Mar 2009 22:41:46 +0100
On Sun, Mar 1, 2009 at 22:10, Shawn Erickson <email@hidden> wrote:
> On Sun, Mar 1, 2009 at 12:59 PM, Martijn van Exel <email@hidden>
> wrote:
>
> [...]
>
> > * The method invoked by the first timer also dismisses the UIActionSheet.
> > * In the didDismissWithButtonIndex callback, the two timers would be
> > invalidated. This would cause a BAD_ACCESS crash.
> >
> > I think I figured out what goes wrong: In the time it takes to dismiss
> the
> > UIActionSheet (animated), the repeating timer, still valid, would call
> its
> > designated method to update the UIActionSheet title. This method creates
> an
> > NSTimeInterval calculated from
> > [[timer fireDate] timeIntervalSinceDate:[NSDate date]];
> > and this probably would cause the crash, [timer fireDate] returning
> because
> > it already expired.
>
> If you are getting a crash you should have a crash log (or trap it in
> the debugger). This would give you the location of your crash.
>
> [....]
>
Shawn,
Thanks for these helpful suggestions. I am still trying to get my head
around the debugger in Xcode and am frequently not able to get anything
useful out of it. Whenever I get an
Program received signal EXC_BAD_ACCESS, Could not access memory.
I deduce that I try to access something that has been deallocated. Most of
the time digging down the call stack will give me some pointer as to where I
screwed up, but that's about it. I guess I'll have to read up on the
debugger documentation to uncover all of its intricacies.
Thanks again, you've been a great help.
Martijn
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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