我的应用程序因OSM Yosemite而崩溃,原因如下: 崩溃线程:7调度队列:NSOperationQueue 0x608000239d80 :: NSOperation 0x60000013b3a0(QOS:UTILITY)
将我的NSOperation改为:
if ([self respondsToSelector:@selector(qualityOfService)]) {
self.qualityOfService = NSQualityOfServiceUtility;
}
但是应用程序一直在崩溃。 崩溃线程的堆栈跟踪:
Thread 7 Crashed :: Dispatch queue:NSOperationQueue 0x608000239d80 :: NSOperation 0x60000013b3a0(QOS:UTILITY)
0 libobjc.A.dylib 0x00007fff8af4f0dd objc_msgSend + 29
1 com.apple.CoreText 0x00007fff882d0ce7 TAttributes :: ParseAttributes(__ CFDictionary const *,void const *&amp ;,, TInlineVector,30ul>&)+ 521
2 com.apple.CoreText 0x00007fff882d06f9 TAttributes :: TAttributes(__ CFDictionary const *)+ 257
3 com.apple.CoreText 0x00007fff882e8295 TRunEncoder :: Encode(_CTGlyphStorage *,CFRange,unsigned int, __CFDictionary const *)+ 85
4 com.apple.CoreText 0x00007fff882e8231 CTRunCreateMutableRunsWithStorageAndOptions + 191
5 com.apple.UIFoundation 0x00007fff8f0f329e - [NSATSGlyphStorage createCTTypesetter] + 705
6 com.apple.UIFoundation 0x00007fff8f0ecf0c - [NSATSTypesetter _ctTypesetter] + 324
7 com.apple.UIFoundation 0x00007fff8f0f78b5 - [NSATSLineFragment layoutForStartingGlyphAtIndex:characterIndex:minPosition:maxPosition:lineFragmentRect:] + 89
8 com.apple.UIFoundation 0x00007fff8f0edd43 - [NSATSTypesetter _layoutLineFragmentStartingWithGlyphAtIndex:characterIndex:atPoint:renderingContext:] + 2901 9 com.apple.UIFoundation 0x00007fff8f0efa08 - [NSATSTypesetter layoutParagraphAtPoint:] + 156
10 com.apple.UIFoundation 0x00007fff8f040356 - [NSTypesetter _layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:maxCharacterIndex:nextGlyphIndex:nextCharacterIndex:] + 4713
11 com.apple.UIFoundation 0x00007fff8f041ae5 - [NSTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:] + 246
12 com.apple.UIFoundation 0x00007fff8f0f0743 - [NSATSTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:] + 967
13 p.apple.UIFoundation 0x00007fff8f0b9e76 - [NSLayoutManager(NSPrivate)_fillLayoutHoleForCharacterRange:desiredNumberOfLines:isSoft:] + 1334 14 p.apple.UIFoundation 0x00007fff8f0c370c _NSFastFillAllLayoutHolesForGlyphRange + 149315 com.apple.UIFoundation 0x00007fff8f0c8e54 - [NSLayoutManager(NSPrivate)_drawBackgroundForGlyphRange:atPoint:] + 542
16 com.apple.AppKit 0x00007fff8f37fc15 - [NSTextView drawRect:] + 1878
17 com.apple.AppKit 0x00007fff8f37f409 - [NSTextView(NSTextView_LayerBacking)drawLayer:inGraphicsContext:] + 493
18 com.apple.AppKit 0x00007fff8f332980 + [NSGraphicsContext configureGraphicsContextForCALayer:withCGContext:andRenderWithHandler:] + 97
19 com.apple.QuartzCore 0x00007fff92e70153 CABackingStoreUpdate_ + 3306
20 com.apple.QuartzCore 0x00007fff92e6f463 ___ZN2CA5Layer8display_Ev_block_invoke + 59
21 p.apple.QuartzCore 0x00007fff92e6f41f x_blame_allocations + 8122 com.apple.QuartzCore 0x00007fff92e6ef1c CA :: Layer :: display_()+ 1546
23 com.apple.AppKit 0x00007fff8f31c89f _NSBackingLayerDisplay + 617
24 com.apple.QuartzCore 0x00007fff92e6e641 CA :: Layer :: display_if_needed(CA :: Transaction *)+ 603
25 com.apple.QuartzCore 0x00007fff92e6dd7d CA :: Layer :: layout_and_display_if_needed(CA :: Transaction *)+ 35
26 com.apple.QuartzCore 0x00007fff92e6d50e CA :: Context :: commit_transaction(CA :: Transaction *)+ 242
27 com.apple.QuartzCore 0x00007fff92e6d164 CA :: Transaction :: commit()+ 390
28 com.apple.QuartzCore 0x00007fff92e7df55 CA :: Transaction :: observer_callback(__ CFRunLoopObserver *,unsigned 长,无效*)+ 71
29 com.apple.CoreFoundation 0x00007fff902bdd87 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
30 com.apple.CoreFoundation 0x00007fff902bdce0 __CFRunLoopDoObservers + 368
31 com.apple.CoreFoundation 0x00007fff902af858 CFRunLoopRunSpecific + 328
32 com.apple.Foundation 0x00007fff8d04bab9 - [NSRunLoop(NSRunLoop)runMode:beforeDate:] + 278
33 com.pack.MyApp 0x000000010ab54d5b - [SyncOperation 开始] + 886
34 com.apple.Foundation 0x00007fff8cfe91a3 __NSOQSchedule_f + 184
35 libdispatch.dylib 0x00007fff925e9c13 _dispatch_client_callout + 8
36 libdispatch.dylib 0x00007fff925ed365 _dispatch_queue_drain + 1100
37 libdispatch.dylib 0x00007fff925eeecc _dispatch_queue_invoke + 202
38 libdispatch.dylib 0x00007fff925ec6b7 _dispatch_root_queue_drain + 463
39 libdispatch.dylib 0x00007fff925fafe4 _dispatch_worker_thread3 + 91
40 libsystem_pthread.dylib 0x00007fff8596d6cb _pthread_wqthread + 729
41 libsystem_pthread.dylib 0x00007fff8596b4a1 start_wqthread + 13
谢谢!