iOS NSMutable array release behaviour - ios

I have a problem with NSMutableArray alloc and release. See below code:
NSMutableArray *enemiesToDeleteArray = [NSMutableArray arrayWithCapacity:5];
...
else if ([enemy isActive] && !CGRectIntersectsRect(fieldOfView, enemyRect))
{
[enemiesToDeleteArray addObject:enemy];
}
...
[enemiesToDeleteArray removeAllObjects];
[enemiesToDeleteArray release];
Above code crashes in a run. With a symbolic debug break error 'objc_release' or 'malloc_break_error'. Below I added backtrace from the occurence of objc_release error:
* thread #1: tid = 0x1c03, 0x01e140a5 libobjc.A.dylib`objc_release + 21, stop reason = EXC_BAD_ACCESS (code=1, address=0xa0020010)
frame #0: 0x01e140a5 libobjc.A.dylib`objc_release + 21
frame #1: 0x01e14bd9 libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + 555
frame #2: 0x023c6468 CoreFoundation`_CFAutoreleasePoolPop + 24
frame #3: 0x002effc1 QuartzCore`CA::AutoreleasePool::~AutoreleasePool() + 19
frame #4: 0x002ff35f QuartzCore`CA::Display::DisplayLink::dispatch(unsigned long long, unsigned long long) + 251
frame #5: 0x002ff75f QuartzCore`CA::Display::TimerDisplayLink::callback(__CFRunLoopTimer*, void*) + 161
frame #6: 0x023e3376 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
frame #7: 0x023e2e06 CoreFoundation`__CFRunLoopDoTimer + 534
frame #8: 0x023caa82 CoreFoundation`__CFRunLoopRun + 1810
frame #9: 0x023c9f44 CoreFoundation`CFRunLoopRunSpecific + 276
frame #10: 0x023c9e1b CoreFoundation`CFRunLoopRunInMode + 123
frame #11: 0x0312b7e3 GraphicsServices`GSEventRunModal + 88
frame #12: 0x0312b668 GraphicsServices`GSEventRun + 104
frame #13: 0x009d0ffc UIKit`UIApplicationMain + 1211
frame #14: 0x000c81f6 MyAPP`main(argc=1, argv=0xbffff36c) + 134 at main.m:14
frame #15: 0x00001fa5 MyAPP`start + 53
and a backtrace from malloc_break_error:
MyAPP(18609,0xac98ea28) malloc: *** error for object 0x112dee40: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
(lldb) bt
* thread #1: tid = 0x1c03, 0x97be7815 libsystem_c.dylib`malloc_error_break, stop reason = breakpoint 1.1
frame #0: 0x97be7815 libsystem_c.dylib`malloc_error_break
frame #1: 0x97be8d51 libsystem_c.dylib`free + 346
frame #2: 0x023c5ea4 CoreFoundation`-[__NSArrayM dealloc] + 276
frame #3: 0x01e159ff libobjc.A.dylib`-[NSObject release] + 47
frame #4: 0x01e140d5 libobjc.A.dylib`objc_release + 69
frame #5: 0x01e14bd9 libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + 555
frame #6: 0x023c6468 CoreFoundation`_CFAutoreleasePoolPop + 24
frame #7: 0x002effc1 QuartzCore`CA::AutoreleasePool::~AutoreleasePool() + 19
frame #8: 0x002ff35f QuartzCore`CA::Display::DisplayLink::dispatch(unsigned long long, unsigned long long) + 251
frame #9: 0x002ff75f QuartzCore`CA::Display::TimerDisplayLink::callback(__CFRunLoopTimer*, void*) + 161
frame #10: 0x023e3376 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
frame #11: 0x023e2e06 CoreFoundation`__CFRunLoopDoTimer + 534
frame #12: 0x023caa82 CoreFoundation`__CFRunLoopRun + 1810
frame #13: 0x023c9f44 CoreFoundation`CFRunLoopRunSpecific + 276
frame #14: 0x023c9e1b CoreFoundation`CFRunLoopRunInMode + 123
frame #15: 0x0312b7e3 GraphicsServices`GSEventRunModal + 88
frame #16: 0x0312b668 GraphicsServices`GSEventRun + 104
frame #17: 0x009d0ffc UIKit`UIApplicationMain + 1211
frame #18: 0x000c81f6 MyAPP`main(argc=1, argv=0xbffff36c) + 134 at main.m:14
frame #19: 0x00001fa5 MyAPP`start + 53
Please explain me someone, what am I doing wrong?

