SwiftUI crash Crashlytics reported - swiftui

I am receiving a crash to Firebase Crashlytics:
Crashed: com.apple.main-thread
0 AttributeGraph 0x5004 AG::Graph::UpdateStack::update() + 224
1 AttributeGraph 0x5518 AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 328
2 AttributeGraph 0xa718 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 360
3 AttributeGraph 0x1b3c0 AGGraphGetValue + 228
4 SwiftUI 0xa4fdc specialized DynamicBody.phase.getter + 28
5 SwiftUI 0xaada0 specialized DynamicBody.updateValue() + 56
6 SwiftUI 0x20f9c0 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 40
7 AttributeGraph 0x5108 AG::Graph::UpdateStack::update() + 484
8 AttributeGraph 0x5518 AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 328
9 AttributeGraph 0xa1a8 AG::Graph::value_ref(AG::AttributeID, AGSwiftMetadata const*, bool*) + 152
10 AttributeGraph 0x1b408 AGGraphGetValue + 300
11 SwiftUI 0x439378 ViewGraph.sizeThatFits(_:) + 212
12 SwiftUI 0x439194 ViewGraph.updateIdealSize() + 48
13 SwiftUI 0x438fc0 ViewGraph.updateOutputs(at:) + 108
14 SwiftUI 0x84eef4 closure #1 in ViewRendererHost.render(interval:updateDisplayList:) + 1332
15 SwiftUI 0x84ae68 ViewRendererHost.render(interval:updateDisplayList:) + 292
16 SwiftUI 0x3395a0 closure #1 in _UIHostingView.requestImmediateUpdate() + 68
17 SwiftUI 0x9a2190 thunk for #escaping #callee_guaranteed () -> () + 20
18 libdispatch.dylib 0x602b0 _dispatch_call_block_and_release + 24
19 libdispatch.dylib 0x61298 _dispatch_client_callout + 16
20 libdispatch.dylib 0x43430 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 872
21 CoreFoundation 0x9a998 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
22 CoreFoundation 0x94df8 __CFRunLoopRun + 2528
23 CoreFoundation 0x93ed0 CFRunLoopRunSpecific + 572
24 GraphicsServices 0x3570 GSEventRunModal + 160
25 UIKitCore 0xb302d0 -[UIApplication _run] + 1052
26 UIKitCore 0xb3584c UIApplicationMain + 164
27 SwiftUI 0x881530 closure #1 in KitRendererCommon(_:) + 108
28 SwiftUI 0x8814c0 runApp<A>(_:) + 176
29 SwiftUI 0x432870 static App.main() + 96
30 ShopmonkeyApp 0xf144 main + 4297568580 (<compiler-generated>:4297568580)
31 libdyld.dylib 0x1140 start + 4
But there is no specific place where it's crashing. Has anybody faced the same crash?

Related

Catalyst app crashes when using WheelPickerStyle()

