SwiftUI crash with 'AttributedGraph' - swift

I am showing a SwiftUI view with UIHostingController as part of a MapKit annotation's detailAccessoryView, and it works fine, never crashed when testing, but now that it is deployed to production, some users are reporting a crash. The crash isn't reproducible for me at this time, but this is the crash report I see repeated across different users:
[NOTE: updated below with better symbolication]
Date/Time: 2021-05-03T14:17:46.999Z
Launch Time: 2021-05-03T11:09:52Z
OS Version: iPhone OS 14.4.2 (18D70)
Report Version: 104
Exception Type: SIGABRT
Exception Codes: #0 at 0x1c0fff84c
Crashed Thread: 0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001c0fff84c 0x1c0fd8000 + 161868
1 libsystem_c.dylib 0x000000019e5668f4 0x19e4f3000 + 473332
2 AttributeGraph 0x00000001bc924c7c 0x1bc909000 + 113788
3 AttributeGraph 0x00000001bc90ab84 0x1bc909000 + 7044
4 AttributeGraph 0x00000001bc90aed0 0x1bc909000 + 7888
5 AttributeGraph 0x00000001bc90b268 0x1bc909000 + 8808
6 AttributeGraph 0x00000001bc91d7a4 0x1bc909000 + 83876
7 AttributeGraph 0x00000001bc9248f4 0x1bc909000 + 112884
8 SwiftUI 0x000000019bbcd484 0x19b9e2000 + 2012292
9 SwiftUI 0x000000019bc2f920 0x19b9e2000 + 2414880
10 SwiftUI 0x000000019bcdceb8 0x19b9e2000 + 3124920
11 AttributeGraph 0x00000001bc90e14c 0x1bc909000 + 20812
12 AttributeGraph 0x00000001bc90e55c 0x1bc909000 + 21852
13 AttributeGraph 0x00000001bc91377c 0x1bc909000 + 42876
14 AttributeGraph 0x00000001bc924420 0x1bc909000 + 111648
15 SwiftUI 0x000000019bbee6ec 0x19b9e2000 + 2148076
16 SwiftUI 0x000000019bcc5178 0x19b9e2000 + 3027320
17 AttributeGraph 0x00000001bc90e14c 0x1bc909000 + 20812
18 AttributeGraph 0x00000001bc90e55c 0x1bc909000 + 21852
19 AttributeGraph 0x00000001bc91377c 0x1bc909000 + 42876
20 AttributeGraph 0x00000001bc924420 0x1bc909000 + 111648
21 SwiftUI 0x000000019c2dd644 0x19b9e2000 + 9418308
22 SwiftUI 0x000000019bab08f0 0x19b9e2000 + 846064
....
104 SwiftUI 0x000000019c22f328 0x19b9e2000 + 8704808
105 SwiftUI 0x000000019c385980 0x19b9e2000 + 10107264
106 SwiftUI 0x000000019c3859c8 0x19b9e2000 + 10107336
107 UIKitCore 0x0000000197e56bf8 0x1975a8000 + 9104376
108 UIKitCore 0x00000001984f3214 0x1975a8000 + 16036372
109 UIKitCore 0x00000001984f3998 0x1975a8000 + 16038296
110 UIKitCore 0x00000001984f36a8 0x1975a8000 + 16037544
111 UIKitCore 0x00000001984fd160 0x1975a8000 + 16077152
112 UIKitCore 0x00000001984fbf2c 0x1975a8000 + 16072492
113 UIKitCore 0x00000001984fc3e0 0x1975a8000 + 16073696
114 UIKitCore 0x00000001984fc2c0 0x1975a8000 + 16073408
115 CoreAutoLayout 0x00000001a9e71934 0x1a9e62000 + 63796
116 UIKitCore 0x00000001984fca98 0x1975a8000 + 16075416
117 UIKitCore 0x00000001984fb4bc 0x1975a8000 + 16069820
118 UIKitCore 0x00000001984fc6e4 0x1975a8000 + 16074468
119 UIKitCore 0x00000001984fd6bc 0x1975a8000 + 16078524
120 UIKitCore 0x00000001985cce00 0x1975a8000 + 16928256
121 CJournal 0x0000000104a52894 CJournal.MapCalloutView.(setupView in _C3508C6398D3621D6045FB1C8769598A)() -> () (MapCalloutView.swift:80)
122 CJournal 0x0000000104a52aa0 function signature specialization <Arg[0] = Owned To Guaranteed> of CJournal.MapCalloutView.init(rootView: SwiftUI.AnyView) -> CJournal.MapCalloutView (MapCalloutView.swift:43)
123 CJournal 0x0000000104aab01c CJournal.CJMapsCalloutController.makeMapsCalloutView() -> __C.UIView (MapCalloutView.swift:0)
124 CJournal 0x0000000104aab070 #objc CJournal.CJMapsCalloutController.makeMapsCalloutView() -> __C.UIView (<compiler-generated>:0)
125 CJournal 0x000000010483b2a8 -[CJCustomAnnotationView setupAnnotationDetailAccessoryViewWithAddress:] (CJCustomAnnotationView.m:114)
126 CJournal 0x000000010483b154 -[CJCustomAnnotationView setupAnnotationForPersonAddress:] (CJCustomAnnotationView.m:101)
127 CJournal 0x000000010483b370 -[CJCustomAnnotationView setupAnnotationForClusterAnnotation:] (CJCustomAnnotationView.m:124)
128 CJournal 0x000000010483ad70 -[CJCustomAnnotationView configureAnnotationViewWithAnnotation:] (CJCustomAnnotationView.m:37)
129 CJournal 0x000000010483acec -[CJCustomAnnotationView initWithAnnotation:reuseIdentifier:withDefaultColor:withCalloutDelegate:] (CJCustomAnnotationView.m:29)
130 CJournal 0x00000001048f4f74 -[MapViewShared annotationViewForMap:forAnnotation:withCalloutDelegate:] (MapViewShared.m:62)
131 CJournal 0x00000001049194f4 -[MapViewController mapView:viewForAnnotation:] (MapViewController.m:688)
132 MapKit 0x00000001a4c36638 0x1a4c2e000 + 34360
133 MapKit 0x00000001a4c31438 0x1a4c2e000 + 13368
134 MapKit 0x00000001a4d2c428 0x1a4c2e000 + 1041448
135 MapKit 0x00000001a4c651a8 0x1a4c2e000 + 225704
136 MapKit 0x00000001a4e2c314 0x1a4c2e000 + 2089748
137 CoreFoundation 0x00000001957d6cc8 0x195751000 + 548040
138 CoreFoundation 0x0000000195753604 0x195751000 + 9732
139 MapKit 0x00000001a4c34a3c 0x1a4c2e000 + 27196
140 MapKit 0x00000001a4e2b67c 0x1a4c2e000 + 2086524
141 MapKit 0x00000001a4c311f8 0x1a4c2e000 + 12792
142 MapKit 0x00000001a4c30440 0x1a4c2e000 + 9280
143 MapKit 0x00000001a4c6344c 0x1a4c2e000 + 218188
144 VectorKit 0x00000001a4fd647c 0x1a4ee8000 + 975996
145 VectorKit 0x00000001a4f8766c 0x1a4ee8000 + 652908
146 VectorKit 0x00000001a4f87a5c 0x1a4ee8000 + 653916
147 VectorKit 0x00000001a4f87b58 0x1a4ee8000 + 654168
148 VectorKit 0x00000001a4f02814 0x1a4ee8000 + 108564
149 VectorKit 0x00000001a4f03630 0x1a4ee8000 + 112176
150 VectorKit 0x00000001a523b6c4 0x1a4ee8000 + 3487428
151 VectorKit 0x00000001a5236240 0x1a4ee8000 + 3465792
152 VectorKit 0x00000001a536768c 0x1a4ee8000 + 4716172
153 VectorKit 0x00000001a536765c 0x1a4ee8000 + 4716124
154 VectorKit 0x00000001a54f5524 0x1a4ee8000 + 6346020
155 VectorKit 0x00000001a523bcf4 0x1a4ee8000 + 3489012
156 VectorKit 0x00000001a5239b70 0x1a4ee8000 + 3480432
157 VectorKit 0x00000001a54ee4e4 0x1a4ee8000 + 6317284
158 VectorKit 0x00000001a54ee048 0x1a4ee8000 + 6316104
159 QuartzCore 0x00000001989a3640 0x198990000 + 79424
160 IOKit 0x000000019ffe4464 0x19ffdd000 + 29796
161 CoreFoundation 0x00000001957c8b54 0x195751000 + 490324
162 CoreFoundation 0x00000001957ec420 0x195751000 + 635936
163 CoreFoundation 0x00000001957eb834 0x195751000 + 632884
164 CoreFoundation 0x00000001957e59f4 0x195751000 + 608756
165 CoreFoundation 0x00000001957e4ba0 0x195751000 + 605088
166 GraphicsServices 0x00000001ac54a598 0x1ac547000 + 13720
167 UIKitCore 0x00000001980d62f4 0x1975a8000 + 11723508
168 UIKitCore 0x00000001980db874 0x1975a8000 + 11745396
169 CJournal 0x00000001047b9708 main (main.m:20)
170 libdyld.dylib 0x00000001954c3568 0x1954c2000 + 5480
The line here is important
121 CJournal 0x0000000104a52894 CJournal.MapCalloutView.(setupView in _C3508C6398D3621D6045FB1C8769598A)() -> () (MapCalloutView.swift:80)
To show the annotation view's detailAccessoryView, I use a wrapper UIView which contains the UIHostingController which shows the SwiftUI view. At this point in the code, I call layoutIfNeeded() in the wrapper UIView, so that the view is sized correctly. I'm not sure if that is messing up the layout system or not. I can't reproduce the issue myself, so I can't really test out the theory.
Can anyone shed some light on this? This is the first time I've deployed SwiftUI code in production, so I'm not sure how to read these crash reports, or even take a concrete guess as to what might be happening here.
UPDATE:
Was able to symbolicate the rest of the crash report, including SwiftUI symbols. There seems to be a reference to AG::precondition_failure there.
Here is the better version:
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 0x00000001ba42e84c __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001d6cfc9e8 pthread_kill + 212 (pthread.c:1392)
2 libsystem_c.dylib 0x00000001972688f4 abort + 100 (abort.c:110)
3 AttributeGraph 0x00000001b5d36c7c AG::precondition_failure(char const*, ...) + 188 (ag-util.cc:51)
4 AttributeGraph 0x00000001b5d1cb84 AG::data::table::grow_region() + 288 (ag-data.cc:67)
5 AttributeGraph 0x00000001b5d1ced0 AG::data::table::alloc_page(AG::data::zone&, unsigned int) + 588 (ag-data.cc:212)
6 AttributeGraph 0x00000001b5d1d268 AG::data::zone::alloc_slow(unsigned int, unsigned int) + 228 (ag-data.cc:339)
7 AttributeGraph 0x00000001b5d1d524 AG::data::zone::alloc_bytes_recycle(unsigned int, unsigned int) + 240 (ag-data.h:417)
8 AttributeGraph 0x00000001b5d1d3b8 AG::data::zone::realloc_bytes(AG::data::ptr<void>&, unsigned int, unsigned int, unsigned int) + 112 (ag-data.cc:387)
9 AttributeGraph 0x00000001b5d25b64 AG::data::vector<AG::OutputEdge>::reserve_slow(AG::data::zone&, unsigned int) + 96 (ag-data-vector.h:191)
10 AttributeGraph 0x00000001b5d237d4 void AG::Graph::add_output_edge<AG::Node>(AG::data::ptr<AG::Node>, AG::AttributeID) + 144 (ag-data-vector.h:172)
11 AttributeGraph 0x00000001b5d2370c AG::Graph::add_input_dependencies(AG::AttributeID, AG::AttributeID) + 68 (ag-graph.cc:272)
12 AttributeGraph 0x00000001b5d24d20 AG::Graph::add_input(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AG::swift::metadata const*) + 220 (ag-graph.cc:831)
13 AttributeGraph 0x00000001b5d25700 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 256 (ag-graph.cc:1140)
14 AttributeGraph 0x00000001b5d36420 AGGraphGetValue + 228 (ag-graph-impl.h:43)
15 SwiftUI 0x0000000194a3b46c DynamicViewPhase.phase.getter + 28 (<compiler-generated>:0)
16 SwiftUI 0x0000000194a3b4c4 DynamicViewPhase.value.getter + 36 (DynamicContainer.swift:814)
17 SwiftUI 0x00000001947b34f8 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 24
18 SwiftUI 0x00000001947c27fc partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 24 (<compiler-generated>:0)
19 AttributeGraph 0x00000001b5d2014c AG::Graph::UpdateStack::update() + 484 (ag-closure.h:108)
20 AttributeGraph 0x00000001b5d2055c AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 328 (ag-graph-update.cc:563)
21 AttributeGraph 0x00000001b5d2577c AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 380 (ag-graph.cc:1161)
22 AttributeGraph 0x00000001b5d36420 AGGraphGetValue + 228 (ag-graph-impl.h:43)
23 SwiftUI 0x0000000194fdf814 MergedPhase.rhs.getter + 28 (<compiler-generated>:0)
24 SwiftUI 0x0000000194fdf888 MergedPhase.value.getter + 28 (GraphInputs.swift:286)
25 SwiftUI 0x00000001947b34f8 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 24
26 SwiftUI 0x00000001947be2bc partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 24 (<compiler-generated>:0)
27 AttributeGraph 0x00000001b5d2014c AG::Graph::UpdateStack::update() + 484 (ag-closure.h:108)
28 AttributeGraph 0x00000001b5d2055c AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 328 (ag-graph-update.cc:563)
29 AttributeGraph 0x00000001b5d2577c AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 380 (ag-graph.cc:1161)
30 AttributeGraph 0x00000001b5d36420 AGGraphGetValue + 228 (ag-graph-impl.h:43)
31 SwiftUI 0x0000000194d0d75c DynamicBody.phase.getter + 32 (<compiler-generated>:0)
32 SwiftUI 0x0000000194d0d850 DynamicBody.updateValue() + 112 (DynamicProperty.swift:261)
33 SwiftUI 0x0000000194a4194c partial apply for implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 28 (<compiler-generated>:0)
34 AttributeGraph 0x00000001b5d2014c AG::Graph::UpdateStack::update() + 484 (ag-closure.h:108)
35 AttributeGraph 0x00000001b5d2055c AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 328 (ag-graph-update.cc:563)
36 AttributeGraph 0x00000001b5d2577c AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 380 (ag-graph.cc:1161)
37 AttributeGraph 0x00000001b5d36420 AGGraphGetValue + 228 (ag-graph-impl.h:43)
38 SwiftUI 0x00000001948e880c specialized UnaryLayoutComputer.layout.getter + 20
39 SwiftUI 0x00000001948e91d8 specialized UnaryLayoutComputer.updateValue() + 104 (UnaryLayoutView.swift:217)
40 SwiftUI 0x00000001949bf990 partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 20 (<compiler-generated>:0)
41 AttributeGraph 0x00000001b5d2014c AG::Graph::UpdateStack::update() + 484 (ag-closure.h:108)
42 AttributeGraph 0x00000001b5d2055c AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 328 (ag-graph-update.cc:563)
43 AttributeGraph 0x00000001b5d2577c AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 380 (ag-graph.cc:1161)
44 AttributeGraph 0x00000001b5d36220 AGGraphGetInputValue + 268 (ag-graph-impl.h:43)
45 SwiftUI 0x0000000194a445dc LayoutProxy.layoutComputer.getter + 84 (<compiler-generated>:0)
46 SwiftUI 0x0000000194d5cdb8 accumulateSpacing #1 (ofChild:) in StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:resizeChildrenWithTrailingOverflow:) + 292 (LayoutProxy.swift:29)
47 SwiftUI 0x0000000194d5c9a8 StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:resizeChildrenWithTrailingOverflow:) + 396 (StackLayout.swift:438)
48 SwiftUI 0x0000000194936f80 specialized ManagedBufferPointer.init(bufferClass:minimumCapacity:makingHeaderWith:) + 268 (StackLayout.swift:378)
49 SwiftUI 0x00000001949373c8 specialized closure #2 in HVStack.updateLayoutComputer<A>(rule:layoutContext:children:) + 156
50 SwiftUI 0x00000001949bd298 specialized closure #2 in HVStack.updateLayoutComputer<A>(rule:layoutContext:children:) + 44
51 SwiftUI 0x00000001949c7c7c partial apply for specialized closure #2 in HVStack.updateLayoutComputer<A>(rule:layoutContext:children:) + 40
52 SwiftUI 0x000000019493766c specialized static LayoutComputerDelegate.update<A>(_:maybeInPlace:create:) + 140 (LayoutComputer.swift:304)
53 SwiftUI 0x00000001948a4580 specialized StatefulRule<>.updateLayoutComputer<A>(layout:environment:layoutComputers:) + 100
54 SwiftUI 0x00000001949b9a50 specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 212 (DynamicLayoutView.swift:277)
55 AttributeGraph 0x00000001b5d2014c AG::Graph::UpdateStack::update() + 484 (ag-closure.h:108)
56 AttributeGraph 0x00000001b5d2055c AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 328 (ag-graph-update.cc:563)
57 AttributeGraph 0x00000001b5d256e0 AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 224 (ag-graph.cc:1136)
58 AttributeGraph 0x00000001b5d36220 AGGraphGetInputValue + 268 (ag-graph-impl.h:43)
59 SwiftUI 0x0000000194a445dc LayoutProxy.layoutComputer.getter + 84 (<compiler-generated>:0)
60 SwiftUI 0x0000000194c013d8 _FlexFrameLayout.sizeThatFits(in:context:child:) + 436 (LayoutProxy.swift:46)
61 SwiftUI 0x0000000194c01630 protocol witness for UnaryLayout.sizeThatFits(in:context:child:) in conformance _FlexFrameLayout + 68 (<compiler-generated>:0)
62 SwiftUI 0x0000000194b2da3c closure #1 in UnaryLayoutEngine.sizeThatFits(_:) + 76 (UnaryLayoutView.swift:258)
63 SwiftUI 0x0000000194b2d97c UnaryLayoutEngine.sizeThatFits(_:) + 444 (StandardLibraryAdditions.swift:0)
64 SwiftUI 0x0000000194db8a20 LayoutComputer.EngineDelegate.sizeThatFits(_:) + 68 (LayoutComputer.swift:154)
65 SwiftUI 0x0000000194b2aac4 _PaddingLayout.sizeThatFits(in:context:child:) + 200 (LayoutComputer.swift:47)
66 SwiftUI 0x0000000194b2afd8 protocol witness for UnaryLayout.sizeThatFits(in:context:child:) in conformance _PaddingLayout + 40 (<compiler-generated>:0)
67 SwiftUI 0x0000000194b2da3c closure #1 in UnaryLayoutEngine.sizeThatFits(_:) + 76 (UnaryLayoutView.swift:258)
68 SwiftUI 0x0000000194b2d97c UnaryLayoutEngine.sizeThatFits(_:) + 444 (StandardLibraryAdditions.swift:0)
69 SwiftUI 0x0000000194db8a20 LayoutComputer.EngineDelegate.sizeThatFits(_:) + 68 (LayoutComputer.swift:154)
70 SwiftUI 0x0000000194b3e200 ViewGraph.sizeThatFits(_:) + 252 (LayoutComputer.swift:47)
71 SwiftUI 0x0000000194f345e0 closure #1 in ViewRendererHost.sizeThatFits(_:) + 52 (ViewRendererHost.swift:249)
72 SwiftUI 0x0000000194adeec4 thunk for #callee_guaranteed (#guaranteed ViewGraph) -> (#unowned CGSize) + 24 (<compiler-generated>:0)
73 SwiftUI 0x0000000194f3287c closure #1 in ViewRendererHost.updateViewGraph<A>(body:) + 92 (ViewRendererHost.swift:92)
74 SwiftUI 0x0000000194f2b0b4 ViewRendererHost.updateViewGraph<A>(body:) + 88 (<compiler-generated>:0)
75 SwiftUI 0x0000000194f31328 ViewRendererHost.sizeThatFits(_:) + 112 (ViewRendererHost.swift:249)
76 SwiftUI 0x0000000195087980 _UIHostingView.sizeThatFits(_:) + 112 (UIHostingView.swift:1865)
77 SwiftUI 0x00000001950879c8 #objc _UIHostingView._baselineOffsets(at:) + 48
78 UIKitCore 0x0000000190b58bf8 -[UIView(_UIConstraintBasedLayoutEmbedding) _layoutSizeThatFits:fixedAxes:] + 84 (UIView_UnifiedLayout.m:27)
79 UIKitCore 0x00000001911f5214 -[UIView(UIConstraintBasedLayout) intrinsicContentSize] + 92 (NSLayoutConstraint_UIKitAdditions.m:2112)
80 UIKitCore 0x00000001911f5998 -[UIView(UIConstraintBasedLayout) _generateContentSizeConstraints] + 52 (NSLayoutConstraint_UIKitAdditions.m:2239)
81 UIKitCore 0x00000001911f56a8 -[UIView(UIConstraintBasedLayout) _updateContentSizeConstraints] + 340 (NSLayoutConstraint_UIKitAdditions.m:2187)
82 UIKitCore 0x00000001911ff160 -[UIView(AdditionalLayoutSupport) _updateSystemConstraints] + 124 (NSLayoutConstraint_UIKitAdditions.m:4611)
83 UIKitCore 0x00000001911fdf2c -[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:] + 480 (NSLayoutConstraint_UIKitAdditions.m:0)
84 UIKitCore 0x00000001911fe3e0 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 944 (NSLayoutConstraint_UIKitAdditions.m:4412)
85 UIKitCore 0x00000001911fe2c0 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 656 (NSLayoutConstraint_UIKitAdditions.m:4393)
86 CoreAutoLayout 0x00000001a2b73934 -[NSISEngine withBehaviors:performModifications:] + 80 (NSISEngine.m:1917)
87 UIKitCore 0x00000001911fea98 __100-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:]_block_invoke + 88 (NSLayoutConstraint_UIKitAdditions.m:4458)
88 UIKitCore 0x00000001911fd4bc -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 120 (NSLayoutConstraint_UIKitAdditions.m:4157)
89 UIKitCore 0x00000001911fe6e4 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] + 160 (NSLayoutConstraint_UIKitAdditions.m:4457)
90 UIKitCore 0x00000001911ff6bc -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeededWithViewForVariableChangeNotifications:] + 428 (NSLayoutConstraint_UIKitAdditions.m:4722)
91 UIKitCore 0x00000001912cee00 -[UIView(Hierarchy) layoutBelowIfNeeded] + 860 (UIView.m:12277)
92 CJournal 0x00000001029e2894 MapCalloutView.setupView() + 948 (MapCalloutView.swift:80)
93 CJournal 0x00000001029e2aa0 specialized MapCalloutView.init(rootView:) + 320 (MapCalloutView.swift:43)
94 CJournal 0x0000000102a3b01c MapCalloutView.init(rootView:) + 8 (MapCalloutView.swift:0)
95 CJournal 0x0000000102a3b01c MapCalloutView.__allocating_init(rootView:) + 24 (CJMapsCalloutController.swift:19)
96 CJournal 0x0000000102a3b01c CJMapsCalloutController.makeMapsCalloutView() + 252
97 CJournal 0x0000000102a3b070 #objc CJMapsCalloutController.makeMapsCalloutView() + 28 (<compiler-generated>:0)
98 CJournal 0x00000001027cb2a8 -[CJCustomAnnotationView setupAnnotationDetailAccessoryViewWithAddress:] + 312 (CJCustomAnnotationView.m:114)
99 CJournal 0x00000001027cb154 -[CJCustomAnnotationView setupAnnotationForPersonAddress:] + 553300 (CJCustomAnnotationView.m:0)
100 CJournal 0x00000001027cb370 -[CJCustomAnnotationView setupAnnotationForClusterAnnotation:] + 553840 (CJCustomAnnotationView.m:0)
101 CJournal 0x00000001027cad70 -[CJCustomAnnotationView configureAnnotationViewWithAnnotation:] + 552304 (CJCustomAnnotationView.m:38)
102 CJournal 0x00000001027cacec -[CJCustomAnnotationView initWithAnnotation:reuseIdentifier:withDefaultColor:withCalloutDelegate:] + 552172 (CJCustomAnnotationView.m:32)
103 CJournal 0x0000000102884f74 -[MapViewShared annotationViewForMap:forAnnotation:withCalloutDelegate:] + 1314676 (MapViewShared.m:62)