You should not release enemiesToDeleteArray at all. It will get autoreleased at the end of the current scope. You didn't use alloc at all, so this object is auto managed.

NSMutableArray *enemiesToDeleteArray = [NSMutableArray arrayWithCapacity:5]; returns an autoreleased instance, and that gets cleaned up some time after leaving the initializer. Now the pointer enemiesToDeleteArray points to undefined memory. You need to do:
enemiesToDeleteArray = [[NSMutableArray arrayWithCapacity:5] retain];
or
enemiesToDeleteArray = [[NSMutableArray alloc] initWithCapacity:5];

Related

How to decode a Message sent to deallocated instance error

I am running into a strange crash I'm having issues debugging. My scheme has both zombies and address sanatizer enabled.
I'm getting the error:
2015-09-05 06:56:16.240 asgaard[486:110984] *** -[CFString
boundingRectWithSize:options:attributes:context:]: message sent to
deallocated instance 0x1897b210
which is pretty unhelpful to me as its breaking on some assembly code.
I tried the memory history command which I'm not sure is what i need and got the following output:
thread #4294967295: tid = 0x0000, 0x00b39fb0 libclang_rt.asan_ios_dynamic.dylib`__asan_mz_malloc + 116, name = 'Memory allocated at'
frame #0: 0x00b39fb0 libclang_rt.asan_ios_dynamic.dylib`__asan_mz_malloc + 116
frame #1: 0x33587da6 libsystem_malloc.dylib`malloc_zone_malloc + 86
frame #2: 0x2471f982 CoreFoundation`_CFRuntimeCreateInstance + 290
frame #3: 0x247f3162 CoreFoundation`__CFStringCreateImmutableFunnel3 + 1718
frame #4: 0x2473962c CoreFoundation`CFStringCreateCopy + 396
frame #5: 0x247f33d6 CoreFoundation`_CFStringCreateWithFormatAndArgumentsAux2 + 86
frame #6: 0x25496a70 Foundation`-[NSPlaceholderString initWithFormat:locale:arguments:] + 136
frame #7: 0x25496972 Foundation`+[NSString stringWithFormat:] + 58
frame #8: 0x001ef70c asgaard`-[ActiveRecordingViewController updateSpeeds](self=<unavailable>, _cmd=<unavailable>) + 836 at ActiveRecordingViewController.m:578
frame #9: 0x001edd20 asgaard`__51-[ActiveRecordingViewController ahrswNotification:]_block_invoke(.block_descriptor=<unavailable>) + 192 at ActiveRecordingViewController.m:456
frame #10: 0x00b38ef0 libclang_rt.asan_ios_dynamic.dylib`__wrap_dispatch_async_block_invoke + 160
frame #11: 0x03273170 libdispatch.dylib`_dispatch_call_block_and_release + 8
frame #12: 0x0327315c libdispatch.dylib`_dispatch_client_callout + 20
frame #13: 0x03276e42 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 1510
frame #14: 0x247e63e6 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 6
frame #15: 0x247e4ae6 CoreFoundation`__CFRunLoopRun + 1510
frame #16: 0x24730f2e CoreFoundation`CFRunLoopRunSpecific + 474
frame #17: 0x24730d40 CoreFoundation`CFRunLoopRunInMode + 104
frame #18: 0x2c0f91fe GraphicsServices`GSEventRunModal + 134
frame #19: 0x27f02876 UIKit`UIApplicationMain + 1438
frame #20: 0x00129b0a asgaard`main(argc=<unavailable>, argv=<unavailable>) + 106 at main.m:13
frame #21: 0x33499aac libdyld.dylib`tlv_initializer + 4
I'm a little lost here exactly what this message is telling me.
frame #8: 0x001ef70c asgaard`-[ActiveRecordingViewController updateSpeeds](self=<unavailable>, _cmd=<unavailable>) + 836 at ActiveRecordingViewController.m:578
Frame 8 is a function I wrote - and it is running in an async loop on the main thread - could that somehow be connected to this error?
The actual code line is:
578: [self coreGroundSpeed].text = [NSString stringWithFormat:#"%d Kts", coreSpd];
Any suggestions where/what to look at?

iOS App crashes only when attached to the debugger

i have an issue where my app crashes when attached to the debugger in just one case. My App downloads json data and transform it into core data objects. For this purpose i start a background thread to load it and have a successHandler handling the import:
RemoteConnectionService.sharedInstance.sendRequest(UserRequest(userID: user!.webID.integerValue), successHandler: { requestHandler, result in
var userData = result["user"] as! [String: AnyObject]
self.user?.update(userData)
self.tableView.reloadData()
}, errorHandler: nil)
this works everywhere as expected. the successHandler is called on the main thread, core data gets updated and all. but when doing this special request (it happens always and only with this request) Xcode stop pointing to
class AppDelegate: UIResponder, UIApplicationDelegate
with no specific failure reason. here's the backtrace (via bt):
* thread #1: tid = 0x6ab4b, 0x00000001051b19c0 libobjc.A.dylib`objc_release + 16, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
frame #0: 0x00000001051b19c0 libobjc.A.dylib`objc_release + 16
frame #1: 0x00000001051b28cd libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + 591
frame #2: 0x00000001082348d8 CFNetwork`-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 207
frame #3: 0x0000000108234a37 CFNetwork`-[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 48
frame #4: 0x00000001081043a7 CFNetwork`___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 107
frame #5: 0x00000001081d1891 CFNetwork`___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 273
frame #6: 0x00000001080ef6e6 CFNetwork`RunloopBlockContext::_invoke_block(void const*, void*) + 72
frame #7: 0x00000001057c13d4 CoreFoundation`CFArrayApplyFunction + 68
frame #8: 0x00000001080ef5a7 CFNetwork`RunloopBlockContext::perform() + 133
frame #9: 0x00000001080ef3e6 CFNetwork`MultiplexerSource::perform() + 256
frame #10: 0x00000001080ef1fc CFNetwork`MultiplexerSource::_perform(void*) + 72
frame #11: 0x00000001057ee4b1 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
frame #12: 0x00000001057e437d CoreFoundation`__CFRunLoopDoSources0 + 269
frame #13: 0x00000001057e39b4 CoreFoundation`__CFRunLoopRun + 868
frame #14: 0x00000001057e33e6 CoreFoundation`CFRunLoopRunSpecific + 470
frame #15: 0x000000010abdba3e GraphicsServices`GSEventRunModal + 161
frame #16: 0x00000001063cab60 UIKit`UIApplicationMain + 1282
* frame #17: 0x00000001049556b7 App`main + 135 at AppDelegate.swift:13
frame #18: 0x00000001088fd145 libdyld.dylib`start + 1
What i don't get here is that when trying to profile it in instruments or just running it in the simulator without Xcode it works just fine. On the device it crashes on that particular request no matter what.
device backtrace looks a bit different:
* thread #1: tid = 0x19e6ab, 0x0000000192490174 libobjc.A.dylib`objc_release + 20, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x13723bec8)
frame #0: 0x0000000192490174 libobjc.A.dylib`objc_release + 20
frame #1: 0x0000000192491724 libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + 564
frame #2: 0x00000001817d2e08 CFNetwork`-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 216
frame #3: 0x00000001817d2f7c CFNetwork`-[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 60
frame #4: 0x00000001816a78e4 CFNetwork`___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 104
frame #5: 0x0000000181770540 CFNetwork`___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 104
frame #6: 0x0000000181693b54 CFNetwork`RunloopBlockContext::_invoke_block(void const*, void*) + 76
frame #7: 0x0000000181c10aac CoreFoundation`CFArrayApplyFunction + 68
frame #8: 0x0000000181693a00 CFNetwork`RunloopBlockContext::perform() + 136
frame #9: 0x00000001816938b4 CFNetwork`MultiplexerSource::perform() + 312
frame #10: 0x00000001816936e0 CFNetwork`MultiplexerSource::_perform(void*) + 68
frame #11: 0x0000000181ce69ec CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
frame #12: 0x0000000181ce5c90 CoreFoundation`__CFRunLoopDoSources0 + 264
frame #13: 0x0000000181ce3d40 CoreFoundation`__CFRunLoopRun + 712
frame #14: 0x0000000181c110a4 CoreFoundation`CFRunLoopRunSpecific + 396
frame #15: 0x000000018adab5a4 GraphicsServices`GSEventRunModal + 168
frame #16: 0x0000000186542aa4 UIKit`UIApplicationMain + 1488
* frame #17: 0x0000000100069c8c App`main + 164 at AppDelegate.swift:13
frame #18: 0x0000000192ae6a08 libdyld.dylib`start + 4
Any suggestions on how to debug this? Very much appreciated :)

