应用程序在渲染长文本时崩溃

时间:2016-11-18 08:34:59

标签: ios uitableview crash arabic

在iOS应用中,如果我将长文本设置为UITableView中的cusotm单元格,我会收到很长的崩溃(文本是阿拉伯文):

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000102d2fffe
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
Triggered by Thread:  0

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   CoreText                        0x0000000184dac018 TRunGlue::GetGlyphID(long) const + 68
1   CoreText                        0x0000000184dac00c TRunGlue::GetGlyphID(long) const + 56
2   CoreText                        0x0000000184dd2358 TAATMorphSubtableMorx::DoInsertionSubtable(TRunGlue&, TAATMorphSubtableMorx::MorxInsertionState&, TRunGlue::TGlyph, long, TAATMorphSubtable::GlyphState, MorphActionResultCode&) + 760
3   CoreText                        0x0000000184ddbb1c std::__1::pair<bool, MorphActionResultCode> TAATMorphSubtableMorx::ProcessT<TRunGlue::TGlyphInSingleRun, true>(TRunGlue&, CFRange, unsigned int) + 620
4   CoreText                        0x0000000184dfb03c TAATMorphTable::ShapeGlyphs(SyncState&, bool&, __CFString const*) + 616
5   CoreText                        0x0000000184deaacc TShapingEngine::ShapeGlyphs(TLine&, TCharStream const&) + 336
6   CoreText                        0x0000000184dee100 TTypesetter::FinishEncoding(std::__1::tuple<TLine const*, TCharStream const*, void const* (*)(__CTRun const*, __CFString const*, void*), void*, std::__1::shared_ptr<TBidiLevelsProvider>*, unsigned int, unsigned char> const&, TLine&, signed char) + 236
7   CoreText                        0x0000000184db8b64 TTypesetterAttrString::Initialize(__CFAttributedString const*) + 660
8   CoreText                        0x0000000184db879c TTypesetterAttrString::TTypesetterAttrString(__CFAttributedString const*) + 108
9   CoreText                        0x0000000184db8684 CTLineCreateWithAttributedString + 56
10  UIFoundation                    0x0000000187f52eac __NSStringDrawingEngine + 4096
11  UIFoundation                    0x0000000187f51e60 -[NSString(NSExtendedStringDrawing) boundingRectWithSize:options:attributes:context:] + 156
12  UIKit                           0x0000000187fefd58 -[UILabel _textRectForBounds:limitedToNumberOfLines:includingShadow:] + 732
13  UIKit                           0x0000000187fef9e0 -[UILabel _intrinsicSizeWithinSize:] + 128
14  UIKit                           0x00000001880e5e28 -[UILabel intrinsicContentSize] + 96
15  UIKit                           0x00000001880e5c1c -[UIView(UIConstraintBasedLayout) _generateContentSizeConstraints] + 52
16  UIKit                           0x00000001880e5784 -[UIView(UIConstraintBasedLayout) _updateContentSizeConstraints] + 488
17  UIKit                           0x0000000188937ddc -[UIView(AdditionalLayoutSupport) _updateSystemConstraints] + 76
18  UIKit                           0x0000000188936b00 -[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:] + 192
19  UIKit                           0x0000000188936e48 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 632
20  UIKit                           0x0000000188936dd0 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 512
21  Foundation                      0x0000000182bc8510 -[NSISEngine withBehaviors:performModifications:] + 168
22  UIKit                           0x0000000188937094 -[UIView(AdditionalLayoutSupport) _recursiveUpdateConstraintsIfNeededCollectingViews:forSecondPass:] + 120
23  UIKit                           0x0000000188936dd0 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 512
24  UIKit                           0x00000001889375f0 __97-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededPostponeVariableChangeNotifications:]_block_invoke + 84
25  UIKit                           0x00000001889367b0 -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 136
26  UIKit                           0x00000001889371f8 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededPostponeVariableChangeNotifications:] + 164
27  UIKit                           0x0000000188934354 -[UIView(AdditionalLayoutSupport) _systemLayoutSizeFittingSize:withHorizontalFittingPriority:verticalFittingPriority:hasIntentionallyCollapsedHeight:] + 288
28  UIKit                           0x00000001884bd954 -[UITableViewCell systemLayoutSizeFittingSize:withHorizontalFittingPriority:verticalFittingPriority:] + 344
29  UIKit                           0x000000018832c4f8 -[UITableView _heightForCell:atIndexPath:] + 392
30  UIKit                           0x00000001881278b4 __53-[UITableView _configureCellForDisplay:forIndexPath:]_block_invoke + 2936
31  UIKit                           0x0000000187ff3294 +[UIView(Animation) performWithoutAnimation:] + 104
32  UIKit                           0x0000000188126d18 -[UITableView _configureCellForDisplay:forIndexPath:] + 460
33  UIKit                           0x0000000188328440 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 824
34  UIKit                           0x0000000188328604 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 80
35  UIKit                           0x0000000188315bac -[UITableView _updateVisibleCellsNow:isRecursive:] + 2304
36  UIKit                           0x000000018832d668 -[UITableView _performWithCachedTraitCollection:] + 116
37  UIKit                           0x00000001880c9b14 -[UITableView layoutSubviews] + 176
38  UIKit                           0x0000000187fe254c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1196
39  QuartzCore                      0x00000001854aa40c -[CALayer layoutSublayers] + 148
40  QuartzCore                      0x000000018549f0e8 CA::Layer::layout_if_needed(CA::Transaction*) + 292
41  QuartzCore                      0x000000018549efa8 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
42  QuartzCore                      0x000000018541bc64 CA::Context::commit_transaction(CA::Transaction*) + 252
43  QuartzCore                      0x00000001854430d0 CA::Transaction::commit() + 512
44  QuartzCore                      0x0000000185443af0 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 120
45  CoreFoundation                  0x00000001821497dc __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
46  CoreFoundation                  0x000000018214740c __CFRunLoopDoObservers + 372
47  CoreFoundation                  0x0000000182076068 CFRunLoopRunSpecific + 476
48  UIKit                           0x00000001880505dc -[UIApplication _run] + 608
49  UIKit                           0x000000018804b360 UIApplicationMain + 208
50  QuranTarjoman                   0x0000000100041808 0x100020000 + 137224
51  libdyld.dylib                   0x00000001810585b8 start + 4