Related

crash (iOs16) when present VNDocumentCameraViewController

With iOS 16, I have fatal error when I launch VNDocumentCameraViewController
(iPad or iPhone)
On my project, with older operating system (like iOS 14, iOS 15) I haven't got this error.
info.plist --> NSCameraUsageDescription is present with description
let myScanViewController = VNDocumentCameraViewController()
myScanViewController.delegate = self
self.present(myScanViewController, animated: false)
I's happen just after self.present and I haven't got the camera screen.
I do not know where to check and where to add a breakpoint
debug message :
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
I check the backtraces but any idea about the problem.
thank you for your help.
0 CoreFoundation 0x18add6248 __exceptionPreprocess + 164
1 libobjc.A.dylib 0x1841a3a68 objc_exception_throw + 60
2 CoreFoundation 0x18af7a6d4 -[__NSCFString characterAtIndex:].cold.1 + 0
3 CoreFoundation 0x18af77a74 -[__NSPlaceholderArray initWithCapacity:].cold.1 + 0
4 CoreFoundation 0x18add1828 -[__NSPlaceholderArray initWithObjects:count:] + 252
5 CoreFoundation 0x18add2b1c +[NSArray arrayWithObjects:count:] + 40
6 UIKitCore 0x18d387f5c +[UIImageSymbolConfiguration configurationWithHierarchicalColor:] + 124
7 UIKitCore 0x18d7ffd60 -[_UIImageCUIVectorGlyphContent _automaticSymbolConfiguration] + 104
8 UIKitCore 0x18cff6434 -[UIImageView _symbolConfigurationForImage:] + 72
9 UIKitCore 0x18cfc77cc -[UIImageView _resolvedImageFromImage:forTrait:] + 96
10 UIKitCore 0x18cf941fc -[UIImageView _resolvedImageFromImage:] + 152
11 UIKitCore 0x18cf92d5c -[UIButtonLegacyVisualProvider intrinsicSizeWithinSize:] + 132
12 UIKitCore 0x18cf92cb4 -[UIButton _intrinsicSizeWithinSize:] + 52
13 UIKitCore 0x18cfcd04c -[UIView(UIConstraintBasedLayout) intrinsicContentSize] + 120
14 UIKitCore 0x18cfcd598 -[UIButton intrinsicContentSize] + 148
15 UIKitCore 0x18cfccbe0 -[UIView _generateContentSizeConstraints] + 52
16 UIKitCore 0x18cfb74a8 -[UIView _updateContentSizeConstraints] + 244
17 UIKitCore 0x18d04b4a4 -[UIView(AdditionalLayoutSupport) _updateSystemConstraints] + 88
18 UIKitCore 0x18d0c9700 -[UIButton updateConstraints] + 72
19 UIKitCore 0x18d04b378 -[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:] + 348
20 UIKitCore 0x18d04b110 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 764
21 UIKitCore 0x18d04b02c -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 536
22 UIKitCore 0x18d04b02c -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 536
23 UIKitCore 0x18d04b02c -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 536
24 CoreAutoLayout 0x1a72a7e90 -[NSISEngine withBehaviors:performModifications:] + 84
25 UIKitCore 0x18d04ae08 __100-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:]_block_invoke + 104
26 UIKitCore 0x18cfed6e8 -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 96
27 UIKitCore 0x18cfed350 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] + 172
28 UIKitCore 0x18cfecf50 -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeededWithViewForVariableChangeNotifications:] + 388
29 UIKitCore 0x18d02cdec -[UIView(Hierarchy) layoutBelowIfNeeded] + 1064
30 DocumentCamera 0x1edf3c6c4 -[ICDocCamViewController initializeUserInterface] + 656
31 DocumentCamera 0x1edf3baa4 -[ICDocCamViewController viewDidLoad] + 1044
32 UIKitCore 0x18d2dd330 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 84
33 UIKitCore 0x18cf750a8 -[UIViewController loadViewIfRequired] + 712
34 UIKitCore 0x18d23c1bc -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 124
35 UIKitCore 0x18d1025ec -[UINavigationController _startTransition:fromViewController:toViewController:] + 196
36 UIKitCore 0x18d101aa4 -[UINavigationController _startDeferredTransitionIfNeeded:] + 608
37 UIKitCore 0x18d1010f4 -[UINavigationController __viewWillLayoutSubviews] + 96
38 UIKitCore 0x18d101058 -[UILayoutContainerView layoutSubviews] + 172
39 UIKitCore 0x18cf5ecec -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1980
40 QuartzCore 0x18c43b4e8 CA::Layer::layout_if_needed(CA::Transaction*) + 500
41 QuartzCore 0x18c44eb9c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 148
42 QuartzCore 0x18c460098 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 456
43 QuartzCore 0x18c4973c4 CA::Transaction::commit() + 652
44 QuartzCore 0x18c47e408 CA::Transaction::flush_as_runloop_observer(bool) + 88
45 CoreFoundation 0x18ae5e070 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
46 CoreFoundation 0x18ade6690 __CFRunLoopDoObservers + 532
47 CoreFoundation 0x18ae47f8c __CFRunLoopRun + 1048
48 CoreFoundation 0x18ae4d1e4 CFRunLoopRunSpecific + 612
49 GraphicsServices 0x1c3c6d368 GSEventRunModal + 164
50 UIKitCore 0x18d2fcd88 -[UIApplication _run] + 888
51 UIKitCore 0x18d2fc9ec UIApplicationMain + 340
52 digitrame 0x1019c8d88 main + 64
53 dyld 0x1a9171948 start + 2504
After deconstruct all the projet....the package SumUp (install via pod) is causing the crash....the backtraces is really not explicit about this fatal error !!!!