I have a Catalyst version of my app written on SwiftUI. There is a picker which I wanted to be styled as WheelPickerStyle(). Mac Catalyst supports WheelPickerStyle():
https://developer.apple.com/documentation/swiftui/wheelpickerstyle
At launch app crashes. With other styles everything works fine.
2021-05-20 11:04:48.341319+0300 Н или НН[2745:66389] [General] UIPickerView is not supported when running Catalyst apps in the Mac idiom.
2021-05-20 11:04:48.350037+0300 Н или НН[2745:66389] [General] (
0 CoreFoundation 0x00007fff205fd87b __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff20335d92 objc_exception_throw + 48
2 UIKitCore 0x00007fff4544dc52 -[UIView(UICatalystMacIdiomUnsupported_Internal) _throwForUnsupportedNonMacIdiomBehaviorWithReason:] + 0
3 UIKitCore 0x00007fff45158fe4 -[UIPickerView _didMoveFromWindow:toWindow:] + 191
4 UIKitCore 0x00007fff44578d14 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 759
5 UIKitCore 0x00007fff4452dfa1 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 130
6 UIKitCore 0x00007fff4452de1a -[UIView(Hierarchy) _postMovedFromSuperview:] + 800
7 UIKitCore 0x00007fff4452cbcd -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1957
8 SwiftUI 0x00007fff565f2e0b $s7SwiftUI11DisplayListV11ViewUpdaterC010updateItemE033_C85E9C9D8E8767197A33852BB19DA7BELL9container4from10localStateyAE9ContainerAGLLVz_AC0H0VAE5ModelO0U0VztF + 971
9 SwiftUI 0x00007fff565f2861 $s7SwiftUI11DisplayListV11ViewUpdaterC015updateInheritedE033_C85E9C9D8E8767197A33852BB19DA7BELL9container4from11parentStateyAE9ContainerAGLLVz_AC4ItemVSPyAE5ModelO0U0VGtF + 867
10 SwiftUI 0x00007fff565f2179 $s7SwiftUI11DisplayListV11ViewUpdaterC6update33_C85E9C9D8E8767197A33852BB19DA7BELL9container4from11parentStateyAE9ContainerAGLLVz_ACSPyAE5ModelO0T0VGtF + 513
11 SwiftUI 0x00007fff565f1e5f $s7SwiftUI11DisplayListV11ViewUpdaterC6render04rootE04from4time7version10maxVersion13contentsScaleAA4TimeVSo6UIViewC_AcnC0M0VAR12CoreGraphics7CGFloatVtFANSPyAE5ModelO5StateV7GlobalsVGXEfU_ + 314
12 SwiftUI 0x00007fff565f1ce8 $s7SwiftUI11DisplayListV11ViewUpdaterC6render04rootE04from4time7version10maxVersion13contentsScaleAA4TimeVSo6UIViewC_AcnC0M0VAR12CoreGraphics7CGFloatVtF + 670
13 SwiftUI 0x00007fff566ba9ee $s7SwiftUI11DisplayListV12ViewRendererC6render04rootE04from4time8nextTime7version10maxVersion13contentsScaleAA0L0VSo6UIViewC_Ac2oC0O0VAS12CoreGraphics7CGFloatVtF + 110
14 SwiftUI 0x00007fff56277796 $s7SwiftUI14_UIHostingViewC17renderDisplayList_4time8nextTime7version10maxVersionAA0J0VAA0fG0V_A2jL0M0VANtF + 230
15 SwiftUI 0x00007fff56832579 $s7SwiftUI16ViewRendererHostPAAE6render8interval17updateDisplayListySd_SbtFyyXEfU_ + 4674
16 SwiftUI 0x00007fff5682c3f2 $s7SwiftUI16ViewRendererHostPAAE6render8interval17updateDisplayListySd_SbtF + 350
17 SwiftUI 0x00007fff5699d5e2 $s7SwiftUI14_UIHostingViewC14layoutSubviewsyyF + 241
18 SwiftUI 0x00007fff5699d600 $s7SwiftUI14_UIHostingViewC14layoutSubviewsyyFTo + 21
19 UIKitCore 0x00007fff44580013 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2925
20 QuartzCore 0x00007fff26d058d3 -[CALayer layoutSublayers] + 326
21 QuartzCore 0x00007fff26d05239 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 619
22 QuartzCore 0x00007fff26e5107f _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 655
23 QuartzCore 0x00007fff26ce70df _ZN2CA11Transaction6commitEv + 713
24 UIKitCore 0x00007fff44661e14 __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 81
25 CoreFoundation 0x00007fff20583512 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
26 CoreFoundation 0x00007fff205833c3 __CFRunLoopDoBlocks + 440
27 CoreFoundation 0x00007fff2058209d __CFRunLoopRun + 910
28 CoreFoundation 0x00007fff2058164c CFRunLoopRunSpecific + 563
29 HIToolbox 0x00007fff287bfab3 RunCurrentEventLoopInMode + 292
30 HIToolbox 0x00007fff287bf815 ReceiveNextEventCommon + 587
31 HIToolbox 0x00007fff287bf5b3 _BlockUntilNextEventMatchingListInModeWithFilter + 70
32 AppKit 0x00007fff22d826f2 _DPSNextEvent + 864
33 AppKit 0x00007fff22d80ec5 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1364
34 AppKit 0x00007fff22d73239 -[NSApplication run] + 586
35 AppKit 0x00007fff22d4747c NSApplicationMain + 816
36 AppKit 0x00007fff2303e414 _NSApplicationMainWithInfoDictionary + 16
37 UIKitMacHelper 0x00007fff3405ed47 UINSApplicationMain + 1430
38 UIKitCore 0x00007fff444cc98c UIApplicationMain + 144
39 –Э –Є–ї–Є –Э–Э 0x00000001088fee4b main + 75
40 libdyld.dylib 0x00007fff204a5f5d start + 1
41 ??? 0x0000000000000003 0x0 + 3
)
(lldb)

SwiftUI crash AttributeGraph precondition failure: invalid attribute id: 83753

