I’ve been experiencing a weird error in my Objective-C program for iPhone. Here’s what happens:
- I get a EXC_BAD_ACCESS crash.
- Fine, the zombies kick in and the log tells me it’s about a CFNumber that gets a release, but is already deallocated. Still no tough cookie.
- I keep debugging until I hit a block with two NSNumbers. There are no CFNumbers in my code, so I reckon it’s these lines.
- I try retaining them, with no success, even filling them with nil, overwriting them with new values, etc. Still nothing.
- I comment the lines out. Now the log keeps bugging about the same CFNumber, but now is being sent a “doubleValue” (instead of “release”) while it’s already deallocated. There is no “doubleValue” in my code.
What’s going on here? Are the zombies messing with my code? I’m on a dead end here. Any help is greatly appreciated.
Kind regards,
Reinder
Sadly, not much we can do without code.
Here are some general principles to keep note of, and will make your life easier.
You refers to the current class.
Hope this helps you pinpoint the problem.