[UIView _forgetDependentConstraint:]: message sent to deallocated instance

I tried using NSZobie and all others. Still i face issues. can't able to find where app crashed. Please Help. thanks in advance.
*** -[UIView _forgetDependentConstraint:]: message sent to deallocated instance 0x208e0010
(lldb) bt
* thread #1: tid = 0x2503, 0x342b3468 CoreFoundation`___forwarding___ + 192, stop reason = EXC_BREAKPOINT (code=EXC_ARM_B`enter code here`REAKPOINT, subcode=0xdefe)
frame #0: 0x342b3468 CoreFoundation`___forwarding___ + 192
frame #1: 0x3420af68 CoreFoundation`__forwarding_prep_0___ + 24
frame #2: 0x364f24ba UIKit`_updateViewDependenciesForConstraint + 202
frame #3: 0x364f9a2c UIKit`__72-[UIView(AdditionalLayoutSupport) _removeRelevantConstraintsFromEngine:]_block_invoke_0 + 264
frame #4: 0x34c65882 Foundation`-[NSISEngine withAutomaticOptimizationDisabled:] + 166
frame #5: 0x364f98ee UIKit`-[UIView(AdditionalLayoutSupport) _removeRelevantConstraintsFromEngine:] + 94
frame #6: 0x3629f4a0 UIKit`__UIViewWillBeRemovedFromSuperview + 588
frame #7: 0x360e7848 UIKit`-[UIView(Hierarchy) removeFromSuperview] + 56
frame #8: 0x36137f18 UIKit`-[UINavigationTransitionView _cleanupTransition] + 92
frame #9: 0x360ceab2 UIKit`-[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 158
frame #10: 0x361438ee UIKit`-[UIViewAnimationState animationDidStop:finished:] + 50
frame #11: 0x35e78c00 QuartzCore`CA::Layer::run_animation_callbacks(void*) + 208
frame #12: 0x3c3f04b6 libdispatch.dylib`_dispatch_client_callout + 22
frame #13: 0x3c3f51bc libdispatch.dylib`_dispatch_main_queue_callback_4CF$VARIANT$mp + 224
frame #14: 0x34284f3a CoreFoundation`__CFRunLoopRun + 1290
frame #15: 0x341f7ebc CoreFoundation`CFRunLoopRunSpecific + 356
frame #16: 0x341f7d48 CoreFoundation`CFRunLoopRunInMode + 104
frame #17: 0x37dd02ea GraphicsServices`GSEventRunModal + 74
frame #18: 0x3610d300 UIKit`UIApplicationMain + 1120
frame #19: 0x000521de MyApp®`main(argc=1, argv=0x2fdb3cf8) + 162 at main.m:6
frame #20: 0x3c410b20 libdyld.dylib`start + 4
Check if you have UIAlertView or animations in view before came back to your view. It seems you are initalize a view with it's local variable, wihout having express use self delegate, or you use removeFromSuperview for a view while actions still call it after remove.