Thread 1:
0   libsystem_kernel.dylib          0x000000018116aa88 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x000000018122d188 _pthread_wqthread + 968
2   libsystem_pthread.dylib         0x000000018122cdb4 start_wqthread + 4

Thread 2 name:  com.apple.uikit.eventfetch-thread
Thread 2:
0   libsystem_kernel.dylib          0x000000018114c16c mach_msg_trap + 8
1   libsystem_kernel.dylib          0x000000018114bfdc mach_msg + 72
2   CoreFoundation                  0x0000000182149cec __CFRunLoopServiceMachPort + 192
3   CoreFoundation                  0x0000000182147908 __CFRunLoopRun + 1132
4   CoreFoundation                  0x0000000182076048 CFRunLoopRunSpecific + 444
5   Foundation                      0x0000000182b84b1c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
6   Foundation                      0x0000000182ba560c -[NSRunLoop(NSRunLoop) runUntilDate:] + 96
7   UIKit                           0x00000001889c5c7c -[UIEventFetcher threadMain] + 136
8   Foundation                      0x0000000182c8250c __NSThread__start__ + 1024
9   libsystem_pthread.dylib         0x000000018122f860 _pthread_body + 240
10  libsystem_pthread.dylib         0x000000018122f770 _pthread_body + 0
11  libsystem_pthread.dylib         0x000000018122cdbc thread_start + 4

Thread 3:
0   libsystem_kernel.dylib          0x000000018116a314 __semwait_signal + 8
1   libsystem_c.dylib               0x000000018108827c nanosleep + 212
2   libc++.1.dylib                  0x0000000180b99994 std::__1::this_thread::sleep_for(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > const&) + 80
3   JavaScriptCore                  0x000000018691e384 void std::__1::this_thread::sleep_for<long long, std::__1::ratio<1l, 1000l> >(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> > const&) + 76
4   JavaScriptCore                  0x000000018691d484 bmalloc::waitUntilFalse(std::__1::unique_lock<bmalloc::StaticMutex>&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >, bool&) + 128
5   JavaScriptCore                  0x000000018691d2c0 bmalloc::Heap::scavenge(std::__1::unique_lock<bmalloc::StaticMutex>&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >) + 60
6   JavaScriptCore                  0x000000018691d160 bmalloc::Heap::concurrentScavenge() + 80
7   JavaScriptCore                  0x000000018691e470 bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadRunLoop() + 92
8   JavaScriptCore                  0x000000018691e39c std::__1::__shared_ptr_emplace<std::__1::mutex, std::__1::allocator<std::__1::mutex> >::~__shared_ptr_emplace() + 0
9   JavaScriptCore                  0x000000018691e64c void* std::__1::__thread_proxy<std::__1::tuple<void (*)(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*), bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*> >(void*) + 92
10  libsystem_pthread.dylib         0x000000018122f860 _pthread_body + 240
11  libsystem_pthread.dylib         0x000000018122f770 _pthread_body + 0
12  libsystem_pthread.dylib         0x000000018122cdbc thread_start + 4

