My Objective-C application crashes randomly and shows a WebKit Legacy issue there in a stack trace. Can you please identify the problem?
#0. Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x18ecc8150 objc_msgSend + 16
1 WebKitLegacy 0x195fe0808 <redacted> + 132
2 CoreFoundation 0x190256d54 <redacted> + 404
3 CoreFoundation 0x190152d4c _CF_forwarding_prep_0 + 92
4 CoreFoundation 0x190258e80 <redacted> + 144
5 CoreFoundation 0x19014e2c4 <redacted> + 292
6 WebCore 0x194e28be8 <redacted> + 108
7 CoreFoundation 0x19020142c <redacted> + 24
8 CoreFoundation 0x190200d04 <redacted> + 388
9 CoreFoundation 0x1901fe9a8 <redacted> + 744
10 CoreFoundation 0x19012eda4 CFRunLoopRunSpecific + 424
11 UIFoundation 0x19632c134 <redacted> + 1764
12 Foundation 0x190d464cc <redacted> + 340
13 CoreFoundation 0x19020142c <redacted> + 24
14 CoreFoundation 0x190200d04 <redacted> + 388
15 CoreFoundation 0x1901fe9a8 <redacted> + 744
16 CoreFoundation 0x19012eda4 CFRunLoopRunSpecific + 424
17 GraphicsServices 0x191b98074 GSEventRunModal + 100
18 UIKit 0x1963e9058 UIApplicationMain + 208
19 NewsHog 0x1000d71a0 main (main.m:16)
20 libdyld.dylib 0x18f13d59c <redacted> + 4
I am using core plot library Release 2.0 downloaded from https://github.com/core-plot/core-plot/releases in MAC application to generate the bar graphs. When i install application on OSX 10.8 and 10.7 application crashes. It works well above 10.8.3. The linker flags is -ObjC and -all_load is already set in build settings.
I am getting below issue in logs. Can any one please look the issue and help me to resolve.
-[NSColorSpaceColor CGColor]: unrecognized selector sent to instance 0x7ff4caa6e0c0
-[NSColorSpaceColor CGColor]: unrecognized selector sent to instance 0x7ff4caa6e0c0
2016-05-10 11:39:17.072 [375:807] (
0 CoreFoundation 0x00007fff8f781d16 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff96a329ea objc_exception_throw + 43
2 CoreFoundation 0x00007fff8f80ccfe -[NSObject doesNotRecognizeSelector:] + 190
3 CoreFoundation 0x00007fff8f76f073 ___forwarding___ + 371
4 CoreFoundation 0x00007fff8f76ee88 _CF_forwarding_prep_0 + 232
5 CorePlot 0x0000000101720cbf +[CPTTextStyle(CPTPlatformSpecificTextStyleExtensions) textStyleWithAttributes:] + 191
6 CorePlot 0x000000010170e3ee -[CPTTextLayer initWithAttributedText:] + 62
7 CorePlot 0x00000001017083b8 -[CPTAxis updateAxisLabelsAtLocations:inRange:useMajorAxisLabels:] + 1880
8 CorePlot 0x00000001017089cc -[CPTAxis relabel] + 700
9 CorePlot 0x000000010170985a -[CPTAxis layoutSublayers] + 42
10 QuartzCore 0x00007fff9378e9aa _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 312
11 QuartzCore 0x00007fff9378deec _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 308
12 QuartzCore 0x00007fff9378dc74 _ZN2CA11Transaction6commitEv + 274
13 QuartzCore 0x00007fff9378d275 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 63
14 CoreFoundation 0x00007fff8f741f37 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
15 CoreFoundation 0x00007fff8f741e96 __CFRunLoopDoObservers + 374
16 CoreFoundation 0x00007fff8f7168e2 CFRunLoopRunSpecific + 258
17 HIToolbox 0x00007fff951b6c57 RunCurrentEventLoopInMode + 277
18 HIToolbox 0x00007fff951be33d ReceiveNextEventCommon + 355
19 HIToolbox 0x00007fff951be1ca BlockUntilNextEventMatchingListInMode + 62
20 AppKit 0x00007fff903b73e9 _DPSNextEvent + 659
21 AppKit 0x00007fff903b6cf0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
22 AppKit 0x00007fff903b368d -[NSApplication run] + 456
23 AppKit 0x00007fff90630cfb NSApplicationMain + 860
)
I maintain cTiVo, an open-source OS X project with a large user base. On Yosemite, I started getting sporadic crash notices (EXC_BAD_ACCESS KERN_INVALID_ADDRESS), and I haven't been able to track them down, nor ever reproduce them on my system, nor has anyone been able to reliably recreate them in the field. Although there are a lot of reports, the crashes occur infrequently, and mostly on Yosemite (primarily 10.10.2 and 10.10.3), despite the software running on lots of other systems back to 10.7. They occur across all types of hardware (MBPro, iMac's MacMinis and others). The program doesn't do anything particularly fancy in the UI, but it does drive a lot of command-line programs (via NSTask) to do video processing and related activities.
There are two strange things about the crashes.
First is that they seem to happen across the entire program at random places both in my code and in Apple's routines. The most common (and unhelpful) is in the main run loop (see the first stacktrace below), and many of them happen within view displaying code, e.g. the second trace below. This would lead me to look for an over-released object normally, but as I said, it seems to happen to every kind of object in the program.
The second strange thing is after looking through literally hundreds of these, the invalid addresses upon which they crash almost entirely fall into one of two groups:
0x0000000002798000
0x0000000002998000
0x0000000002A98000
0x0000000002B98000
0x0000000003098000
0x0000000003198000
0x0000000003298000
0x0000000003398000
0x0000000003498000
0x0000000003898000
0x0000000003998000
0x0000000003A98000
0x00000000047ffff8
0x0000000004fffff8
0x00000000057ffff8
0x0000000005fffff8
0x00000000067ffff8
0x0000000006fffff8
0x00000000077ffff8
0x0000000007fffff8
I've stared at these for a long time, and haven't been able to figure out what this tight grouping of invalid addresses might mean. The first group are 1MiB apart and the second are 8MiB apart; AFAIK, I don't have any structures that large in my program. The second group seems to be normally distributed in frequency around 5FFFF8 as the most common. I don't see the same pattern in the first group (there might be two centers, but that may be overfitting the data). In binary, they fall into these patterns (although some of the first group don't seem to appear).
0000001X XXXX1001 10000000 00000000
000001XX X1111111 11111111 11111000
I should mention I also get one other error EXC_ARITHMETIC EXC_I386_DIV at 0x0000000000000000, again at very random places, and there doesn't seem to be any dividing going on.
Any suggestions on why these addresses appear in this patterns, that might give a clue on where to look would be great!
Here's the sample stack traces...
Thread : Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff94a6a4de mach_msg_trap + 10
1 CoreFoundation 0x00007fff9288eeb4 __CFRunLoopServiceMachPort + 212
2 CoreFoundation 0x00007fff9288e37b __CFRunLoopRun + 1371
3 CoreFoundation 0x00007fff9288dbd8 CFRunLoopRunSpecific + 296
4 HIToolbox 0x00007fff94e3956f RunCurrentEventLoopInMode + 235
5 HIToolbox 0x00007fff94e392ea ReceiveNextEventCommon + 431
6 HIToolbox 0x00007fff94e3912b _BlockUntilNextEventMatchingListInModeWithFilter + 71
7 AppKit 0x00007fff973169bb _DPSNextEvent + 978
8 AppKit 0x00007fff97315f68 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346
9 AppKit 0x00007fff9730bbf3 -[NSApplication run] + 594
10 AppKit 0x00007fff97288354 NSApplicationMain + 1832
11 cTiVo 0x000000010871c234 start
Thread : Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff98b054de mach_msg_trap + 10
1 CoreGraphics 0x00007fff94ccfb41 _CGSAddStructuralRegionOfType + 148
2 CoreGraphics 0x00007fff94b29901 add_structural_region_of_type + 134
3 AppKit 0x00007fff90647394 _NXSetCursorRect + 680
4 AppKit 0x00007fff90646fa2 -[NSWindow _addCursorRect:cursor:forView:] + 889
5 AppKit 0x00007fff90646c0e -[NSView addCursorRect:cursor:] + 555
6 AppKit 0x00007fff90b1d517 -[NSTableHeaderView resetCursorRects] + 389
7 AppKit 0x00007fff905f9ddb -[NSView(NSInternal) _updateTrackingAreas] + 660
8 AppKit 0x00007fff905fa21b -[NSView(NSInternal) _updateTrackingAreas] + 1748
9 AppKit 0x00007fff905fa21b -[NSView(NSInternal) _updateTrackingAreas] + 1748
10 AppKit 0x00007fff905fb13e -[NSScrollView _updateTrackingAreas] + 119
11 AppKit 0x00007fff905fa21b -[NSView(NSInternal) _updateTrackingAreas] + 1748
12 AppKit 0x00007fff905fa21b -[NSView(NSInternal) _updateTrackingAreas] + 1748
13 AppKit 0x00007fff905fa21b -[NSView(NSInternal) _updateTrackingAreas] + 1748
14 AppKit 0x00007fff905fa21b -[NSView(NSInternal) _updateTrackingAreas] + 1748
15 AppKit 0x00007fff90645ab9 _handleInvalidCursorRectsNote + 1072
16 AppKit 0x00007fff90c1bd21 __35-[NSWindow _postInvalidCursorRects]_block_invoke3305 + 46
17 CoreFoundation 0x00007fff99154da7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
18 CoreFoundation 0x00007fff99154d00 __CFRunLoopDoObservers + 368
19 CoreFoundation 0x00007fff99146e08 __CFRunLoopRun + 872
20 CoreFoundation 0x00007fff99146858 CFRunLoopRunSpecific + 296
21 HIToolbox 0x00007fff920a5aef RunCurrentEventLoopInMode + 235
22 HIToolbox 0x00007fff920a586a ReceiveNextEventCommon + 431
23 HIToolbox 0x00007fff920a56ab _BlockUntilNextEventMatchingListInModeWithFilter + 71
24 AppKit 0x00007fff904e5f81 _DPSNextEvent + 964
25 AppKit 0x00007fff904e5730 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
26 AppKit 0x00007fff904d9593 -[NSApplication run] + 594
27 AppKit 0x00007fff904c4a14 NSApplicationMain + 1832
28 cTiVo 0x0000000102a19234 start
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff878ff0ee objc_msgSend + 46
1 AppKit 0x00007fff8e5519a1 -[CALayer(NSContentsAligning) NS_shouldUseContentsAligning] + 32
2 AppKit 0x00007fff8dca1ee9 _NSBackingLayerSetNeedsDisplayInRect + 178
3 QuartzCore 0x00007fff88e849f7 -[CALayer setNeedsDisplay] + 62
4 AppKit 0x00007fff8dca1e10 -[NSView(NSInternal) _setLayerNeedsDisplayInViewRect:] + 648
5 AppKit 0x00007fff8e33a1bb NSViewSetNeedsDisplayInRect + 1077
6 WebKitLegacy 0x00007fff89344b7e setNeedsDisplayInRect(NSView*, objc_selector*, CGRect) + 238
7 AppKit 0x00007fff8dc36772 -[NSView setNeedsDisplay:] + 81
8 AppKit 0x00007fff8dc6244f -[NSTextFieldCell setObjectValue:] + 88
9 AppKit 0x00007fff8dc61fc4 -[NSCell setStringValue:] + 111
10 AppKit 0x00007fff8dccd250 -[NSControl setStringValue:] + 138
11 cTiVo 0x00000001090cf92f -[MTDownloadTableView updateProgressInCell:forDL:] (MTDownloadTableView.m:158)
12 cTiVo 0x00000001090cfc6a -[MTDownloadTableView updateProgress:] (MTDownloadTableView.m:188)
13 CoreFoundation 0x00007fff8650bcdc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
14 CoreFoundation 0x00007fff863fd244 _CFXNotificationPost + 3140
15 Foundation 0x00007fff91d55c31 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
16 cTiVo 0x000000010911cecc __93+[NSNotificationCenter(Threads) postNotificationNameOnMainThread:object:userInfo:afterDelay:]_block_invoke (NSNotificationCenter+Threads.m:44)
17 libdispatch.dylib 0x00007fff8a374323 _dispatch_call_block_and_release + 12
18 libdispatch.dylib 0x00007fff8a36fc13 _dispatch_client_callout + 8
19 libdispatch.dylib 0x00007fff8a37bcbf _dispatch_main_queue_callback_4CF + 861
20 CoreFoundation 0x00007fff864a2c79 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
21 CoreFoundation 0x00007fff8645f30f __CFRunLoopRun + 2159
22 CoreFoundation 0x00007fff8645e858 CFRunLoopRunSpecific + 296
23 HIToolbox 0x00007fff926c4aef RunCurrentEventLoopInMode + 235
24 HIToolbox 0x00007fff926c486a ReceiveNextEventCommon + 431
25 HIToolbox 0x00007fff926c46ab _BlockUntilNextEventMatchingListInModeWithFilter + 71
26 AppKit 0x00007fff8dc26f81 _DPSNextEvent + 964
27 AppKit 0x00007fff8dc26730 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
28 AppKit 0x00007fff8dc1a593 -[NSApplication run] + 594
29 AppKit 0x00007fff8dc05a14 NSApplicationMain + 1832
30 cTiVo 0x00000001090b5714 start
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempted to perform another operation with a fetch already in progress'
First time my application working fine..but then after every time my app is crashed due to the above error and its only happened in iOS6 version devices. but my app is working fine in iOS7 or upper version devices.
The below is stack trace:
(
0 CoreFoundation 0x32e5b2bb <redacted> + 186
1 libobjc.A.dylib 0x3aadb97f objc_exception_throw + 30
2 CoreData 0x32bf5207 <redacted> + 94
3 CoreData 0x32bf591d <redacted> + 92
4 CoreData 0x32c06387 <redacted> + 58
5 CoreData 0x32c04d19 <redacted> + 624
6 CoreData 0x32bfe089 <redacted> + 312
7 CoreData 0x32bfd73f <redacted> + 682
8 CoreData 0x32bfd205 <redacted> + 468
9 CoreData 0x32bfc61d <redacted> + 1644
10 CoreData 0x32bfaf17 <redacted> + 646
11 WhatDidIWear 0x000b1875 -[WDIWDatabase(Years) years] + 848
12 WhatDidIWear 0x000a9b2d -[WDIWCalendar years] + 56
13 WhatDidIWear 0x00095c8f -[YearsViewController initWithNibName:bundle:] + 382
14 WhatDidIWear 0x000945bb -[TemplateViewController initWithDefaultNibName] + 62
15 WhatDidIWear 0x00093567 -[TabBarController yearsVC] + 134
16 WhatDidIWear 0x00093713 -[TabBarController homeViewControllers] + 46
17 WhatDidIWear 0x0008f49b -[TabBarController viewDidLoad] + 510
18 UIKit 0x34cf82d5 <redacted> + 228
19 WhatDidIWear 0x0008e927 -[AppDelegate tabBarController] + 134
20 WhatDidIWear 0x0008de65 -[AppDelegate application:didFinishLaunchingWithOptions:] + 980
21 UIKit 0x34cc3ad9 <redacted> + 252
22 UIKit 0x34cc3663 <redacted> + 1190
23 UIKit 0x34cbb84b <redacted> + 698
24 UIKit 0x34c63c39 <redacted> + 1004
25 UIKit 0x34c636cd <redacted> + 72
26 UIKit 0x34c6311b <redacted> + 6154
27 GraphicsServices 0x369555a3 <redacted> + 590
28 GraphicsServices 0x369551d3 <redacted> + 34
29 CoreFoundation 0x32e30173 <redacted> + 34
30 CoreFoundation 0x32e30117 <redacted> + 138
31 CoreFoundation 0x32e2ef99 <redacted> + 1384
32 CoreFoundation 0x32da1ebd CFRunLoopRunSpecific + 356
33 CoreFoundation 0x32da1d49 CFRunLoopRunInMode + 104
34 UIKit 0x34cba485 <redacted> + 668
35 UIKit 0x34cb7301 UIApplicationMain + 1120
36 WhatDidIWear 0x0008d97f main + 230
37 libdyld.dylib 0x3af12b20 <redacted> + 0
)
I am frustrated now for not solving the above error.
Please give me an idea to solve the above stuff.
I need some help with this crash log. I've seen other posts about this error having to do with the watchdog timing out but I have not been able to figure this out.
Exception type: 02
exception code: 08badf00d
failed to launch in time
Elapsed total CPU time (seconds): 26.920 (user 26.920, system 0.000), 67% CPU Elapsed application CPU time (seconds): 0.850, 2% CPU
Unknown thread crashed with unknown flavor: 5, state_count: 1
MORE details:
Thread0name: Dispatchqueue:com.apple.main-thread Thread 0:
0 libsystem_kernel.dylib 1 libsystem_c.dylib
2 CoreData
3 CoreData performFetch:] + 334
4 MyPaleo
5 UIKit
loadViewIfRequired] + 360
6 UIKit
contentScrollView] + 22
7 UIKit
_computeAndApplyScrollContentInsetDeltaForViewController:] + 24
8 UIKit 0x3346ef70-[UINavigationController _layoutViewController:] + 28
9 UIKit 0x3346ee94-[UINavigationController _updateScrollViewFromViewController:toViewController:] + 268
10 UIKit 0x3346e5d4-[UINavigationController _startTransition:fromViewController:toViewController:] + 60
11 UIKit 0x3346e4bc-[UINavigationController _startDeferredTransitionIfNeeded:] + 320
0x399950fc__psynch_mutexwait+24 0x398de124 pthread_mutex_lock + 388 0x31383e8c -[_PFLock lock] + 20 0x31465752 -[NSFetchedResultsController
0x0001a5d2 0x2000 + 99794 0x3341a590 -[UIViewController
0x3346f146 -[UIViewController 0x3346f08c -[UINavigationController
12 UIKit
layoutSubviews] + 176
13 UIKit
layoutSublayersOfLayer:] + 254
14 QuartzCore
15 QuartzCore
CA::Layer::layout_if_needed(CA::Transaction*) + 456
16 QuartzCore 0x331d77ca-[CALayerlayoutIfNeeded]+138 17 UIKit 0x334a80e4-[UIViewController window:setupWithInterfaceOrientation:] + 204
18 UIKit 0x334a72d0-[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 3616
0x3343f4e4-[UILayoutContainerView 0x333fe7fe-[UIView(CALayerDelegate)
0x331a8d86-[CALayerlayoutSublayers]+210 0x331a8924
19 UIKit 0x334a64a2-[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 42 20 UIKit 0x334a642c-[UIWindow _setRotatableViewOrientation:duration:force:] + 64
21 UIKit 0x335dc304__57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke_0 + 100
22 UIKit 0x3346468e-[UIWindow _updateToInterfaceOrientation:duration:force:] + 214
23 UIKit 0x334643d0-[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 688
24 UIKit 0x33463d36-[UIViewController _tryBecomeRootViewControllerInWindow:] + 154
25 UIKit 0x3345aea6-[UIWindow addRootViewControllerViewIfPossible] + 366
26 UIKit
360
27 UIKit
28 UIKit
_callInitializationDelegatesForURL:payload:suspended:] + 1662
29 UIKit 0x33453846-[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 694
30 UIKit
handleEvent:withNewEvent:] + 1000
31 UIKit
32 UIKit
33 GraphicsServices
34 GraphicsServices
35 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
36 CoreFoundation 37 CoreFoundation 38 CoreFoundation 39 CoreFoundation 40 UIKit
41 UIKit
42 MyPaleo
43 libdyld.dylib
0x315c8112 __CFRunLoopDoSource1 + 134 0x315c6f94 __CFRunLoopRun + 1380 0x31539eb8 CFRunLoopRunSpecific + 352 0x31539d44 CFRunLoopRunInMode + 100 0x33452480 -[UIApplication _run] + 664 0x3344f2fc UIApplicationMain + 1116 0x0001eb16 0x2000 + 117526
0x398ceb1c start + 0
Ate Bad Food (0x8badf00d) is when the Watch Dog kills your app because its taking too long to launch. Your application:didFinishLaunchingWithOptions: method must complete in less then 5 second or the Watch Dog will bite you. Note: when you run in the debugger the watch dog is disabled. You must test a release build on a device before submitting to the App Store. To fix this error you need to run you App on a device in Instruments using a Time Profiler.
You should to watch WWDC 2012 Session 225 Up and Running - Making a great impression with every launch. It demos exactly how to fix this error.
https://developer.apple.com/videos/wwdc/2012/?id=225