weird EXC_BAD_ACCESS in [UICollectionViewLayout dealloc]

I push a view controller that contains a UICollectionView onto a navigation controller. When I pop it to return to the previous VC, I get an EXC_BAD_ACCESS code=2. I have NSZombies enabled and it stops at the end (the line with the "}") of the dealloc method of my UICollectionViewLayout subclass. This is the stack trace:
* thread #1: tid = 0x70505, 0x030620b0 libobjc.A.dylib`objc_msgSend + 12, queue = 'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=2, address=0x2)
frame #0: 0x030620b0 libobjc.A.dylib`objc_msgSend + 12
frame #1: 0x00f6812e UIKit`-[UICollectionViewLayout dealloc] + 226
frame #2: 0x000526ce MyDog`-[UICollectionViewWaterfallLayout dealloc](self=0x1da8e010, _cmd=0x03068678) + 206 at UICollectionViewWaterfallLayout.m:69
frame #3: 0x03063692 libobjc.A.dylib`objc_object::sidetable_release(bool) + 268
frame #4: 0x03064adf libobjc.A.dylib`-[NSObject release] + 25
frame #5: 0x00f87f50 UIKit`-[UICollectionViewData dealloc] + 45
frame #6: 0x03063692 libobjc.A.dylib`objc_object::sidetable_release(bool) + 268
frame #7: 0x03064adf libobjc.A.dylib`-[NSObject release] + 25
frame #8: 0x00f4a773 UIKit`-[UICollectionView dealloc] + 260
frame #9: 0x0098dd34 UIKit`-[UIView release] + 89
frame #10: 0x03062e97 libobjc.A.dylib`objc_release + 71
frame #11: 0x03062e3e libobjc.A.dylib`objc_storeStrong + 39
frame #12: 0x00040160 MyDog`-[MDProfileViewController dealloc](self=0x0dd1dd00, _cmd=0x03068678) + 96 at MDProfileViewController.m:83
frame #13: 0x00a4d275 UIKit`-[UIViewController release] + 89
frame #14: 0x03062e97 libobjc.A.dylib`objc_release + 71
frame #15: 0x009347bc UIKit`__destroy_helper_block_121 + 124
frame #16: 0x06d5e7a5 libsystem_sim_blocks.dylib`_Block_release + 207
frame #17: 0x009a1a4f UIKit`-[UIViewAnimationBlockDelegate dealloc] + 66
frame #18: 0x03063692 libobjc.A.dylib`objc_object::sidetable_release(bool) + 268
frame #19: 0x03064adf libobjc.A.dylib`-[NSObject release] + 25
frame #20: 0x039aede0 CoreFoundation`CFRelease + 272
frame #21: 0x03ab67ce CoreFoundation`-[__NSDictionaryI dealloc] + 126
frame #22: 0x03063692 libobjc.A.dylib`objc_object::sidetable_release(bool) + 268
frame #23: 0x03062e81 libobjc.A.dylib`objc_release + 49
frame #24: 0x03063ce7 libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::pop(void*) + 537
frame #25: 0x039cea98 CoreFoundation`_CFAutoreleasePoolPop + 24
frame #26: 0x039d37f3 CoreFoundation`__CFRunLoopRun + 1971
frame #27: 0x039d2bf3 CoreFoundation`CFRunLoopRunSpecific + 467
frame #28: 0x039d2a0b CoreFoundation`CFRunLoopRunInMode + 123
frame #29: 0x03c87a27 GraphicsServices`GSEventRunModal + 192
frame #30: 0x03c8784e GraphicsServices`GSEventRun + 104
frame #31: 0x0093ff0b UIKit`UIApplicationMain + 1225
frame #32: 0x0001eecd MyDog`main(argc=1, argv=0xbfffeeb0) + 141 at main.m:11
I don't know how to debug this when the EXC_BAD_ACCESS is not directly caused by my code. Has anyone had such a problem? Thanks
UPDATE:
I also tried the "Zombies" Instruments preset but it just stopped without giving me any information.
Just ran into same problem. Your UICollectionView is still querying after you popped out the navigation controller. Add the following to the controller class which contains your UICollectionView
- (void)dealloc
{
_collectionView.dataSource = nil;
_collectionView.delegate = nil;
_collectionView = nil;
}
Try setting the .collectionViewLayout=nil in your dealloc method