I got this (not particularly helpful, in my eyes) crash message and was wondered what the usual suspect was for this/where I'm best to look? I'm getting this when I navigate using a NavigationLink to another View. I know from some research that this crash tends to have a different cause each time, but I wondered if the stack trace would give any clues?
Each crash companies about the same invalid attribute id: 83753. Any way I can track something down using this ID?
Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x1c1f2584c __pthread_kill + 8
1 libsystem_pthread.dylib 0x1de7f09e8 pthread_kill + 212
2 libsystem_c.dylib 0x19ed5c8f4 abort + 100
3 AttributeGraph 0x1bd82dc7c util::Heap::Heap(void*, unsigned long, unsigned long) + 186
4 AttributeGraph 0x1bd8269f0 AG::AttributeID::size() const + 238
5 AttributeGraph 0x1bd82d530 AGGraphGetValue + 500
6 SwiftUI 0x19c9e4eb0 ResolvedTextFilter.updateValue() + 56
7 SwiftUI 0x19c4cee34 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 20
8 AttributeGraph 0x1bd81714c AG::Graph::UpdateStack::update() + 484
9 AttributeGraph 0x1bd81755c AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 328
10 AttributeGraph 0x1bd81c1f8 AG::Graph::value_ref(AG::AttributeID, AGSwiftMetadata const*, bool*) + 152
11 AttributeGraph 0x1bd82d468 AGGraphGetValue + 300
12 SwiftUI 0x19c6321d8 ViewGraph.sizeThatFits(_:) + 212
13 SwiftUI 0x19ca285e0 closure #1 in ViewRendererHost.sizeThatFits(_:) + 52
14 SwiftUI 0x19c5d2ec4 thunk for #callee_guaranteed (#guaranteed ViewGraph) -> (#unowned CGSize) + 24
15 SwiftUI 0x19ca2687c closure #1 in ViewRendererHost.updateViewGraph<A>(body:) + 92
16 SwiftUI 0x19ca1f0b4 ViewRendererHost.updateViewGraph<A>(body:) + 88
17 SwiftUI 0x19ca25328 ViewRendererHost.sizeThatFits(_:) + 112
18 SwiftUI 0x19cb7b980 _UIHostingView.sizeThatFits(_:) + 112
19 SwiftUI 0x19cb7b9c8 #objc _UIHostingView._baselineOffsets(at:) + 48
20 UIKitCore 0x197eadbb0 -[_UITAMICAdaptorView updateForAvailableSize] + 120
21 UIKitCore 0x197eadafc -[_UITAMICAdaptorView didMoveToWindow] + 60
22 UIKitCore 0x198dcdbc0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 2016
23 UIKitCore 0x198dcd680 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 672
24 UIKitCore 0x198dcd680 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 672
25 UIKitCore 0x197ed2350 -[UINavigationBar _didMoveFromWindow:toWindow:] + 64
26 UIKitCore 0x198dc1ac8 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 136
27 UIKitCore 0x198dc19b4 -[UIView(Hierarchy) _postMovedFromSuperview:] + 748
28 UIKitCore 0x198dd0028 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 2132
29 UIKitCore 0x1981385d8 -[UILayoutContainerView addSubview:] + 64
30 UIKitCore 0x1981434a0 -[UINavigationController _unhideNavigationBarForEdge:] + 100
31 UIKitCore 0x1981436e8 -[UINavigationController _setNavigationBarHidden:edge:duration:] + 216
32 UIKitCore 0x198142d30 -[UINavigationController _setNavigationBarHidden:edgeIfNotNavigating:duration:] + 516
33 UIKitCore 0x1981416ac -[UINavigationController setNavigationBarHidden:animated:] + 156
34 SwiftUI 0x19cadace8 NavigationBridge_PhoneTV.hostingControllerWillAppear(transitionCoordinator:animated:) + 876
35 SwiftUI 0x19c53fc60 _UIHostingView.viewControllerWillAppear(transitionCoordinator:animated:) + 48
36 SwiftUI 0x19cb7fd20 UIHostingController.viewWillAppear(_:) + 116
37 SwiftUI 0x19cb7fc3c #objc UIHostingController.viewWillAppear(_:) + 40
38 UIKitCore 0x198210a4c -[UIViewController _setViewAppearState:isAnimating:] + 604
39 UIKitCore 0x1982111d0 -[UIViewController __viewWillAppear:] + 116
40 UIKitCore 0x19813f7e8 -[UINavigationController _startCustomTransition:] + 1344
41 UIKitCore 0x198153bb0 -[UINavigationController _startDeferredTransitionIfNeeded:] + 700
42 UIKitCore 0x198154fe0 -[UINavigationController __viewWillLayoutSubviews] + 164
43 UIKitCore 0x198137e78 -[UILayoutContainerView layoutSubviews] + 224
44 UIKitCore 0x198dd6398 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2468
45 QuartzCore 0x1992dbdf4 -[CALayer layoutSublayers] + 288
46 QuartzCore 0x1992e2398 CA::Layer::layout_if_needed(CA::Transaction*) + 520
47 QuartzCore 0x1992ed6e8 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 140
48 QuartzCore 0x199238d7c CA::Context::commit_transaction(CA::Transaction*, double, double*) + 416
49 QuartzCore 0x199262f40 CA::Transaction::commit() + 728
50 QuartzCore 0x1992641f0 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92
51 CoreFoundation 0x195fe087c __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
52 CoreFoundation 0x195fdaf50 __CFRunLoopDoObservers + 604
53 CoreFoundation 0x195fdb498 __CFRunLoopRun + 960
54 CoreFoundation 0x195fdaba0 CFRunLoopRunSpecific + 572
55 GraphicsServices 0x1acd43598 GSEventRunModal + 160
56 UIKitCore 0x1988cc2f4 -[UIApplication _run] + 1052
57 UIKitCore 0x1988d1874 UIApplicationMain + 164
58 SwiftUI 0x19ca5a5dc closure #1 in KitRendererCommon(_:) + 108
59 SwiftUI 0x19ca5a56c runApp<A>(_:) + 176
60 SwiftUI 0x19c62bd18 static App.main() + 96
61 ProgressioniOS 0x10077f06c static ProgressionApp.$main() (<compiler-generated>)
62 ProgressioniOS 0x10077f39c main (ProgressionApp.swift)
63 libdyld.dylib 0x195cb9568 start + 4
Any thoughts appreciated.

SwiftUI Decode HTML Entities Error: Simultaneous accesses to 0x7ff43ff29b50, but modification requires exclusive access