Swift : Crash when zoom out on map with cluster

I have a view with a map and a lot of pin. I have clustered the pin and when i zoom in to reveal the single annotation all works.
When I instead try to zoom out the app crashes.
I have this error message but i'm not so pro to understand the problem.
i searched on google and inside StackOverflow but without success.
I have already seen:
iOS : App crashes when zooming out a map
Can anyone help me?
Thank you in advance for all the answers you can give me.
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSDictionaryM setObject:forKey:]: key cannot be nil'
*** First throw call stack:
(
0 CoreFoundation 0x000000010f98b1ab __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010a909f41 objc_exception_throw + 48
2 CoreFoundatio 0x000000010f9caf9c _CFThrowFormattedException + 194
3 CoreFoundation 0x000000010f89f918 -[__NSDictionaryM setObject:forKey:] + 952
4 MapKit 0x000000010be8007a -[MKNewAnnotationContainerView _existingClusterViewsForClusterID:] + 174
5 MapKit 0x000000010be7f79c -[MKNewAnnotationContainerView addAnnotationView:allowAnimation:] + 173
6 MapKit 0x000000010bdf99f0 -[MKMapView addAnnotationRepresentation:allowAnimation:] + 727
7 MapKit 0x000000010beb6420 -[MKAnnotationManager _addRepresentationForAnnotation:] + 838
8 MapKit 0x000000010beb45b2 -[MKAnnotationManager addRepresentationsForAnnotations:] + 494
9 MapKit 0x000000010bdf1661 -[MKMapView annotationContainer:requestAddingClusterForAnnotationViews:] + 675
10 MapKit 0x000000010be80260 -[MKNewAnnotationContainerView _updateClusterableAnnotationViews:withID:] + 461
11 CoreFoundation 0x000000010f90fea2 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 226
12 MapKit 0x000000010be8125e -[MKNewAnnotationContainerView updateAnnotationViewsForReason:] + 299
13 MapKit 0x000000010bf7b17a -[MKAnnotationContainerView finishAddingAnnotationViews] + 29
14 MapKit 0x000000010bdfa315 -[MKMapView annotationManager:didAddAnnotationRepresentations:] + 53
15 MapKit 0x000000010beb5737 -[MKAnnotationManager updateVisibleAnnotations] + 1876
16 MapKit 0x000000010bde81b2 -[MKMapView _didChangeRegionMidstream:] + 223
17 MapKit 0x000000010bded5a1 -[MKMapView mapLayer:didChangeRegionAnimated:] + 79
18 VectorKit 0x0000000113e09125 -[VKMapView map:didChangeRegionAnimated:] + 122
19 VectorKit 0x0000000113e84e3b __58-[VKMapCameraController zoom:withPoint:completionHandler:]_block_invoke.145 + 62
20 VectorKit 0x0000000113e3b97d -[VKAnimation stopAnimation:] + 109
21 VectorKit 0x0000000113e3bd65 -[VKTimedAnimation stopAnimation:] + 47
22 VectorKit 0x0000000113e3be47 -[VKTimedAnimation onTimerFired:] + 47
23 VectorKit 0x0000000113db5e46 _ZN2md16AnimationManager12onTimerFiredEd + 298
24 VectorKit 0x000000011405bff1 _ZN2md9MapEngine11layoutSceneEdb + 85
25 VectorKit 0x000000011405bf85 -[_MapEngineRenderQueueSource renderQueueForTimestamp:] + 27
26 VectorKit 0x000000011411d10c -[MDDisplayLayer drawToTexture:withTimestamp:completionHandler:prepareHandler:] + 139
27 VectorKit 0x000000011427222f __33-[GGLOpenGLESLayer onTimerFired:]_block_invoke + 87
28 VectorKit 0x0000000114279ad7 _ZN3ggl10OESContext17performWhileBoundEU13block_pointerFvvE + 163
29 VectorKit 0x0000000114271ff7 -[GGLOpenGLESLayer onTimerFired:] + 111
30 VectorKit 0x000000011405f031 _ZN2md9MapEngine11renderSceneEdNSt3__18functionIFvvEEE + 93
31 VectorKit 0x000000011405d8cc _ZN2md9MapEngine18onRenderTimerFiredEd + 158
32 VectorKit 0x00000001142750f8 _ZN3ggl11DisplayLink12onTimerFiredEd + 32
33 VectorKit 0x0000000114274ffa -[_GGLDisplayLinkTarget displayLinkFired:] + 81
34 QuartzCore 0x000000010c268778 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 684
35 QuartzCore 0x000000010c3a4970 _ZL22display_timer_callbackP12__CFMachPortPvlS1_ + 248
36 CoreFoundation 0x000000010f91a9c9 __CFMachPortPerform + 169
37 CoreFoundation 0x000000010f91a909 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
38 CoreFoundation 0x000000010f91a871 __CFRunLoopDoSource1 + 465
39 CoreFoundation 0x000000010f912654 __CFRunLoopRun + 2596
40 CoreFoundation 0x000000010f9119b9 CFRunLoopRunSpecific + 409
41 GraphicsServices 0x0000000115b389c6 GSEventRunModal + 62
42 UIKit 0x000000010c523948 UIApplicationMain + 159
43 atriptoitaly 0x0000000109f3dfd7 main + 55
44 libdyld.dylib 0x0000000110ab7d81 start + 1) libc++abi.dylib: terminating with uncaught exception of type NSException
Well, looking for a solution i found this in Apple Developer Forum
https://forums.developer.apple.com/message/271061#271061
I hope it will be useful to someone