How to fix MP3AudioStream error?

I'm getting the following error randomly (and sometimes consistently on launch). It can happen when there are background threads and when there aren't and it seems to be a problem with the library so I'm having trouble tracking down the problem in my code. The breakpoint triggers on:
#0 0x07bb489b in MP3AudioStream::GeneratePackets(AudioFileStreamContinuation&) ()
and the backtrace is as follows:
* thread #1: tid = 0x1c03, 0x07bb489b AudioToolbox`MP3AudioStream::GeneratePackets(AudioFileStreamContinuation&) + 2843, stop reason = EXC_BAD_ACCESS (code=2, address=0x4)
frame #0: 0x07bb489b AudioToolbox`MP3AudioStream::GeneratePackets(AudioFileStreamContinuation&) + 2843
frame #1: 0x07b92535 AudioToolbox`AudioFileStreamWrapper::ParseBytes(unsigned long, void const*, unsigned long) + 181
frame #2: 0x07b8f41d AudioToolbox`AudioFileStreamParseBytes + 93
frame #3: 0x07f7a1be MediaToolbox`PushBytesThroughParser + 484
frame #4: 0x07f7a69a MediaToolbox`GetAudioFileStreamPacketAndFrameCount + 221
frame #5: 0x07f7c57e MediaToolbox`FigAudioFileStreamFormatReaderCopyProperty + 225
frame #6: 0x07f9bd1d MediaToolbox`FigPlaybackBossGetDuration + 165
frame #7: 0x07f9f75a MediaToolbox`FigPlaybackBossSetTimeWithRange + 192
frame #8: 0x07f66bef MediaToolbox`itemfig_rebuildRenderPipelinesAndBoss + 10196
frame #9: 0x07f63f01 MediaToolbox`playerfig_prepareWorkingItem2 + 117
frame #10: 0x07f5bdb9 MediaToolbox`playerfig_prepareWorkingItem + 88
frame #11: 0x07f6c536 MediaToolbox`itemfig_assetPropertyBatchLoaded_prepareWorkingItem + 125
frame #12: 0x01bc8758 CoreMedia`figDeferredNotificationRun + 69
frame #13: 0x01de4376 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
frame #14: 0x01de3e06 CoreFoundation`__CFRunLoopDoTimer + 534
frame #15: 0x01dcba82 CoreFoundation`__CFRunLoopRun + 1810
frame #16: 0x01dcaf44 CoreFoundation`CFRunLoopRunSpecific + 276
frame #17: 0x01dcae1b CoreFoundation`CFRunLoopRunInMode + 123
frame #18: 0x02afb7e3 GraphicsServices`GSEventRunModal + 88
frame #19: 0x02afb668 GraphicsServices`GSEventRun + 104
frame #20: 0x00330ffc UIKit`UIApplicationMain + 1211
frame #21: 0x00002a7d FMA`main(argc=1, argv=0xbffff3f0) + 141 at main.m:16
Has anyone had this error and does anyone know how I might go about fixing it?

Resources