I get a error when i decode html entites using NSAttributedString. I use Swift 5. I want only html to string. I don't want webview.
SwiftUI Text
Text("It&#39s a party!".decoded)
String Extension
extension String {
var decoded: String {
let attr = try? NSAttributedString(data: Data(utf8), options: [
.documentType: NSAttributedString.DocumentType.html,
.characterEncoding: String.Encoding.utf8.rawValue
], documentAttributes: nil)
return attr?.string ?? self
}
}
Error Log
== AttributeGraph: cycle detected through attribute 123464 ===
=== AttributeGraph: cycle detected through attribute 143224 ===
=== AttributeGraph: cycle detected through attribute 128744 ===
Simultaneous accesses to 0x7ff43ff29b50, but modification requires exclusive access.
Previous access (a modification) started at SwiftUI`LayoutComputer.EngineDelegate.spacing() + 44 (0x7fff566b85dc).
Current access (a modification) started at:
0 libswiftCore.dylib 0x00007fff2f41fe90 swift_beginAccess + 568
1 SwiftUI 0x00007fff566b85b0 LayoutComputer.EngineDelegate.spacing() + 44
2 SwiftUI 0x00007fff56657140 accumulateSpacing #1 (ofChild:) in StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:resizeChildrenWithTrailingOverflow:) + 289
3 SwiftUI 0x00007fff56656bf0 StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:resizeChildrenWithTrailingOverflow:) + 414
4 SwiftUI 0x00007fff561d9d00 specialized ManagedBufferPointer.init(bufferClass:minimumCapacity:makingHeaderWith:) + 296
5 SwiftUI 0x00007fff561da140 specialized closure #2 in HVStack.updateLayoutComputer<A>(rule:layoutContext:children:) + 142
6 SwiftUI 0x00007fff5626cce0 specialized closure #2 in HVStack.updateLayoutComputer<A>(rule:layoutContext:children:) + 41
7 SwiftUI 0x00007fff56278590 partial apply for specialized closure #2 in HVStack.updateLayoutComputer<A>(rule:layoutContext:children:) + 43
8 SwiftUI 0x00007fff561da3e0 specialized static LayoutComputerDelegate.update<A>(_:maybeInPlace:create:) + 136
9 SwiftUI 0x00007fff56139060 specialized StatefulRule<>.updateLayoutComputer<A>(layout:environment:layoutComputers:) + 176
10 SwiftUI 0x00007fff562692a0 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 236
11 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
12 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
13 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
14 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
15 SwiftUI 0x00007fff56030ec0 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 32
16 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
17 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
18 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
19 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
20 SwiftUI 0x00007fff56438660 DynamicLayoutViewChildGeometry.childGeometries.getter + 53
21 SwiftUI 0x00007fff56438740 DynamicLayoutViewChildGeometry.updateValue() + 201
22 SwiftUI 0x00007fff5626e730 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 15
23 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
24 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
25 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
26 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
27 SwiftUI 0x00007fff55f66120 specialized UnaryChildGeometry.parentSize.getter + 28
28 SwiftUI 0x00007fff55f66920 specialized UnaryChildGeometry.value.getter + 91
29 SwiftUI 0x00007fff56035830 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 28
30 SwiftUI 0x00007fff5605a690 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 20
31 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
32 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
33 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
34 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
35 SwiftUI 0x00007fff55f66120 specialized UnaryChildGeometry.parentSize.getter + 28
36 SwiftUI 0x00007fff55f666b0 specialized UnaryChildGeometry.value.getter + 91
37 SwiftUI 0x00007fff56035830 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 28
38 SwiftUI 0x00007fff56040ed0 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 20
39 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
40 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
41 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
42 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
43 SwiftUI 0x00007fff55f66120 specialized UnaryChildGeometry.parentSize.getter + 28
44 SwiftUI 0x00007fff55f666b0 specialized UnaryChildGeometry.value.getter + 91
45 SwiftUI 0x00007fff56035830 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 28
46 SwiftUI 0x00007fff56040ed0 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 20
47 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
48 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
49 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
50 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
51 SwiftUI 0x00007fff55f66120 specialized UnaryChildGeometry.parentSize.getter + 28
52 SwiftUI 0x00007fff55f66440 specialized UnaryChildGeometry.value.getter + 91
53 SwiftUI 0x00007fff56035830 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 28
54 SwiftUI 0x00007fff5604f800 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 20
55 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
56 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
57 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
58 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
59 SwiftUI 0x00007fff55f66120 specialized UnaryChildGeometry.parentSize.getter + 28
60 SwiftUI 0x00007fff55f666b0 specialized UnaryChildGeometry.value.getter + 91
61 SwiftUI 0x00007fff56035830 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 28
62 SwiftUI 0x00007fff56040ed0 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 20
63 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
64 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
65 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
66 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
67 SwiftUI 0x00007fff56030ec0 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 55
68 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
69 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
70 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
71 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
72 SwiftUI 0x00007fff56438660 DynamicLayoutViewChildGeometry.childGeometries.getter + 53
73 SwiftUI 0x00007fff56438740 DynamicLayoutViewChildGeometry.updateValue() + 201
74 SwiftUI 0x00007fff5626e730 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 15
75 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
76 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
77 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
78 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
79 SwiftUI 0x00007fff56030ec0 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 55
80 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
81 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
82 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
83 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
84 SwiftUI 0x00007fff56033ef0 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 63
85 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
86 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
87 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
88 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
89 SwiftUI 0x00007fff568536f0 StyledTextChildGeometry.parentSize.getter + 27
90 SwiftUI 0x00007fff560324b0 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 41
91 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
92 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
93 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
94 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
95 SwiftUI 0x00007fff5608cb10 LayoutPositionQuery.localPosition.getter + 22
96 SwiftUI 0x00007fff5608cbd0 LayoutPositionQuery.updateValue() + 32
97 SwiftUI 0x00007fff5628dab0 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 15
98 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
99 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
100 AttributeGraph 0x00007fff4be8e654 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 523
101 AttributeGraph 0x00007fff4be9fcfa AGGraphGetValue + 203
102 SwiftUI 0x00007fff568cd9e0 AnimatableFrameAttribute.updateValue() + 45
103 SwiftUI 0x00007fff5628e5c0 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 15
104 AttributeGraph 0x00007fff4be8952a AG::Graph::UpdateStack::update() + 505
105 AttributeGraph 0x00007fff4be89a6a AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
106 AttributeGraph 0x00007fff4be91884 AG::Subgraph::update(unsigned int) + 781
107 SwiftUI 0x00007fff5693a5f0 GraphHost.runTransaction() + 186
108 SwiftUI 0x00007fff5640e3c0 ViewGraph.updateOutputs(at:) + 90
109 SwiftUI 0x00007fff5689a880 closure #1 in ViewRendererHost.render(interval:updateDisplayList:) + 1305
110 SwiftUI 0x00007fff5688dc20 ViewRendererHost.render(interval:updateDisplayList:) + 340
111 SwiftUI 0x00007fff56a0a640 _UIHostingView.layoutSubviews() + 241
112 SwiftUI 0x00007fff56a0a740 #objc _UIHostingView.layoutSubviews() + 21
113 UIKitCore 0x00007fff24bd69a0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2924
114 QuartzCore 0x00007fff27a7708d -[CALayer layoutSublayers] + 258
115 QuartzCore 0x00007fff27a7d402 CA::Layer::layout_if_needed(CA::Transaction*) + 575
116 QuartzCore 0x00007fff27a89358 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 65
117 QuartzCore 0x00007fff279c8f24 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 496
118 QuartzCore 0x00007fff279ffba0 CA::Transaction::commit() + 783
119 QuartzCore 0x00007fff27a0101c CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 79
120 CoreFoundation 0x00007fff2038b1d1 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
121 CoreFoundation 0x00007fff20385844 __CFRunLoopDoObservers + 547
122 CoreFoundation 0x00007fff2038548f CFRunLoopRunSpecific + 691
123 UIFoundation 0x00007fff23a483bd -[NSHTMLReader _loadUsingWebKit] + 1847
124 UIFoundation 0x00007fff23a49a13 -[NSHTMLReader attributedString] + 22
125 UIFoundation 0x00007fff239c835a _NSReadAttributedStringFromURLOrData + 9439
126 UIFoundation 0x00007fff239c8255 -[NSAttributedString(NSAttributedStringUIFoundationAdditions) initWithData:options:documentAttributes:error:] + 144
(lldb)
NSAttributedString processes the run loop when it parses HTML. You can see it at the call to CFRUnLoopRunSpecific inside of the call to initWithData:. This is a very old problem with NSAttributedString. (I think I first encountered it around OS X 10.5, but I'm sure it's older than that.)
Because it processes the run loop, all kinds of things can happen in the middle of evaluating an HTML string. Timers can fire. Delayed selectors can be called. And in SwiftUI, that means that the UI might try to update. It's a mess. And it generates race conditions inside of apparently safe code. You're actually a bit lucky that Swift catches this kind of problem and crashes. The other common symptoms are even harder to debug ("impossible" deadlocks due to code reentrance is the most common I've encountered).
The short answer is that it's not safe to use NSAttributedString to evaluate HTML synchronously. The docs don't warn you about this, and the name of the method gives no hint about it. But you can't. Some folks will tell you to just make sure you evaluate this on the main thread, but even that doesn't guarantee you won't have really bizarre reentrance bugs if you have anything else pending on the run loop.
You'll need to evaluate this string another way. For example, see Martin R's answer to How do I decode HTML entities in Swift?
For a quick example of how even running this on the main thread can get you in trouble, consider the following code:
func delayed() {
print("Should be last")
}
func dothing() {
// Run this on the next runloop
DispatchQueue.main.async { self.delayed() }
// These should print in order
print("Prints first")
print("It&#39s a party!".decoded)
}
// somewhere on the main queue. There's no background threads needed
dothing()
This outputs:
Prints first
2020-12-20 22:16:07.976101-0500 test[84698:5693517] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600000bb8520> F8BB1C28-BAE8-11D6-9C31-00039315CD46
Should be last
It's a party!
If delayed mutates any state, then things may change out from under you, even though everything is on the main thread.
(The weird error is there because I tested this in didFinishLaunching, and that means that the runloop gets processed before the app finishes launching. That's exactly the kind of bugs you get with this.)

Swift: crash at non-existing line

Hey StackOverflow detectives.
I've been pulling my hair out for a few months trying to figure out the crashes which happen at a line never exists.
In the crash log below, CustomClass.swift does exist but the line 25 doesn't.
What would be the true reason for this crash?
Hint: we run heavy processing and allocate a lot of memory (about 700MB) in the background that was written in c++, which is in OUR_CUSTOM_FRAMEWORK below.
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001934c6df0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001933e6930 pthread_kill + 228 (pthread.c:1458)
2 libsystem_c.dylib 0x0000000193374ba4 abort + 104 (abort.c:110)
3 libsystem_malloc.dylib 0x00000001933d7fdc malloc_vreport + 564 (malloc_printf.c:183)
4 libsystem_malloc.dylib 0x00000001933d81a4 malloc_report + 64 (malloc_printf.c:192)
5 libsystem_malloc.dylib 0x00000001933cbd1c free + 436 (malloc.c:1733)
6 [OUR_CUSTOM_FRAMEWORK] 0x000000010324ccf8 0x1031a4000 + 691448
7 libsystem_c.dylib 0x0000000193355164 __cxa_finalize_ranges + 416 (atexit.c:284)
8 libsystem_c.dylib 0x00000001933554a0 exit + 28 (exit.c:81)
9 UIKitCore 0x000000019782eb88 -[UIApplication _terminateWithStatus:] + 508 (UIApplication.m:6735)
10 UIKitCore 0x0000000196f97718 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 128 (_UISceneLifecycleMultiplexer.m:765)
11 UIKitCore 0x0000000196f9737c -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 220 (_UISceneLifecycleMultiplexer.m:418)
12 UIKitCore 0x0000000197824ac4 -[UIApplication workspaceShouldExit:withTransitionContext:] + 216 (UIApplication.m:3725)
13 FrontBoardServices 0x000000019893bcf8 -[FBSUIApplicationWorkspaceShim workspaceShouldExit:withTransitionContext:] + 88 (FBSUIApplicationWorkspace.m:144)
14 FrontBoardServices 0x0000000198968d68 __83-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:withAcknowledgement:]_block_invoke_2 + 80 (FBSWorkspaceScenesClient.m:281)
15 FrontBoardServices 0x000000019894debc -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240 (FBSWorkspace.m:357)
16 FrontBoardServices 0x0000000198968cf4 __83-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:withAcknowledgement:]_block_invoke + 140 (FBSWorkspaceScenesClient.m:278)
17 libdispatch.dylib 0x000000019338033c _dispatch_client_callout + 20 (object.m:495)
18 libdispatch.dylib 0x00000001933830d4 _dispatch_block_invoke_direct + 264 (queue.c:466)
19 FrontBoardServices 0x000000019898f6c4 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:173)
20 FrontBoardServices 0x000000019898f370 -[FBSSerialQueue _queue_performNextIfPossible] + 432 (FBSSerialQueue.m:216)
21 FrontBoardServices 0x000000019898f8dc -[FBSSerialQueue _performNextFromRunLoopSource] + 32 (FBSSerialQueue.m:247)
22 CoreFoundation 0x000000019365baf4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1922)
23 CoreFoundation 0x000000019365ba48 __CFRunLoopDoSource0 + 84 (CFRunLoop.c:1956)
24 CoreFoundation 0x000000019365b198 __CFRunLoopDoSources0 + 196 (CFRunLoop.c:1992)
25 CoreFoundation 0x0000000193655f38 __CFRunLoopRun + 796 (CFRunLoop.c:2882)
26 CoreFoundation 0x00000001936558f4 CFRunLoopRunSpecific + 480 (CFRunLoop.c:3192)
27 GraphicsServices 0x000000019da6c604 GSEventRunModal + 164 (GSEvent.c:2246)
28 UIKitCore 0x0000000197829358 UIApplicationMain + 1944 (UIApplication.m:4823)
29 [APPNAME] 0x0000000100d45128 main + 68 (CustomClass.swift:25)
30 libdyld.dylib 0x00000001934d12dc start + 4

EXC_BAD_ACCESS - Random AND Incomprehensible

I knew EXC_BAD_ACCESS & Zombie, and how to find it in normal way. But what I face now is very very confusing, at least to me.
Background
I have a multi-account app, in which the user can login many accounts at the same time.
The app works well with only one account on, but when the user really logins more and more accounts, the app becomes more and more vulnerable as well, crashing randomly but mostly on AppLaunch. Not 8badf00d, but EXC_BAD_ACCESS (SIGSEGV) / KERN_INVALID_ADDRESS.
Code Architecture
Objective-C - Application level, including UI.
|
Objective-C & C++ - Account Context, including login logic.
|
C++ - Net/Communication level, including sockets.
Notification & Delegation are both used between levels.
Reproduce
Double-tap the Home button, swipe the app out to kill it, then tap the app icon to relaunch it. After passing TouchId, the app will login the accounts, and randomly crash, resulting in many different crash logs. No matter the device is iPhone 6s plus or iPhone 5s/5c/5, iOS 8 or iOS 9.
The memory usage is not high, just several tens of MB.
Crash Log No.1
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000100000048
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000180b8dbd0 objc_msgSend + 16
1 CoreFoundation 0x00000001814c7fe0 -[_CFXNotificationObjectRegistration match:matching:] + 152
2 CoreFoundation 0x0000000181573704 -[_CFXNotificationNameRegistration match:observer:matching:] + 372
3 CoreFoundation 0x0000000181518778 -[_CFXNotificationRegistrar match:object:observer:enumerator:] + 1968
4 CoreFoundation 0x0000000181415894 _CFXNotificationRemoveObservers + 164
5 Foundation 0x0000000181de3510 -[NSNotificationCenter removeObserver:name:object:] + 236
6 Foundation 0x0000000181df036c -[__NSObserver dealloc] + 48
7 UIKit 0x000000018639d12c -[_UIBackdropView dealloc] + 280
8 libobjc.A.dylib 0x0000000180b95ae8 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 508
9 CoreFoundation 0x00000001813f142c _CFAutoreleasePoolPop + 28
10 UIKit 0x00000001864bdf94 _prepareForCAFlush + 352
11 UIKit 0x00000001861fe8f4 _UIApplicationHandleEventQueue + 5880
12 CoreFoundation 0x00000001814c4efc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
13 CoreFoundation 0x00000001814c4910 __CFRunLoopDoSources0 + 412
14 CoreFoundation 0x00000001814c2690 __CFRunLoopRun + 724
15 CoreFoundation 0x00000001813f1680 CFRunLoopRunSpecific + 384
16 GraphicsServices 0x0000000182900088 GSEventRunModal + 180
17 UIKit 0x0000000186268d90 UIApplicationMain + 204
18 MultiAccountApp 0x0000000100095254 main (main.m:19)
19 libdyld.dylib 0x0000000180f928b8 start + 4
Thread 1:
0 libsystem_pthread.dylib 0x000000018117501c start_wqthread + 0
Thread 2 name: Dispatch queue: com.apple.libdispatch-manager
Thread 2:
0 libsystem_kernel.dylib 0x00000001810b14fc kevent_qos + 8
1 libdispatch.dylib 0x0000000180f7494c _dispatch_mgr_invoke + 232
2 libdispatch.dylib 0x0000000180f637bc _dispatch_source_invoke + 0
Crash Log No.2
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000180b7e5f4 _class_getNonMetaClass + 212
1 libobjc.A.dylib 0x0000000180b7e5f0 _class_getNonMetaClass + 208
2 libobjc.A.dylib 0x0000000180b7accc _class_resolveMethod + 112
3 libobjc.A.dylib 0x0000000180b839a8 lookUpImpOrForward + 360
4 libobjc.A.dylib 0x0000000180b837b4 class_getInstanceMethod + 64
5 Foundation 0x0000000181e1530c +[NSObject(NSKeyValueObservingCustomization) keyPathsForValuesAffectingValueForKey:] + 236
6 Foundation 0x0000000181e14ff8 -[NSKeyValueUnnestedProperty _givenPropertiesBeingInitialized:getAffectingProperties:] + 184
7 Foundation 0x0000000181e14d14 -[NSKeyValueUnnestedProperty _initWithContainerClass:key:propertiesBeingInitialized:] + 152
8 Foundation 0x0000000181e14bec NSKeyValuePropertyForIsaAndKeyPathInner + 284
9 Foundation 0x0000000181e11508 NSKeyValuePropertyForIsaAndKeyPath + 152
10 Foundation 0x0000000181e27ddc _NSKeyValueCreateImplicitObservationInfo + 248
11 CoreData 0x0000000182fa1764 -[NSManagedObjectContext(_NSInternalNotificationHandling) _implicitObservationInfoForEntity:forResultingClass:] + 300
12 CoreData 0x0000000182fa162c -[NSManagedObject(_NSInternalMethods) _implicitObservationInfo] + 96
13 Foundation 0x0000000181de2840 -[NSObject(NSKeyValueObserverNotification) willChangeValueForKey:] + 160
14 CoreData 0x0000000183002c2c -[NSManagedObject(_NSInternalMethods) _updateFromRefreshSnapshot:includingTransients:] + 628
15 CoreData 0x0000000183015b54 -[NSManagedObjectContext(_NestedContextSupport) _copyChildObject:toParentObject:fromChildContext:] + 924
16 CoreData 0x0000000183015f70 -[NSManagedObjectContext(_NestedContextSupport) _parentProcessSaveRequest:inContext:error:] + 996
17 CoreData 0x0000000183016a44 __82-[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:]_block_invoke + 348
18 CoreData 0x0000000183018d80 internalBlockToNSManagedObjectContextPerform + 108
19 libdispatch.dylib 0x0000000180f615f0 _dispatch_client_callout + 16
20 libdispatch.dylib 0x0000000180f70c5c _dispatch_barrier_sync_f_slow_invoke + 644
21 libdispatch.dylib 0x0000000180f615f0 _dispatch_client_callout + 16
22 libdispatch.dylib 0x0000000180f66cf8 _dispatch_main_queue_callback_4CF + 1844
23 CoreFoundation 0x00000001814c4bb0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
24 CoreFoundation 0x00000001814c2a18 __CFRunLoopRun + 1628
25 CoreFoundation 0x00000001813f1680 CFRunLoopRunSpecific + 384
26 GraphicsServices 0x0000000182900088 GSEventRunModal + 180
27 UIKit 0x0000000186268d90 UIApplicationMain + 204
28 MultiAccountApp 0x0000000100085254 main (main.m:19)
29 libdyld.dylib 0x0000000180f928b8 start + 4
Thread 1:
0 libsystem_kernel.dylib 0x00000001810b0b6c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000181175530 _pthread_wqthread + 1284
2 libsystem_pthread.dylib 0x0000000181175020 start_wqthread + 4
Thread 2 name: Dispatch queue: com.apple.libdispatch-manager
Thread 2:
0 libsystem_kernel.dylib 0x00000001810b14fc kevent_qos + 8
1 libdispatch.dylib 0x0000000180f7494c _dispatch_mgr_invoke + 232
2 libdispatch.dylib 0x0000000180f637bc _dispatch_source_invoke + 0
Crash Log No.3
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000100000038
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000180b8dbd0 objc_msgSend + 16
1 QuartzCore 0x0000000183c3bad0 CA::Render::String::new_string(__CFString const*) + 36
2 QuartzCore 0x0000000183c3c46c -[CABackdropLayer _copyRenderLayer:layerFlags:commitFlags:] + 144
3 QuartzCore 0x0000000183c0ac54 CA::Context::commit_layer(CA::Layer*, unsigned int, unsigned int, void*) + 108
4 QuartzCore 0x0000000183c079cc CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 392
5 QuartzCore 0x0000000183c0795c CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 280
6 QuartzCore 0x0000000183c0795c CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 280
7 QuartzCore 0x0000000183c0795c CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 280
8 QuartzCore 0x0000000183c0795c CA::Layer::commit_if_needed(CA::Transaction*, void (*)(CA::Layer*, unsigned int, unsigned int, void*), void*) + 280
9 QuartzCore 0x0000000183c07750 x_hash_table_foreach + 72
10 QuartzCore 0x0000000183c06cc8 CA::Transaction::foreach_root(void (*)(CA::Layer*, void*), void*) + 40
11 QuartzCore 0x0000000183c050f0 CA::Context::commit_transaction(CA::Transaction*) + 1368
12 QuartzCore 0x0000000183c049dc CA::Transaction::commit() + 512
13 UIKit 0x00000001864bde20 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke_2 + 104
14 CoreFoundation 0x00000001814c4de4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
15 CoreFoundation 0x00000001814c471c __CFRunLoopDoBlocks + 308
16 CoreFoundation 0x00000001814c26a4 __CFRunLoopRun + 744
17 CoreFoundation 0x00000001813f1680 CFRunLoopRunSpecific + 384
18 GraphicsServices 0x0000000182900088 GSEventRunModal + 180
19 UIKit 0x0000000186268d90 UIApplicationMain + 204
20 MultiAccountApp 0x000000010009d254 main (main.m:19)
21 libdyld.dylib 0x0000000180f928b8 start + 4
Crash Log No.4
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000100000048
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000180b8dbd0 objc_msgSend + 16
1 CoreFoundation 0x00000001813f93e0 -[__NSArrayM dealloc] + 152
2 libobjc.A.dylib 0x0000000180b95ae8 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 508
3 CoreFoundation 0x00000001813f142c _CFAutoreleasePoolPop + 28
4 CoreFoundation 0x00000001814c2a20 __CFRunLoopRun + 1636
5 CoreFoundation 0x00000001813f1680 CFRunLoopRunSpecific + 384
6 GraphicsServices 0x0000000182900088 GSEventRunModal + 180
7 UIKit 0x0000000186268d90 UIApplicationMain + 204
8 MultiAccountApp 0x00000001000f5254 main (main.m:19)
9 libdyld.dylib 0x0000000180f928b8 start + 4
Thread 1:
0 libsystem_kernel.dylib 0x00000001810b0b6c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000181175530 _pthread_wqthread + 1284
2 libsystem_pthread.dylib 0x0000000181175020 start_wqthread + 4
Crash Log No.5
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000100000050
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000180b8dbd0 objc_msgSend + 16
1 CoreFoundation 0x00000001814c7fe0 -[_CFXNotificationObjectRegistration match:matching:] + 152
2 CoreFoundation 0x0000000181573704 -[_CFXNotificationNameRegistration match:observer:matching:] + 372
3 CoreFoundation 0x0000000181518778 -[_CFXNotificationRegistrar match:object:observer:enumerator:] + 1968
4 CoreFoundation 0x0000000181415894 _CFXNotificationRemoveObservers + 164
5 Foundation 0x0000000181de3510 -[NSNotificationCenter removeObserver:name:object:] + 236
6 UIKit 0x00000001863a0948 -[UINavigationController dealloc] + 140
7 CoreFoundation 0x00000001813f5380 -[__NSArrayI dealloc] + 80
8 UIKit 0x00000001864b0cb4 _runAfterCACommitDeferredBlocks + 616
9 UIKit 0x00000001864be030 _cleanUpAfterCAFlushAndRunDeferredBlocks + 92
10 CoreFoundation 0x00000001814c4de4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
11 CoreFoundation 0x00000001814c471c __CFRunLoopDoBlocks + 308
12 CoreFoundation 0x00000001814c26a4 __CFRunLoopRun + 744
13 CoreFoundation 0x00000001813f1680 CFRunLoopRunSpecific + 384
14 GraphicsServices 0x0000000182900088 GSEventRunModal + 180
15 UIKit 0x0000000186268d90 UIApplicationMain + 204
16 MultiAccountApp 0x0000000100099254 main (main.m:19)
17 libdyld.dylib 0x0000000180f928b8 start + 4
Though I have logs in hand, I still have no idea how to solve it. Maybe the Address Space has been dirty? Forcibly / unintentionally modified by the C++ level?
Thanks in advance.