caught non-fatal NSInvalidArgumentExecption in -[NSScrollView reloadData]

I have built a document based app in swift and then I added a NSCollectionView to it with an add button next to it. The button would call a NSOpenPanel and then the icon of the item chosen should appear in the collection view. However, when I click the 'open' button in the NSOpenPanel, the following were printed to the console:
2017-01-30 19:36:54.205343 CookRecipes[5004:203650] -[NSScrollView reloadData]: unrecognized selector sent to instance 0x6180001c1770
2017-01-30 19:36:54.224746 CookRecipes[5004:203650] -[NSVBSavePanel didEndPanelWithReturnCode:] caught non-fatal NSInvalidArgumentException '-[NSScrollView reloadData]: unrecognized selector sent to instance 0x6180001c1770' with backtrace (
0 CoreFoundation 0x00007fff9e2010db __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fffb2e92a2a objc_exception_throw + 48
2 CoreFoundation 0x00007fff9e281cd4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fff9e1742a3 ___forwarding___ + 1059
4 CoreFoundation 0x00007fff9e173df8 _CF_forwarding_prep_0 + 120
5 CookRecipes 0x0000000100004239 _TFFC11CookRecipes8Document7addFileFT_T_U_FSiT_ + 457
6 CookRecipes 0x00000001000047ef _TTRXFo_dSi__XFdCb_dSi__ + 47
7 AppKit 0x00007fff9c0665e4 -[NSVBSavePanel didEndPanelWithReturnCode:] + 68
8 AppKit 0x00007fff9c6ba09d -[NSVBSavePanel completeModeless:] + 74
9 AppKit 0x00007fff9befa721 -[NSVBSavePanel observeValueForKeyPath:ofObject:change:context:] + 597
10 Foundation 0x00007fff9fbcb71d NSKeyValueNotifyObserver + 350
11 Foundation 0x00007fff9fbcafb4 NSKeyValueDidChange + 486
12 Foundation 0x00007fff9fb99e96 -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] + 118
13 ViewBridge 0x00007fffb184c066 __41-[NSViewBridge setObject:forKey:withKVO:]_block_invoke + 447
14 ViewBridge 0x00007fffb18d052b withHintInProgress + 487
15 ViewBridge 0x00007fffb184be83 -[NSViewBridge setObject:forKey:withKVO:] + 1014
16 ViewBridge 0x00007fffb184a95a -[NSViewBridge nonLocalChangeInProgress:block:] + 390
17 ViewBridge 0x00007fffb18aa260 -[NSRemoteViewMarshal exceptionSafeSetRemoteObject:forKey:withReply:] + 256
18 ViewBridge 0x00007fffb18aa3e8 -[NSRemoteViewMarshal setRemoteObject:forKey:withReply:] + 56
19 CoreFoundation 0x00007fff9e1756dc __invoking___ + 140
20 CoreFoundation 0x00007fff9e175561 -[NSInvocation invoke] + 289
21 ViewBridge 0x00007fffb18d052b withHintInProgress + 487
22 ViewBridge 0x00007fffb18d025a __deferNSXPCInvocationOntoMainThread_block_invoke_2 + 233
23 ViewBridge 0x00007fffb1851df2 +[NSViewServiceApplication withHostPID:invoke:] + 46
24 ViewBridge 0x00007fffb18d011d __deferNSXPCInvocationOntoMainThread_block_invoke + 179
25 ViewBridge 0x00007fffb18cfd0a __deferBlockOntoMainThread_block_invoke_2 + 544
26 CoreFoundation 0x00007fff9e19771c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
27 CoreFoundation 0x00007fff9e1789d4 __CFRunLoopDoBlocks + 356
28 CoreFoundation 0x00007fff9e178516 __CFRunLoopRun + 1894
29 CoreFoundation 0x00007fff9e177b54 CFRunLoopRunSpecific + 420
30 HIToolbox 0x00007fff9d702a5c RunCurrentEventLoopInMode + 240
31 HIToolbox 0x00007fff9d702891 ReceiveNextEventCommon + 432
32 HIToolbox 0x00007fff9d7026c6 _BlockUntilNextEventMatchingListInModeWithFilter + 71
33 AppKit 0x00007fff9bca85b4 _DPSNextEvent + 1120
34 AppKit 0x00007fff9c422d6b -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2789
35 AppKit 0x00007fff9bc9cf35 -[NSApplication run] + 926
36 AppKit 0x00007fff9bc67850 NSApplicationMain + 1237
37 CookRecipes 0x000000010000c344 main + 84
38 libdyld.dylib 0x00007fffb3774255 start + 1
39 ??? 0x0000000000000003 0x0 + 3
)
2017-01-30 19:36:54.239473 CookRecipes[5004:203650] -[NSVBSavePanel observeValueForKeyPath:ofObject:change:context:] caught non-fatal NSInvalidArgumentException '-[NSScrollView reloadData]: unrecognized selector sent to instance 0x6180001c1770' with backtrace (
0 CoreFoundation 0x00007fff9e2010db __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fffb2e92a2a objc_exception_throw + 48
2 CoreFoundation 0x00007fff9e281cd4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fff9e1742a3 ___forwarding___ + 1059
4 CoreFoundation 0x00007fff9e173df8 _CF_forwarding_prep_0 + 120
5 CookRecipes 0x0000000100004239 _TFFC11CookRecipes8Document7addFileFT_T_U_FSiT_ + 457
6 CookRecipes 0x00000001000047ef _TTRXFo_dSi__XFdCb_dSi__ + 47
7 AppKit 0x00007fff9c0665e4 -[NSVBSavePanel didEndPanelWithReturnCode:] + 68
8 AppKit 0x00007fff9c6ba09d -[NSVBSavePanel completeModeless:] + 74
9 AppKit 0x00007fff9befa721 -[NSVBSavePanel observeValueForKeyPath:ofObject:change:context:] + 597
10 Foundation 0x00007fff9fbcb71d NSKeyValueNotifyObserver + 350
11 Foundation 0x00007fff9fbcafb4 NSKeyValueDidChange + 486
12 Foundation 0x00007fff9fb99e96 -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] + 118
13 ViewBridge 0x00007fffb184c066 __41-[NSViewBridge setObject:forKey:withKVO:]_block_invoke + 447
14 ViewBridge 0x00007fffb18d052b withHintInProgress + 487
15 ViewBridge 0x00007fffb184be83 -[NSViewBridge setObject:forKey:withKVO:] + 1014
16 ViewBridge 0x00007fffb184a95a -[NSViewBridge nonLocalChangeInProgress:block:] + 390
17 ViewBridge 0x00007fffb18aa260 -[NSRemoteViewMarshal exceptionSafeSetRemoteObject:forKey:withReply:] + 256
18 ViewBridge 0x00007fffb18aa3e8 -[NSRemoteViewMarshal setRemoteObject:forKey:withReply:] + 56
19 CoreFoundation 0x00007fff9e1756dc __invoking___ + 140
20 CoreFoundation 0x00007fff9e175561 -[NSInvocation invoke] + 289
21 ViewBridge 0x00007fffb18d052b withHintInProgress + 487
22 ViewBridge 0x00007fffb18d025a __deferNSXPCInvocationOntoMainThread_block_invoke_2 + 233
23 ViewBridge 0x00007fffb1851df2 +[NSViewServiceApplication withHostPID:invoke:] + 46
24 ViewBridge 0x00007fffb18d011d __deferNSXPCInvocationOntoMainThread_block_invoke + 179
25 ViewBridge 0x00007fffb18cfd0a __deferBlockOntoMainThread_block_invoke_2 + 544
26 CoreFoundation 0x00007fff9e19771c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
27 CoreFoundation 0x00007fff9e1789d4 __CFRunLoopDoBlocks + 356
28 CoreFoundation 0x00007fff9e178516 __CFRunLoopRun + 1894
29 CoreFoundation 0x00007fff9e177b54 CFRunLoopRunSpecific + 420
30 HIToolbox 0x00007fff9d702a5c RunCurrentEventLoopInMode + 240
31 HIToolbox 0x00007fff9d702891 ReceiveNextEventCommon + 432
32 HIToolbox 0x00007fff9d7026c6 _BlockUntilNextEventMatchingListInModeWithFilter + 71
33 AppKit 0x00007fff9bca85b4 _DPSNextEvent + 1120
34 AppKit 0x00007fff9c422d6b -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2789
35 AppKit 0x00007fff9bc9cf35 -[NSApplication run] + 926
36 AppKit 0x00007fff9bc67850 NSApplicationMain + 1237
37 CookRecipes 0x000000010000c344 main + 84
38 libdyld.dylib 0x00007fffb3774255 start + 1
39 ??? 0x0000000000000003 0x0 + 3
)
I think that the code that the problem is in should be in this segment:
extension Document : AddAttachmentDelegate {
internal func addFile() {
let panel = NSOpenPanel()
panel.allowsMultipleSelection = false
panel.canChooseDirectories = false
panel.canChooseFiles = true
panel.begin { (result) -> Void in
if result == NSModalResponseOK, let resultURL = panel.urls.first {
do {
try self.addAttachmentAtURL(url: resultURL)
self.attachmentsList?.reloadData()
} catch let error as NSError {
if let window = self.windowForSheet {
NSApp.presentError(error, modalFor: window, delegate: nil, didPresent: nil, contextInfo: nil)
} else {
NSApp.presentError(error)
}
}
}
}
}
}
I have no idea what is going on. Hope you can help.
EDIT: attachmentsList is connected by the following:
#IBOutlet weak var attachmentsList: NSCollectionView!

