Re: breaking on fast enumeration mutation error?
Re: breaking on fast enumeration mutation error?
- Subject: Re: breaking on fast enumeration mutation error?
- From: "Hank Heijink (Mailinglists)" <email@hidden>
- Date: Thu, 3 Dec 2009 11:16:06 -0500
On Dec 3, 2009, at 10:42 AM, Oftenwrong Soong wrote:
> Hi all,
>
> I have observed that many threads speak of things that happen differently on the iPhone than they do on the simulator. In general, what is the difference between the two that causes things to behave differently? By defining this, it should be possible to track down the causes of crashes much more easily.
The simulator and the iPhone run on different processors with vastly different amounts of memory. Crashes like the one below are more likely to happen on the iPhone because of several reasons:
- the simulator rarely, if ever, runs out of memory (hence the simulate low memory warning in the menus). The iPhone can and does.
- the processors are different, so things can and do happen in a different order when multithreading.
In general, you shouldn't have to know the difference between the two platforms, though. The bugs that show up on the iPhone are there in the simulator, they're just harder to reproduce sometimes. In rare cases, there is an actual difference in behavior that's not related to the differences in platform, in which case you should file a bug.
> From: Kathy Tafel <email@hidden>
> To: email@hidden
> Sent: Wed, December 2, 2009 5:00:38 PM
> Subject: breaking on fast enumeration mutation error?
>
> I am catching an exception, a fast enumeration mutation error, but don't really see where I'm making the error. Could someone walk me through setting an appropriate breakpoint, as I am only working on my first project, or point to a how to? My KVO exceptions were helpful in telling me to set NSKVODeallocateBreak.... This says
>
> main: Caught NSGenericException: *** Collection <NSCFArray: 0x13aeb0> was mutated while being enumerated.
>
> It only ever happens on the iPhone, never in the simulator, when I am not debugging, when the rest of the system is wigging out on low memory, and when I've recovered from low memory several times. Think I'll go try to be more efficient about memory, but should probably find this. :/
If you can reproduce it in debug mode, set a breakpoint in obj_exception_throw() and see what happens. If you can't, post the crash log that you can see in the Organizer window in Xcode.
Hank
_______________________________________________
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