Thread 4 name:  WebThread
Thread 4:
0   libsystem_kernel.dylib          0x0000000181169e64 __psynch_mutexwait + 8
1   libsystem_pthread.dylib         0x0000000181232db4 _pthread_mutex_lock_wait + 96
2   libsystem_pthread.dylib         0x0000000181232fb8 _pthread_mutex_lock_slow + 296
3   WebCore                         0x0000000186c19ef4 _WebTryThreadLock(bool) + 128
4   WebCore                         0x0000000186c2e668 SendDelegateMessage(NSInvocation*) + 744
5   WebKitLegacy                    0x0000000187d05be8 CallFrameLoadDelegate(void (*)(), WebView*, objc_selector*, objc_object*) + 120
6   WebKitLegacy                    0x0000000187cd1118 WebFrameLoaderClient::dispatchDidFinishLoad() + 172
7   WebCore                         0x0000000186bf1e6c WebCore::FrameLoader::checkLoadCompleteForThisFrame() + 2136
8   WebCore                         0x0000000186bf14ec WebCore::FrameLoader::checkLoadComplete() + 372
9   WebCore                         0x0000000186c1f5cc WebCore::DocumentLoader::finishedLoading(double) + 388
10  WebCore                         0x0000000186c42a18 WebCore::DocumentLoader::continueAfterContentPolicy(WebCore::PolicyAction) + 1800
11  WebCore                         0x0000000186c41a3c WebCore::DocumentLoader::responseReceived(WebCore::CachedResource*, WebCore::ResourceResponse const&) + 2024
12  WebCore                         0x0000000186f80028 WebCore::DocumentLoader::handleSubstituteDataLoadNow() + 324
13  WebCore                         0x0000000186bc3bec WebCore::ThreadTimers::sharedTimerFiredInternal() + 148
14  WebCore                         0x0000000186bc3b44 WebCore::timerFired(__CFRunLoopTimer*, void*) + 28
15  CoreFoundation                  0x000000018214a8f4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
16  CoreFoundation                  0x000000018214a608 __CFRunLoopDoTimer + 872
17  CoreFoundation                  0x0000000182149ec4 __CFRunLoopDoTimers + 244
18  CoreFoundation                  0x0000000182147ac0 __CFRunLoopRun + 1572
19  CoreFoundation                  0x0000000182076048 CFRunLoopRunSpecific + 444
20  WebCore                         0x0000000186c17a2c RunWebThread(void*) + 456
21  libsystem_pthread.dylib         0x000000018122f860 _pthread_body + 240
22  libsystem_pthread.dylib         0x000000018122f770 _pthread_body + 0
23  libsystem_pthread.dylib         0x000000018122cdbc thread_start + 4

Thread 5:
0   libsystem_pthread.dylib         0x000000018122cdb0 start_wqthread + 0

Thread 6:
0   libsystem_kernel.dylib          0x000000018116aa88 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x000000018122d188 _pthread_wqthread + 968
2   libsystem_pthread.dylib         0x000000018122cdb4 start_wqthread + 4

Thread 7 name:  JIT Worklist Worker Thread
Thread 7:
0   libsystem_kernel.dylib          0x0000000181169e1c __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x000000018122e9d0 _pthread_cond_wait + 640
2   libc++.1.dylib                  0x0000000180b593ec std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56
3   JavaScriptCore                  0x0000000186906e6c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 2016
4   JavaScriptCore                  0x00000001866df9b8 JSC::JITWorklist::runThread() + 192
5   JavaScriptCore                  0x00000001866dfe08 WTF::Vector<WTF::RefPtr<JSC::JITWorklist::Plan>, 32ul, WTF::CrashOnOverflow, 16ul>::expandCapacity(unsigned long, WTF::RefPtr<JSC::JITWorklist::Plan>*) + 0
6   JavaScriptCore                  0x000000018604f35c WTF::threadEntryPoint(void*) + 212
7   JavaScriptCore                  0x000000018604f26c WTF::wtfThreadEntryPoint(void*) + 24
8   libsystem_pthread.dylib         0x000000018122f860 _pthread_body + 240
9   libsystem_pthread.dylib         0x000000018122f770 _pthread_body + 0
10  libsystem_pthread.dylib         0x000000018122cdbc thread_start + 4

Thread 8 name:  WTF Parallel Helper Thread
Thread 8:
0   libsystem_kernel.dylib          0x0000000181169e1c __psynch_cvwait + 8
1   libsystem_pthread.dylib         0x000000018122e9d0 _pthread_cond_wait + 640
2   libc++.1.dylib                  0x0000000180b593ec std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56
3   JavaScriptCore                  0x0000000186906e6c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 2016
4   JavaScriptCore                  0x0000000186906464 WTF::ParallelHelperPool::waitForClientWithTask(WTF::Locker<WTF::LockBase> const&) + 288
5   JavaScriptCore                  0x0000000186906204 WTF::ParallelHelperPool::helperThreadBody() + 76
6   JavaScriptCore                  0x000000018604f35c WTF::threadEntryPoint(void*) + 212
7   JavaScriptCore                  0x000000018604f26c WTF::wtfThreadEntryPoint(void*) + 24
8   libsystem_pthread.dylib         0x000000018122f860 _pthread_body + 240
9   libsystem_pthread.dylib         0x000000018122f770 _pthread_body + 0
10  libsystem_pthread.dylib         0x000000018122cdbc thread_start + 4

0 个答案:

没有答案