Showing a view controller modally in monotouch

In my Monotouch based iOS project , i have 2 view controllers .On first ViewController i have created a button by xib.
Now on selection of this button i want to display the second view controller but it is not happening and it causes the application to crash.
So in my design.cs file this is the way the button is created
[Outlet]
MonoTouch.UIKit.UIButton firstButton { get; set; }
[Action ("clickMe:")]
partial void clickMe (MonoTouch.Foundation.NSObject sender);
This is in my button action method in .cs file, which is causing the crash.
partial void clickMe (MonoTouch.Foundation.NSObject sender)
{
SecondViewController secondViewControllerObject=new SecondViewController();
this.PresentViewController(secondViewControllerObject, true, null);
}
Error Description :-
Got a SIGABRT while executing native code.
Terminating runtime due to unhandled exception
Unhandled Exception:
0 TestingFirstProject 0x0008ebce mono_handle_exception_internal_first_pass + 2190
1 TestingFirstProject 0x00090612 mono_handle_exception_internal + 1602
2 TestingFirstProject 0x0009115f mono_handle_exception + 47
3 TestingFirstProject 0x000d42b2 mono_x86_throw_exception + 306
4 ??? 0x0b496f8f 0x0 + 189362063
5 TestingFirstProject 0x00215f38 monotouch_exception_handler + 136
6 CoreFoundation 0x013ca318 __handleUncaughtException + 728
7 libobjc.A.dylib 0x0401d0b9 _ZL15_objc_terminatev + 86
8 libc++abi.dylib 0x0435ea65 _ZL19safe_handler_callerPFvvE + 13
9 libc++abi.dylib 0x0435eacd __cxa_bad_typeid + 0
10 libc++abi.dylib 0x0435fbc2 _ZL23__gxx_exception_cleanup19_Unwind_Reason_CodeP17_Unwind_Exception + 0
11 libobjc.A.dylib 0x0401cf89 _ZL26_objc_exception_destructorPv + 0
12 CoreFoundation 0x013c9fb1 -[NSException raise] + 17
13 Foundation 0x01a08711 -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
14 Foundation 0x01989ec8 _NSSetUsingKeyValueSetter + 140
15 Foundation 0x019899b7 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
16 Foundation 0x019b4428 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
17 UIKit 0x029410cc -[UIRuntimeOutletConnection connect] + 106
18 libobjc.A.dylib 0x04030663 -[NSObject performSelector:] + 62
19 CoreFoundation 0x0133c45a -[NSArray makeObjectsPerformSelector:] + 314
20 UIKit 0x0293fbcf -[UINib instantiateWithOwner:options:] + 1327
21 UIKit 0x02804e37 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
22 UIKit 0x02805418 -[UIViewController loadView] + 302
23 UIKit 0x02805648 -[UIViewController loadViewIfRequired] + 73
24 UIKit 0x02805882 -[UIViewController view] + 33
25 UIKit 0x02811235 -[UIViewController shouldAutorotate] + 36
26 UIKit 0x02a103d2 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 1933
27 UIKit 0x0280e4f3 -[UIViewController presentViewController:withTransition:completion:] + 4521
28 UIKit 0x0280e777 -[UIViewController presentViewController:animated:completion:] + 112
at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr_bool_IntPtr (intptr,intptr,intptr,bool,intptr) <IL 0x00016, 0x00044>
at MonoTouch.UIKit.UIViewController.PresentViewController (MonoTouch.UIKit.UIViewController,bool,MonoTouch.Foundation.NSAction) [0x0006f] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIViewController.g.cs:659
at TestingFirstProject.TestingFirstProjectViewController.clickMe (MonoTouch.Foundation.NSObject) [0x00006] in /Users/rock/Desktop/Sample Project/TestingFirstProject/TestingFirstProject/TestingFirstProjectViewController.cs:41
at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <IL 0x0004b, 0x0007d>
33 TestingFirstProject 0x00009922 mono_jit_runtime_invoke + 722
34 TestingFirstProject 0x0016c4ae mono_runtime_invoke + 126
35 TestingFirstProject 0x0020f086 monotouch_trampoline + 3686
36 libobjc.A.dylib 0x04030705 -[NSObject performSelector:withObject:withObject:] + 77
37 UIKit 0x02727920 -[UIApplication sendAction:to:from:forEvent:] + 96
38 UIKit 0x027278b8 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
39 UIKit 0x027e8671 -[UIControl sendAction:to:forEvent:] + 66
40 UIKit 0x027e8bcf -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 578
41 UIKit 0x027e7d38 -[UIControl touchesEnded:withEvent:] + 546
42 UIKit 0x0275733f -[UIWindow _sendTouchesForEvent:] + 846
43 UIKit 0x02757552 -[UIWindow sendEvent:] + 273
44 UIKit 0x027353aa -[UIApplication sendEvent:] + 436
45 UIKit 0x02726cf8 _UIApplicationHandleEvent + 9874
46 GraphicsServices 0x04d0fdf9 _PurpleEventCallback + 339
47 GraphicsServices 0x04d0fad0 PurpleEventCallback + 46
48 CoreFoundation 0x012b6bf5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
49 CoreFoundation 0x012b6962 __CFRunLoopDoSource1 + 146
50 CoreFoundation 0x012e7bb6 __CFRunLoopRun + 2118
51 CoreFoundation 0x012e6f44 CFRunLoopRunSpecific + 276
52 CoreFoundation 0x012e6e1b CFRunLoopRunInMode + 123
53 GraphicsServices 0x04d0e7e3 GSEventRunModal + 88
54 GraphicsServices 0x04d0e668 GSEventRun + 104
55 UIKit 0x0272465c UIApplicationMain + 1211
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x00056, 0x000a4>
at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
at TestingFirstProject.Application.Main (string[]) [0x00000] in /Users/rock/Desktop/Sample Project/TestingFirstProject/TestingFirstProject/Main.cs:17
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00049, 0x00077>
60 TestingFirstProject 0x00009922 mono_jit_runtime_invoke + 722
61 TestingFirstProject 0x0016c4ae mono_runtime_invoke + 126
62 TestingFirstProject 0x001706a4 mono_runtime_exec_main + 420
63 TestingFirstProject 0x00175a95 mono_runtime_run_main + 725
64 TestingFirstProject 0x00066e05 mono_jit_exec + 149
65 TestingFirstProject 0x0020433d main + 2013
66 TestingFirstProject 0x00002955 start + 53
[ERROR] FATAL UNHANDLED EXCEPTION: MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSUnknownKeyException Reason: [<SecondViewController 0x12a36ca0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key butnSubmit.
at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:void_objc_msgSendSuper_IntPtr_bool_IntPtr (intptr,intptr,intptr,bool,intptr)
at MonoTouch.UIKit.UIViewController.PresentViewController (MonoTouch.UIKit.UIViewController viewControllerToPresent, Boolean animated, MonoTouch.Foundation.NSAction completionHandler) [0x0006f] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIViewController.g.cs:659
at TestingFirstProject.TestingFirstProjectViewController.clickMe (MonoTouch.Foundation.NSObject sender) [0x00006] in /Users/rock/Desktop/Sample Project/TestingFirstProject/TestingFirstProject/TestingFirstProjectViewController.cs:41
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
at TestingFirstProject.Application.Main (System.String[] args) [0x00000] in /Users/rock/Desktop/Sample Project/TestingFirstProject/TestingFirstProject/Main.cs:17
Stacktrace:
Native stacktrace:
0 TestingFirstProject 0x0009148c mono_handle_native_sigsegv + 284
1 TestingFirstProject 0x000d769d sigabrt_signal_handler + 109
2 libsystem_c.dylib 0x9a4c386b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 libsystem_sim_c.dylib 0x041e057b abort + 140
5 TestingFirstProject 0x001ea3fd monoeg_g_logv + 157
6 TestingFirstProject 0x001ea42b monoeg_assertion_message + 43
7 TestingFirstProject 0x00215e5f monotouch_unhandled_exception_handler + 159
8 TestingFirstProject 0x0008cefc mono_invoke_unhandled_exception_hook + 140
9 TestingFirstProject 0x0009100a mono_handle_exception_internal + 4154
10 TestingFirstProject 0x0009115f mono_handle_exception + 47
11 TestingFirstProject 0x000d42b2 mono_x86_throw_exception + 306
12 ??? 0x0b496f8f 0x0 + 189362063
13 TestingFirstProject 0x00215f38 monotouch_exception_handler + 136
14 CoreFoundation 0x013ca318 __handleUncaughtException + 728
15 libobjc.A.dylib 0x0401d0b9 _ZL15_objc_terminatev + 86
16 libc++abi.dylib 0x0435ea65 _ZL19safe_handler_callerPFvvE + 13
17 libc++abi.dylib 0x0435eacd __cxa_bad_typeid + 0
18 libc++abi.dylib 0x0435fbc2 _ZL23__gxx_exception_cleanup19_Unwind_Reason_CodeP17_Unwind_Exception + 0
19 libobjc.A.dylib 0x0401cf89 _ZL26_objc_exception_destructorPv + 0
20 CoreFoundation 0x013c9fb1 -[NSException raise] + 17
21 Foundation 0x01a08711 -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
22 Foundation 0x01989ec8 _NSSetUsingKeyValueSetter + 140
23 Foundation 0x019899b7 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
24 Foundation 0x019b4428 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
25 UIKit 0x029410cc -[UIRuntimeOutletConnection connect] + 106
26 libobjc.A.dylib 0x04030663 -[NSObject performSelector:] + 62
27 CoreFoundation 0x0133c45a -[NSArray makeObjectsPerformSelector:] + 314
28 UIKit 0x0293fbcf -[UINib instantiateWithOwner:options:] + 1327
29 UIKit 0x02804e37 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
30 UIKit 0x02805418 -[UIViewController loadView] + 302
31 UIKit 0x02805648 -[UIViewController loadViewIfRequired] + 73
32 UIKit 0x02805882 -[UIViewController view] + 33
33 UIKit 0x02811235 -[UIViewController shouldAutorotate] + 36
34 UIKit 0x02a103d2 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 1933
35 UIKit 0x0280e4f3 -[UIViewController presentViewController:withTransition:completion:] + 4521
36 UIKit 0x0280e777 -[UIViewController presentViewController:animated:completion:] + 112
37 ??? 0x129333bc 0x0 + 311636924
38 ??? 0x12933118 0x0 + 311636248
39 ??? 0x12932ff5 0x0 + 311635957
40 ??? 0x12931ff5 0x0 + 311631861
41 TestingFirstProject 0x00009922 mono_jit_runtime_invoke + 722
42 TestingFirstProject 0x0016c4ae mono_runtime_invoke + 126
43 TestingFirstProject 0x0020f086 monotouch_trampoline + 3686
44 libobjc.A.dylib 0x04030705 -[NSObject performSelector:withObject:withObject:] + 77
45 UIKit 0x02727920 -[UIApplication sendAction:to:from:forEvent:] + 96
46 UIKit 0x027278b8 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
47 UIKit 0x027e8671 -[UIControl sendAction:to:forEvent:] + 66
48 UIKit 0x027e8bcf -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 578
49 UIKit 0x027e7d38 -[UIControl touchesEnded:withEvent:] + 546
50 UIKit 0x0275733f -[UIWindow _sendTouchesForEvent:] + 846
51 UIKit 0x02757552 -[UIWindow sendEvent:] + 273
52 UIKit 0x027353aa -[UIApplication sendEvent:] + 436
53 UIKit 0x02726cf8 _UIApplicationHandleEvent + 9874
54 GraphicsServices 0x04d0fdf9 _PurpleEventCallback + 339
55 GraphicsServices 0x04d0fad0 PurpleEventCallback + 46
56 CoreFoundation 0x012b6bf5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
57 CoreFoundation 0x012b6962 __CFRunLoopDoSource1 + 146
58 CoreFoundation 0x012e7bb6 __CFRunLoopRun + 2118
59 CoreFoundation 0x012e6f44 CFRunLoopRunSpecific + 276
60 CoreFoundation 0x012e6e1b CFRunLoopRunInMode + 123
61 GraphicsServices 0x04d0e7e3 GSEventRunModal + 88
62 GraphicsServices 0x04d0e668 GSEventRun + 104
63 UIKit 0x0272465c UIApplicationMain + 1211
64 ??? 0x0e9ccd74 0x0 + 245157236
65 ??? 0x0e9cb3e8 0x0 + 245150696
66 ??? 0x0e9cabe8 0x0 + 245148648
67 ??? 0x0e9cac77 0x0 + 245148791
68 TestingFirstProject 0x00009922 mono_jit_runtime_invoke + 722
69 TestingFirstProject 0x0016c4ae mono_runtime_invoke + 126
70 TestingFirstProject 0x001706a4 mono_runtime_exec_main + 420
71 TestingFirstProject 0x00175a95 mono_runtime_run_main + 725
72 TestingFirstProject 0x00066e05 mono_jit_exec + 149
73 TestingFirstProject 0x0020433d main + 2013
74 TestingFirstProject 0x00002955 start + 53
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
The key bit of information in your exception is:
this class is not key value coding-compliant for the key butnSubmit
Which means that you have a property on your C# class which doesn't have a corresponding outlet in the .xib (interface builder) file.
Re-check/recreate your outlets, and see if that solves the problem.

UITextField (sometimes) crashes the app while typing

I am facing a problem with UITextField. It crashing the app (sometimes, not all the time) when I type in the UITextField. I suspect that this could be a memory issue as this happens only when I use the app continuously for 15 min. I hope I am correctly doing the memory management. And the app crashes particularly when I type something in the text field, not when doing some other action in the app. I am not sure what is causing the problem.
I've googled and found discussions about some related crashes with UITextField, but they didn't help my problem.
This is my crash log.
0 libobjc.A.dylib 0x3260a5b0 objc_msgSend + 16
1 CoreFoundation 0x32d8e034 _CFXNotificationPost + 1424
2 Foundation 0x37d93d8c -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
3 Foundation 0x37d9784e -[NSNotificationCenter postNotificationName:object:] + 26
4 UIKit 0x35a9d268 -[UITextField fieldEditorDidChange:] + 284
5 UIKit 0x35a9cac0 -[UIFieldEditor webViewDidChange:] + 76
6 CoreFoundation 0x32d8e034 _CFXNotificationPost + 1424
7 Foundation 0x37d93d8c -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
8 WebCore 0x33bee1e0 WebThreadPostNotification + 64
9 WebCore 0x33dc0d66 WebCore::Editor::appliedEditing(WTF::PassRefPtr<WebCore::CompositeEditCommand>) + 234
10 WebCore 0x33dc2efe WebCore::TypingCommand::insertTextRunWithoutNewlines(WTF::String const&, bool) + 130
11 WebCore 0x33dc2e18 WebCore::TypingCommandLineOperation::operator()(unsigned long, unsigned long, bool) const + 44
12 WebCore 0x33dc2cfa WebCore::TypingCommand::doApply() + 150
13 WebCore 0x33db84da WebCore::CompositeEditCommand::apply() + 118
14 WebCore 0x33dc2c38 WebCore::TextInsertionBaseCommand::applyTextInsertionCommand(WebCore::Frame*, WTF::PassRefPtr<WebCore::TextInsertionBaseCommand>, WebCore::VisibleSelection const&, WebCore::VisibleSelection const&) + 124
15 WebCore 0x33dc294a WebCore::TypingCommand::insertText(WebCore::Document*, WTF::String const&, WebCore::VisibleSelection const&, unsigned int, WebCore::TypingCommand::TextCompositionType) + 438
16 WebCore 0x33dc23da WebCore::Editor::insertTextWithoutSendingTextEvent(WTF::String const&, bool, WebCore::TextEvent*) + 382
17 WebCore 0x33dc2232 WebCore::Editor::handleTextEvent(WebCore::TextEvent*) + 274
18 WebCore 0x33dc2110 WebCore::EventHandler::defaultTextInputEventHandler(WebCore::TextEvent*) + 12
19 WebCore 0x33b8b7b8 WebCore::Node::defaultEventHandler(WebCore::Event*) + 244
20 WebCore 0x33b8b132 WebCore::EventDispatcher::dispatchEvent(WTF::PassRefPtr<WebCore::Event>) + 894
21 WebCore 0x33b8ad8a WebCore::EventDispatchMediator::dispatchEvent(WebCore::EventDispatcher*) const + 26
22 WebCore 0x33b8ad4e WebCore::EventDispatcher::dispatchEvent(WebCore::Node*, WTF::PassRefPtr<WebCore::EventDispatchMediator>) + 94
23 WebCore 0x33b8ac7e WebCore::Node::dispatchEvent(WTF::PassRefPtr<WebCore::Event>) + 30
24 WebCore 0x33d42d14 WebCore::EventTarget::dispatchEvent(WTF::PassRefPtr<WebCore::Event>, int&) + 68
25 WebCore 0x33dc1f26 WebCore::EventHandler::handleTextInputEvent(WTF::String const&, WebCore::Event*, WebCore::TextEventInputType) + 198
26 WebCore 0x33dc1e58 WebCore::Editor::insertText(WTF::String const&, WebCore::Event*) + 12
27 WebKit 0x3526a684 -[WebHTMLView(WebNSTextInputSupport) insertText:] + 304
28 WebCore 0x33db7206 -[WAKResponder tryToPerform:with:] + 58
29 WebKit 0x352905ea -[WebView(WebViewEditingActions) _performResponderOperation:with:] + 98
30 UIKit 0x35ad803c -[UIWebDocumentView insertText:] + 40
31 UIKit 0x35ad7ff4 -[UIKeyboardImpl insertText:] + 76
32 UIKit 0x35aa514c -[UIKeyboardImpl addInputString:fromVariantKey:] + 2816
33 UIKit 0x35aa3044 -[UIKeyboardImpl handleKeyEvent:] + 1636
34 UIKit 0x35aa28b2 -[UIKeyboardLayoutStar sendStringAction:forKey:isPopupVariant:] + 482
35 UIKit 0x35aa13a8 -[UIKeyboardLayoutStar touchUp:] + 3096
36 UIKit 0x35aa0732 -[UIKeyboardLayout touchesEnded:withEvent:] + 382
37 UIKit 0x359885f4 -[UIWindow _sendTouchesForEvent:] + 520
38 UIKit 0x35975804 -[UIApplication sendEvent:] + 376
39 UIKit 0x3597511e _UIApplicationHandleEvent + 6150
40 GraphicsServices 0x33aed5a0 _PurpleEventCallback + 588
41 CoreFoundation 0x32e12680 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
42 CoreFoundation 0x32e11ee4 __CFRunLoopDoSources0 + 208
43 CoreFoundation 0x32e10cb2 __CFRunLoopRun + 642
44 CoreFoundation 0x32d83eb8 CFRunLoopRunSpecific + 352
45 CoreFoundation 0x32d83d44 CFRunLoopRunInMode + 100
46 GraphicsServices 0x33aec2e6 GSEventRunModal + 70
47 UIKit 0x359c92fc UIApplicationMain + 1116
48 MyApp 0x00087578 0x1000 + 550264
49 MyApp 0x000030f4 0x1000 + 8436
Any help?
Thanks.
Edit: I have several text fields, in different view controllers, in my app. The app crashes randomly no matter which text text field I am typing in. And it crashes only when I type in any of the text fields. I feel that there is some other issue with UITextField.
Any ideas?
Judging by the crash log, are you hooking up some notification observers for your UITextField(s), right?
Are you cleaning up (i.e. removing the notification observers) afterwards?
In any case it is good practice to clean up afterwards.
Seems like a leak, you are sending a objc msg to some instance that doesnot conforms to the passed message.
Check whether all the delegates are assigned correctly and messaged are send to alive objects