Please help debug a crash on UILabel (evict_glyph_entry_from_cache) - iphone

I am facing a weird crash in "UILabel".The crash is initiated from drawRect of UILabel or CCLabelTTF). (I've already spent much time Googling this problem.) What could be causing th following code to crash?
I am using XCode SDK 4.0 and/or 4.1, cocos2d version 0.99.4, 0.99.5
CODE:
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(200,100,185,110)];
[label setTextAlignment:UITextAlignmentLeft];
[label setFont:[UIFont fontWithName:#"Marker Felt" size:14]];
[label setLineBreakMode:UILineBreakModeWordWrap];
[label setAdjustsFontSizeToFitWidth:YES];
[label setNumberOfLines:50];
label.text = message;
[label setBackgroundColor:[UIColor clearColor]];
[label setTextColor:[UIColor colorWithRed:0 green:81.0/255 blue:100.0/255 alpha:1]];
[self addSubview:label];
[label release]; label = nil;
CRASH:
Assertion failed: (cache->size >= g->size), function evict_glyph_entry_from_cache, file Fonts/CGFontCache.c, line 836.
Program received signal: “SIGABRT”.
#0 0x316b698c in __kill ()
#1 0x316b6982 in kill ()
#2 0x316b6974 in raise ()
#3 0x316cb620 in abort ()
#4 0x316b8f16 in __assert_rtn ()
#5 0x30f10d9e in evict_glyph_entry_from_cache ()
#6 0x30ed54e8 in expire_glyphs_nl ()
#7 0x30ed5494 in CGFontCacheUnlock ()
#8 0x30ed5008 in CGGlyphLockUnlock ()
#9 0x31e3a5e4 in ripc_RenderGlyphs ()
#10 0x31e42a66 in ripc_DrawGlyphs ()
#11 0x30ed0714 in CGContextDelegateDrawGlyphs ()
#12 0x30ed06c8 in draw_glyphs ()
#13 0x30ed025a in CGContextShowGlyphsWithAdvances ()
#14 0x311381f0 in WebCore::Font::drawGlyphs ()
#15 0x31137e42 in WebCore::Font::drawGlyphBuffer ()
#16 0x31137c76 in WebCore::Font::drawSimpleText ()
#17 0x31137ad2 in WebCore::Font::drawText ()
#18 0x31137a5e in drawAtPoint ()
#19 0x3117fdd4 in -[NSString(WebStringDrawing) _web_drawInRect:withFont:ellipsis:alignment:lineSpacing:includeEmoji:measureOnly:] ()
#20 0x31180c50 in -[NSString(WebStringDrawing) _web_drawInRect:withFont:ellipsis:alignment:lineSpacing:includeEmoji:] ()
#21 0x325ca46c in -[NSString(UIStringDrawing) drawInRect:withFont:lineBreakMode:alignment:lineSpacing:includeEmoji:] ()
#22 0x325ca40a in -[NSString(UIStringDrawing) drawInRect:withFont:lineBreakMode:alignment:lineSpacing:] ()
#23 0x325cb414 in -[UILabel _drawTextInRect:baselineCalculationOnly:] ()
#24 0x325cadf2 in -[UILabel drawTextInRect:] ()
#25 0x325cadaa in -[UILabel drawRect:] ()
#26 0x325c98e8 in -[UIView(CALayerDelegate) drawLayer:inContext:] ()
#27 0x30c6b308 in -[CALayer drawInContext:] ()
#28 0x30c6b190 in backing_callback ()
#29 0x30c6acb6 in CABackingStoreUpdate ()
#30 0x30c6a47e in -[CALayer _display] ()
#31 0x30c6a1ce in -[CALayer display] ()
#32 0x30c6a14a in CALayerDisplayIfNeeded ()
#33 0x30c6994a in CA::Context::commit_transaction ()
#34 0x30c696a8 in CA::Transaction::commit ()
#35 0x30c6f030 in CA::Transaction::observer_callback ()
#36 0x33519b56 in __CFRunLoopDoObservers ()
#37 0x33560a38 in CFRunLoopRunSpecific ()
#38 0x3356035c in CFRunLoopRunInMode ()
#39 0x30248b32 in GSEventRunModal ()
#40 0x30248bde in GSEventRun ()
#41 0x3259776e in -[UIApplication _run] ()
#42 0x32596472 in UIApplicationMain ()
#43 0x0000288e in main (argc=1, argv=0x2ffff618) at /Users/ahsan/Public/Drop Box/today1/main.m:13

I believe the font name is #"MarkerFelt-Thin". Try that.
Edit: There is also a #"MarkerFelt-Wide".

It is crashing because you need to enter the correct font name, or else UIKit will try to load non-existent fonts. So, you should check your font name. Try using #"MarkerFelt" (no space instead of #"Marker Felt", with the space).
If you are not sure of what the value should be, there are several apps on the app store that can get the list of currently available fonts for you. You can also use this code snippet to log the font names to the console:
// Get all the fonts on the system
NSArray *familyNames = [UIFont familyNames];
for( NSString *familyName in familyNames ){
printf( "Family: %s \n", [familyName UTF8String] );
NSArray *fontNames = [UIFont fontNamesForFamilyName:familyName];
for( NSString *fontName in fontNames ){
printf( "\tFont: %s \n", [fontName UTF8String] );
}
}
EDIT:
You can also have a look at this post and see if it helps you.

One thing worth mentioning is that the application does heavy processing
This is also my observation! Heavy load crashes my app. At this moment I believe that this problem is the framework bug and should be reported. https://bugreport.apple.com
My crash comes when updating CCLabelTTF (Cocos2D 0.99.5)
Assertion failed: (cache->size >= g->size), function evict_glyph_entry_from_cache, file Fonts/CGFontCache.c, line 836.
Program received signal: “SIGABRT”.
This is the trace:
#0 0x304a0b2c in __kill ()
#1 0x304a0b20 in kill ()
#2 0x304a0b14 in raise ()
#3 0x304b7e3a in abort ()
#4 0x304a42f2 in __assert_rtn ()
#5 0x30f33648 in evict_glyph_entry_from_cache ()
#6 0x30ee5fc0 in expire_glyphs_nl ()
#7 0x30ee5f50 in CGFontCacheUnlock ()
#8 0x30ee5868 in CGGlyphLockUnlock ()
#9 0x33191ce0 in ripc_RenderGlyphs ()
#10 0x3319c9e0 in ripc_DrawGlyphs ()
#11 0x30edf7b0 in draw_glyphs ()
#12 0x30edf25c in CGContextShowGlyphsWithAdvances ()
#13 0x3109e010 in WebCore::Font::drawGlyphs ()
#14 0x3109dabc in WebCore::Font::drawGlyphBuffer ()
#15 0x3109d76c in WebCore::Font::drawSimpleText ()
#16 0x3109d5c8 in WebCore::Font::drawText ()
#17 0x3109d504 in drawAtPoint ()
#18 0x31101bd4 in -[NSString(WebStringDrawing) _web_drawInRect:withFont:ellipsis:alignment:lineSpacing:includeEmoji:measureOnly:] ()
#19 0x31103a78 in -[NSString(WebStringDrawing) _web_drawInRect:withFont:ellipsis:alignment:lineSpacing:includeEmoji:] ()
#20 0x331fcb60 in -[NSString(UIStringDrawing) drawInRect:withFont:lineBreakMode:alignment:lineSpacing:includeEmoji:] ()
#21 0x332f5184 in -[NSString(UIStringDrawing) drawInRect:withFont:lineBreakMode:alignment:] ()
#22 0x002f04a4 in -[CCTexture2D(Text) initWithString:dimensions:alignment:font:] (self=0x64e240, _cmd=0x455973, string=0x677040, dimensions={width = 28, height = 24}, alignment=UITextAlignmentCenter, uifont=0x649690) at /Users/SG/Documents/code/AlgWin/libs/cocos2d/CCTexture2D.m:405
#23 0x002f07a4 in -[CCTexture2D(Text) initWithString:fontName:fontSize:] (self=0x64e240, _cmd=0x44d3f4, string=0x677040, name=0x668990, size=20) at /Users/SG/Documents/code/AlgWin/libs/cocos2d/CCTexture2D.m:505
#24 0x002a8988 in -[CCLabelTTF setString:] (self=0x649490, _cmd=0x33f490cc, str=0x677040) at /Users/SG/Documents/code/AlgWin/libs/cocos2d/CCLabelTTF.m:91
Observe that 22 lines are identical to yours.
I will try to come with the code to reproduce the crash. Maybe just an infinite loop will be enough.

Related

NSSharingService creates "frozen" modal window for CKShare

I'm trying to present info about a CKShare to a user. You can do this as follows:
let container: CKContainer = /* existing CKContainer */
let share: CKShare = /* existing CKShare */
let item = NSItemProvider()
item.registerCloudKitShare(share, container: container)
let sharingService = NSSharingService(named: .cloudSharing)
sharingService.perform(withItems: [item])
This correctly opens the window:
However, I cannot click anything in the window, and after closing the window I cannot click anything in my app.
EDIT: after further investigation, I realized I can navigate the UI using the keyboard. However, it is still quite buggy (triggering Done or pressing esc dismisses the view controller but doesn't close the window, and throws an NSInternalInconsistencyException)
The stack trace (below) shows that the main thread is waiting for events in the modal event loop:
#0 0x00007fff7de8b20a in mach_msg_trap ()
#1 0x00007fff7de8a724 in mach_msg ()
#2 0x00007fff55ef9785 in __CFRunLoopServiceMachPort ()
#3 0x00007fff55ef8ad7 in __CFRunLoopRun ()
#4 0x00007fff55ef8153 in CFRunLoopRunSpecific ()
#5 0x00007fff551e2d96 in RunCurrentEventLoopInMode ()
#6 0x00007fff551e2b06 in ReceiveNextEventCommon ()
#7 0x00007fff551e2884 in _BlockUntilNextEventMatchingListInModeWithFilter ()
#8 0x00007fff53493a73 in _DPSNextEvent ()
#9 0x00007fff53c29e34 in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] ()
#10 0x00007fff536c5e7b in -[NSApplication _doModalLoop:peek:] ()
#11 0x00007fff538aac9f in __35-[NSApplication runModalForWindow:]_block_invoke_2 ()
#12 0x00007fff538aac4c in __35-[NSApplication runModalForWindow:]_block_invoke ()
#13 0x00007fff53d59219 in _NSTryRunModal ()
#14 0x00007fff536c3911 in -[NSApplication runModalForWindow:] ()
#15 0x00007fff53fc4289 in __87-[_NSCloudSharingService _showParticipantListServiceInSheetAttachedToWindow:withItems:]_block_invoke ()
#16 0x00007fff7a9ef0f4 in -[NSRemoteView _completeAdvanceToRunPhase:withError:] ()
#17 0x00007fff7a9d3c69 in __35-[NSRemoteView _advanceToRunPhase:]_block_invoke.1071 ()
#18 0x00007fff55ef5bec in __invoking___ ()
#19 0x00007fff55ef5ac0 in -[NSInvocation invoke] ()
#20 0x00007fff7aa172d2 in withHintInProgress ()
#21 0x00007fff7a98e792 in __deferNSXPCInvocationOntoMainThread_block_invoke ()
#22 0x00007fff7aa1cb9d in __wrapBlockWithVoucher_block_invoke ()
#23 0x00007fff7a98e36f in __deferBlockOntoMainThread_block_invoke_2 ()
#24 0x00007fff55f1687c in __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ ()
#25 0x00007fff55ef9253 in __CFRunLoopDoBlocks ()
#26 0x00007fff55ef9018 in __CFRunLoopRun ()
#27 0x00007fff55ef8153 in CFRunLoopRunSpecific ()
#28 0x00007fff7aa1690e in __invokeRunLoopInModeForDuration_block_invoke_2 ()
#29 0x00007fff7aa16862 in invokeRunLoopInModeForDuration ()
#30 0x00007fff7a9f371b in __29-[NSCFRunLoopSemaphore wait:]_block_invoke_2 ()
#31 0x00007fff7a9f3641 in __29-[NSCFRunLoopSemaphore wait:]_block_invoke ()
#32 0x00007fff7a9f2aac in +[NSCFRunLoopSemaphore _observe:whilePerforming:] ()
#33 0x00007fff7a9f332e in -[NSCFRunLoopSemaphore wait:] ()
#34 0x00007fff7a9cb9ed in -[NSRemoteViewSemaphore wait:] ()
#35 0x00007fff7a9d43db in -[NSRemoteView _waitOnSemaphore:] ()
#36 0x00007fff7a9e95a6 in -[NSRemoteView _didSetOriginOrSize:] ()
#37 0x00007fff7a9e9a7f in -[NSRemoteView setFrameSize:] ()
#38 0x00007fff7aa146e9 in withImplicitAnimation ()
#39 0x00007fff7a9e0184 in -[NSRemoteView _serviceRequestsResize:completion:] ()
#40 0x00007fff7a9e093e in -[NSRemoteView _serviceRequestsResize:animate:transaction:completion:] ()
#41 0x00007fff7a993ec4 in -[NSRemoteViewMarshal serviceRequestsResize:animate:transaction:completion:] ()
#42 0x00007fff55ef5bec in __invoking___ ()
#43 0x00007fff55ef5ac0 in -[NSInvocation invoke] ()
#44 0x00007fff7aa172d2 in withHintInProgress ()
#45 0x00007fff7a98e83e in __deferNSXPCInvocationOntoMainThread_block_invoke ()
#46 0x00007fff7aa1cb9d in __wrapBlockWithVoucher_block_invoke ()
#47 0x00007fff7a98e36f in __deferBlockOntoMainThread_block_invoke_2 ()
#48 0x00007fff55f1687c in __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ ()
#49 0x00007fff55ef9253 in __CFRunLoopDoBlocks ()
#50 0x00007fff55ef9018 in __CFRunLoopRun ()
#51 0x00007fff55ef8153 in CFRunLoopRunSpecific ()
#52 0x00007fff551e2d96 in RunCurrentEventLoopInMode ()
#53 0x00007fff551e2b06 in ReceiveNextEventCommon ()
#54 0x00007fff551e2884 in _BlockUntilNextEventMatchingListInModeWithFilter ()
#55 0x00007fff53493a73 in _DPSNextEvent ()
#56 0x00007fff53c29e34 in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] ()
#57 0x00007fff53488885 in -[NSApplication run] ()
#58 0x00007fff53457a72 in NSApplicationMain ()
#59 0x000000010000d831 in main() at main.swift:25
#60 0x000000010000d324 in main at main.swift:28
#61 0x00007fff7dd44015 in start ()
#62 0x00007fff7dd44015 in start ()
Does anyone know how to fix this issue?
Had the same problem in an Objective-C project and found I needed to use the NSSharingServiceDelegate method to return the source Window.
- (NSWindow *)sharingService:(NSSharingService *)sharingService sourceWindowForShareItems:(NSArray *)items sharingContentScope:(NSSharingContentScope *)sharingContentScope{
return self.view.window;
}
https://developer.apple.com/documentation/appkit/nssharingservicedelegate/1402679-sharingservice
[NSSharingService performWithItems:NSArrayOfItems]; on the main thread would then present a sheet that functions correctly.
If from the owners privateCloudDatabase you would be presented all participants with sharing options, and like your screenshot, reduced participant options including ‘Remove Me’ if the shared record resides in the sharedCloudDatabase.

CAKeyframeAnimation doesNotRecognizeSelector

I'm getting a strange error with CAKeyframeAnimation, the strange part is the "SwiftDeferredNSArray doubleValue" why would I get that when dealing with an Key frame animation?
I get the following trace, with these errors:
-[_TtCs21_SwiftDeferredNSArray doubleValue]: unrecognized selector sent to instance 0x12b55e060
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_TtCs21_SwiftDeferredNSArray doubleValue]: unrecognized selector sent to instance 0x12b55e060'
#0 0x0000000182ec0d58 in -[NSObject(NSObject) doesNotRecognizeSelector:] ()
#1 0x0000000182ebddcc in ___forwarding___ ()
#2 0x0000000182dbcc6c in _CF_forwarding_prep_0 ()
#3 0x0000000185b86b24 in CAObject_setValueForKeyPath_ ()
#4 0x0000000185b5b9e0 in -[CALayer setValue:forKeyPath:] ()
#5 0x0000000185c6ebd8 in -[CAKeyframeAnimation applyForTime:presentationObject:modelObject:] ()
#6 0x0000000185b5aabc in CA::Layer::presentation_layer(CA::Transaction*) ()
#7 0x0000000187f68b6c in _UIViewEatsTouches ()
#8 0x0000000187f68830 in -[UIView(Geometry) hitTest:withEvent:] ()
#9 0x000000018823f300 in -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] ()
#10 0x0000000187f68e2c in __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke ()
#11 0x0000000182dab954 in __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke ()
#12 0x0000000182dab84c in -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] ()
#13 0x0000000187f68950 in -[UIView(Geometry) hitTest:withEvent:] ()
#14 0x000000018823f300 in -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] ()
#15 0x0000000187f68e2c in __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke ()
#16 0x0000000182dab954 in __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke ()
#17 0x0000000182dab84c in -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] ()
#18 0x0000000187f68950 in -[UIView(Geometry) hitTest:withEvent:] ()
#19 0x00000001881f4cc8 in _UIApplicationHandleDigitizerEvent ()
#20 0x0000000187f2aab8 in _UIApplicationHandleEventQueue ()
#21 0x0000000182e703a4 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#22 0x0000000182e6fe38 in __CFRunLoopDoSources0 ()
#23 0x0000000182e6db38 in __CFRunLoopRun ()
#24 0x0000000182d98c60 in CFRunLoopRunSpecific ()
#25 0x000000018466c088 in GSEventRunModal ()
#26 0x0000000187f95fe4 in UIApplicationMain ()
#27 0x00000001001dd614 in main at /Users/MyApp/AppDelegate.swift:20
Additional code as requested:
override func didUpdateFocusInContext(context: UIFocusUpdateContext, withAnimationCoordinator coordinator: UIFocusAnimationCoordinator) {
self.opacityView.layer.removeAnimationForKey("a")
if (self.focused)
{
self.opacityView.layer.addAnimation(a1, forKey: "a")
}
}
// Animation a1
let ani = CAKeyframeAnimation(keyPath: "transform.scale")
ani.timingFunctions = [CAMediaTimingFunction(controlPoints: 0.06,0.756,0.223,1.0)]
ani.values = [[1.0,1.0,1.0],[1.0*scaleFactor,1.0*scaleFactor,1.0*scaleFactor]]
ani.duration = 0.267
ani.fillMode = kCAFillModeForwards
ani.removedOnCompletion = false
I know this is a bit late, but figured I'd give an answer anyways for other folks running into this error. As far as I can see, I'd guess that you're seeing this because ani.values should be an array of individual keyframe values, not an array of arrays. E.g.,
ani.values = [1.0, 1.0*scaleFactor]

Iphone 5s iOS 8.1.2 View Controller Loading Map from XIB, crashes

We are seeing this on ONLY iPhone 5s with iOS 8.1.2. Other devices with 8.1.2 seem to be working fine.
The view controller that has a Map loading from an XIB is init fine, but when tries to load we get... Will be trying some things to try and get around this, but any help would be appreciated.
2014-12-16 16:03:24.333 App[6140:995503] Stylesheet does not include style matching tree, or includes an old version. Perhaps it was compiled by an old version of the style compiler.
2014-12-16 16:03:24.333 App[6140:995503] Please create a radar about this! (Check it's not a dup of rdar://16346611 first though)
2014-12-16 16:03:24.334 App[6140:995503] Active tile set: GEOActiveTileSet
App(6140,0x196aa8310) malloc: *** error for object 0x174206030: Invalid pointer dequeued from free list
*** set a breakpoint in malloc_error_break to debug
With a large stack
#0 0x0000000191fa13f0 in __cxa_throw ()
#1 0x00000001927a0204 in objc_exception_throw ()
#2 0x0000000181f7b62c in -[__NSArrayM objectAtIndex:] ()
#3 0x000000018f1e4318 in md::StyleMatchingTree::buildSubTrees(std::__1::set<int, std::__1::less<int>, std::__1::allocator<int> >&, std::__1::function<md::StyleMatchingTree* ()>&, NSArray*) ()
#4 0x000000018f28076c in __91-[VKStylesheet initWithData:miniData:forName:scale:ppi:vendor:targetDisplay:isDevResource:]_block_invoke ()
#5 0x0000000100a1ce30 in _dispatch_call_block_and_release ()
#6 0x0000000100a1cdf0 in _dispatch_client_callout ()
#7 0x0000000100a27854 in _dispatch_queue_drain ()
#8 0x0000000100a20120 in _dispatch_queue_invoke ()
#9 0x0000000100a2975c in _dispatch_root_queue_drain ()
#10 0x0000000100a2af18 in _dispatch_worker_thread3 ()
#11 0x0000000192fc12e4 in _pthread_wqthread ()
Enqueued from Stylesheet Map Editing Queue (Thread 1)Queue : Stylesheet Map Editing Queue (serial)
#0 0x0000000100a2adac in _dispatch_barrier_async_f_slow ()
#1 0x000000018f27f458 in -[VKStylesheet initWithData:miniData:forName:scale:ppi:vendor:targetDisplay:isDevResource:] ()
#2 0x000000018f27ef20 in -[VKStylesheet initWithName:scale:ppi:targetDisplay:vendor:resourceManager:] ()
#3 0x000000018f2cd56c in __65-[VKStylesheetVendor stylesheetWithName:scale:ppi:targetDisplay:]_block_invoke ()
#4 0x0000000100a1cdf0 in _dispatch_client_callout ()
#5 0x0000000100a268c8 in _dispatch_barrier_sync_f_invoke ()
#6 0x000000018f2cd43c in -[VKStylesheetVendor stylesheetWithName:scale:ppi:targetDisplay:] ()
#7 0x000000018f25b5d4 in -[VKStyleManager initWithName:scale:ppi:targetDisplay:sharedResources:] ()
#8 0x000000018f207984 in -[VKMapModel _setStyleManagerFromMapType:] ()
#9 0x000000018f1581d4 in -[VKMapModel forceMapType:] ()
#10 0x000000018f209188 in -[VKMapModel initShouldRasterize:mapPurpose:tileGroupIdentifier:locale:contentScale:] ()
#11 0x000000018f1fb4dc in -[VKMapCanvas initShouldRasterize:contentScale:target:device:inBackground:locale:] ()
#12 0x000000018f14ba6c in -[VKMapView initWithGlobe:shouldRasterize:inBackground:] ()
#13 0x00000001840e9f74 in -[MKBasicMapView initWithFrame:andGlobe:shouldRasterize:] ()
#14 0x000000018411dfcc in -[MKMapView _commonInitFromIB:gestureRecognizerHostView:showsAttribution:] ()
#15 0x000000018411ec3c in -[MKMapView initWithCoder:] ()
#16 0x0000000186d2cd98 in UINibDecoderDecodeObjectForValue ()
#17 0x0000000186d2ca54 in -[UINibDecoder decodeObjectForKey:] ()
#18 0x0000000186c541bc in -[UIRuntimeConnection initWithCoder:] ()
#19 0x0000000186d2cd98 in UINibDecoderDecodeObjectForValue ()
#20 0x0000000186d2cd38 in UINibDecoderDecodeObjectForValue ()
#21 0x0000000186d2ca54 in -[UINibDecoder decodeObjectForKey:] ()
#22 0x0000000186c53644 in -[UINib instantiateWithOwner:options:] ()
#23 0x0000000186b58274 in -[UIViewController _loadViewFromNibNamed:bundle:] ()
#24 0x0000000186848844 in -[UIViewController loadViewIfRequired] ()
#25 0x00000001868fdfb4 in -[UINavigationController _layoutViewController:] ()
#26 0x00000001868fdeb0 in -[UINavigationController _updateScrollViewFromViewController:toViewController:] ()
#27 0x00000001868fd34c in -[UINavigationController _startTransition:fromViewController:toViewController:] ()
#28 0x00000001868fcff8 in -[UINavigationController _startDeferredTransitionIfNeeded:] ()
#29 0x00000001868fcd18 in -[UINavigationController __viewWillLayoutSubviews] ()
#30 0x00000001868fcc98 in -[UILayoutContainerView layoutSubviews] ()
#31 0x0000000186845648 in -[UIView(CALayerDelegate) layoutSublayersOfLayer:] ()
#32 0x000000018619d994 in -[CALayer layoutSublayers] ()
#33 0x0000000186198564 in CA::Layer::layout_if_needed(CA::Transaction*) ()
#34 0x0000000186198408 in CA::Layer::layout_and_display_if_needed(CA::Transaction*) ()
#35 0x0000000186197c08 in CA::Context::commit_transaction(CA::Transaction*) ()
#36 0x000000018619798c in CA::Transaction::commit() ()
#37 0x000000018683c61c in _afterCACommitHandler ()
#38 0x000000018204ea50 in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ ()
#39 0x000000018204b9dc in __CFRunLoopDoObservers ()
#40 0x000000018204bdbc in __CFRunLoopRun ()
#41 0x0000000181f790a4 in CFRunLoopRunSpecific ()
#42 0x000000018b1235a4 in GSEventRunModal ()
#43 0x00000001868ae3c0 in UIApplicationMain ()
#44 0x0000000100144e64 in main at /Usersxxxx/main.m:17
#45 0x0000000192e0ea08 in start ()
[ADDITION]
With XCode 6.1.1 (don't think this matters, but might) with this small program (sample single view) exhibits the same issue on the 5s. It's really the init that does it.
//
// ViewController.m
// testingmap
//
#import "ViewController.h"
#import <MapKit/MapKit.h>
#interface ViewController ()
#property (nonatomic) MKMapView *mapView;
#end
#implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.mapView = [[MKMapView alloc] init];
[self.view addSubview: self.mapView];
}
So, my iPhone was the phone in question and everything got fixed by just resetting all settings.
Settings-> General-> Reset-> Reset All Settings.
i hope it.this links useful for you. taking a time for getting map data. so you will put in view did appear and at the same time are you use xcode 6.0 and above version. ios 8 and above version. can you use this
It is Step For Map Data getting above ios 8.0 version

iphone simulator crash

My app crashes only in simulator , it doesn't crash on device.
it crashes in simulator and gives me nothing except this :
#0 0x00000000 in 0x00000000 ()
#1 0x0182966e in icu::RuleBasedBreakIterator::handleNext ()
#2 0x018293dc in icu::RuleBasedBreakIterator::next() ()
#3 0x01828a12 in icu::RuleBasedBreakIterator::following(int) ()
#4 0x043378dd in WebCore::nextBreakablePosition(unsigned short const*, int, int, bool) ()
#5 0x04cc2fca in -[NSString(WebStringDrawing) __web_drawInRect:withFont:ellipsis:alignment:letterSpacing:lineSpacing:includeEmoji:truncationRect:measureOnly:renderedStringOut:] ()
#6 0x04cc07be in -[NSString(WebStringDrawing) __web_drawInRect:withFont:ellipsis:alignment:letterSpacing:lineSpacing:includeEmoji:truncationRect:measureOnly:] ()
#7 0x04cc0499 in -[NSString(WebStringDrawing) _web_drawInRect:withFont:ellipsis:alignment:lineSpacing:includeEmoji:truncationRect:measureOnly:] ()
#8 0x04cc021b in -[NSString(WebStringDrawing) _web_sizeInRect:withFont:ellipsis:lineSpacing:] ()
#9 0x0053fc33 in -[NSString(UIStringDrawing) sizeWithFont:constrainedToSize:lineBreakMode:lineSpacing:] ()
#10 0x00644987 in -[UILabel _drawTextInRect:baselineCalculationOnly:] ()
#11 0x006422fc in -[UILabel drawTextInRect:] ()
#12 0x00559187 in -[UIView(CALayerDelegate) drawLayer:inContext:] ()
#13 0x00221b5e in -[CALayer drawInContext:] ()
#14 0x0022de47 in backing_callback(CGContext*, void*) ()
#15 0x0017b1f7 in CABackingStoreUpdate ()
#16 0x0022dd24 in -[CALayer _display] ()
#17 0x0022427d in CALayerDisplayIfNeeded ()
#18 0x001c90c3 in CA::Context::commit_transaction(CA::Transaction*) ()
#19 0x001ca294 in CA::Transaction::commit() ()
#20 0x001ca555 in CA::Transaction::release_thread(void*) ()
#21 0x98f4de0c in _pthread_tsd_cleanup ()
#22 0x98f0664c in _pthread_exit ()
#23 0x98f069a0 in pthread_exit ()
#24 0x00c93d1a in -[NSString compare:options:] ()
#25 0x00c93c98 in __NSThread__main__ ()
#26 0x98f04ed9 in _pthread_start ()
#27 0x98f086de in thread_start ()
Why is this happening?
Thanks.
Set NSZombieEnabled, MallocStackLogging, and guard malloc in the debugger. Then, when your App crashes, type this in the gdb console:
(gdb) info malloc-history 0x543216
Replace 0x543216 with the address of the object that caused the crash, and you will get a much more useful stack trace and it should help you pinpoint the exact line in your code that is causing the problem.
See this article for more detailed instructions.
Another idea is to try turning off auto-correction in the simulator Settings App.

UITextField crashes app when entering apostrophe (')

my application is crashing when I enter an ' (apostrophe) in the textfield. Can anyone please tell the solution for the problem. Below is the place where it crashes
hotelTextfield.text = [hotelList objectAtIndex:indexPath.row];
I entered other strings in the textfield but those didn't cause any issue. But whenever I enter some ', it crashes.
Please find the stack backtrace for the crash
Program received signal: “EXC_BAD_ACCESS”.
(gdb) bt
#0 0x31ec3ebc in objc_msgSend ()
#1 0x31ec5b3c in objc_setProperty ()
#2 0x0000e720 in -[AvailabilityVC setHotelList:] (self=0x11fbe0, _cmd=0x1f700, _value=0x31ec3f28) at /Users/amitkumar_gupta/Documents/Projects/5StarHotels/Classes/AvailabilityVC.m:29
#3 0x0000c6c8 in -[AvailabilityVC textFieldDidChange:] (self=0x11fbe0, _cmd=0x1f8e7, aNotification=0x1858a0) at /Users/amitkumar_gupta/Documents/Projects/5StarHotels/Classes/AvailabilityVC.m:248
#4 0x308ff5d8 in _nsnote_callback ()
#5 0x30de3510 in _CFXNotificationPostNotification ()
#6 0x308fd1b2 in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
#7 0x308ff518 in -[NSNotificationCenter postNotificationName:object:] ()
#8 0x336b27f4 in -[UITextField fieldEditorDidChange:] ()
#9 0x335eecb4 in -[UIFieldEditor webViewDidChange:] ()
#10 0x308ff5d8 in _nsnote_callback ()
#11 0x30de3510 in _CFXNotificationPostNotification ()
#12 0x308fd1b2 in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
#13 0x30da38e4 in __invoking___ ()
#14 0x30df757a in -[NSInvocation invoke] ()
#15 0x311ca134 in SendDelegateMessage ()
#16 0x3069cb30 in WebEditorClient::respondToChangedContents ()
#17 0x3123c01c in WebCore::Editor::respondToChangedContents ()
#18 0x3123a914 in WebCore::Editor::appliedEditing ()
#19 0x3123a740 in WebCore::TypingCommand::typingAddedToOpenCommand ()
#20 0x3122aa10 in WebCore::TypingCommand::insertTextRunWithoutNewlines ()
#21 0x3122a954 in WebCore::TypingCommand::insertText ()
#22 0x3122947c in WebCore::TypingCommand::insertText ()
#23 0x31228bd4 in WebCore::Editor::insertTextWithoutSendingTextEvent ()
#24 0x31228818 in WebCore::EventHandler::defaultTextInputEventHandler ()
#25 0x311f776c in WebCore::EventTargetNode::defaultEventHandler ()
#26 0x311f7358 in WebCore::EventTargetNode::dispatchGenericEvent ()
#27 0x311f6cf8 in WebCore::EventTargetNode::dispatchEvent ()
#28 0x312284fc in WebCore::EventHandler::handleTextInputEvent ()
#29 0x312283e0 in WebCore::Editor::insertText ()
#30 0x3069bab8 in -[WebHTMLView(WebNSTextInputSupport) insertText:] ()
#31 0x30defa14 in -[NSObject performSelector:withObject:] ()
#32 0x31228280 in -[WAKResponder tryToPerform:with:] ()
#33 0x3069b3d0 in -[WebView(WebViewEditingActions) _performResponderOperation:with:] ()
#34 0x3069b350 in -[WebView(WebViewEditingActions) insertText:] ()
#35 0x3368dd2c in -[UIWebDocumentView insertText:] ()
#36 0x3368d7b0 in -[UIKeyboardImpl addInputString:fromVariantKey:] ()
#37 0x3368ca88 in -[UIKeyboardImpl handleStringInput:fromVariantKey:] ()
#38 0x3368c81c in -[UIKeyboardLayoutStar sendStringAction:forKey:] ()
#39 0x3368b8f0 in -[UIKeyboardLayoutStar touchUp:withPathInfo:] ()
#40 0x3368732c in -[UIKeyboardLayout handleHandEvent:] ()
#41 0x3368b414 in -[UIKeyboardLayout touchesEnded:withEvent:] ()
#42 0x33604900 in -[UIWindow _sendTouchesForEvent:] ()
#43 0x33603f94 in -[UIWindow sendEvent:] ()
#44 0x335ff790 in -[UIApplication sendEvent:] ()
#45 0x335ff094 in _UIApplicationHandleEvent ()
#46 0x332e8990 in PurpleEventCallback ()
#47 0x30de952a in CFRunLoopRunSpecific ()
#48 0x30de8c1e in CFRunLoopRunInMode ()
#49 0x332e7374 in GSEventRunModal ()
#50 0x335adc30 in -[UIApplication _run] ()
#51 0x335ac230 in UIApplicationMain ()
#52 0x00002550 in main (argc=1, argv=0x2ffff540) at /Users/amitkumar_gupta/Documents/Projects/5StarHotels/main.m:13
(gdb)
OK, the problem is solved. It was due to the SQLite. the Sqlite wasn't able to handle the apostrophe('). Solved it by adding an extra ' before sending it to the SQLite.