swiftUI app crashing when running in iOS 13.0 simulator

Behaves fine on devices and simulators with newer versions of iOS

(haven't yet found a device still at 13.0 to try it on)


There is nothing in the console, just the following error:

Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)


stackTrace (all Apple code) is shown below.


As always, any/all suggestions welcome.


thanks.


#00x00007fff2c046815 in _LayoutTraits.Dimension.init(min:ideal:max:) ()
#10x00007fff2c24a8fd in StackLayout.layoutTraits() ()
#20x00007fff2c24a7dc in StackLayout.Storage.layoutTraits() ()
#30x00007fff2bfaf2c8 in LayoutTraitsProxy.layoutTraits() ()
#40x00007fff2c24cc63 in accumulateSpacing #1 (ofChild:) in StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:) ()
#50x00007fff2c24c0a5 in StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:) ()
#60x00007fff2c24c9ad in specialized ManagedBufferPointer.init(bufferClass:minimumCapacity:makingHeaderWith:) ()
#70x00007fff2c24f11c in specialized closure #2 in HVStack.updateOutput<A>(attributeContext:layoutContext:children:) ()
#80x00007fff2c25182a in partial apply for specialized ()
#90x00007fff2c369fc7 in specialized static LayoutComputerDelegate.update<A>(_:maybeInPlace:create:) ()
#100x00007fff2c377930 in specialized static LayoutComputerDelegate.update<A>(_:maybeInPlace:create:) ()
#110x00007fff2c24a34c in specialized HVStack.updateOutput<A>(attributeContext:layoutContext:children:) ()
#120x00007fff2c24a3b0 in specialized HVStack.updateOutput<A>(attributeContext:layoutContext:children:) ()
#130x00007fff2c26804c in specialized LayoutQuery<>.update(context:) ()
#140x00007fff2c0e5b2a in partial apply for protocol witness for static UntypedAttribute._update(_:graph:attribute:) in conformance DynamicLayoutViewChildGeometry ()
#150x00007fff2f70e429 in AG::Graph::UpdateStack::update() ()
#160x00007fff2f70e6e7 in AG::Graph::update_attribute(unsigned int, bool) ()
#170x00007fff2f711ceb in AG::Graph::input_value_ref_slow(unsigned int, unsigned int, AGTypeID, bool*) ()
#180x00007fff2bfaf2a9 in LayoutTraitsProxy.layoutTraits() ()
#190x00007fff2c24cc63 in accumulateSpacing #1 (ofChild:) in StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:) ()
#200x00007fff2c24c0a5 in StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:) ()
#210x00007fff2c24c9ad in specialized ManagedBufferPointer.init(bufferClass:minimumCapacity:makingHeaderWith:) ()
#220x00007fff2c24f11c in specialized closure #2 in HVStack.updateOutput<A>(attributeContext:layoutContext:children:) ()
#230x00007fff2c25182a in partial apply for specialized ()
#240x00007fff2c369fc7 in specialized static LayoutComputerDelegate.update<A>(_:maybeInPlace:create:) ()
#250x00007fff2c24a34c in specialized HVStack.updateOutput<A>(attributeContext:layoutContext:children:) ()
#260x00007fff2c24a220 in specialized HVStack.updateOutput<A>(attributeContext:layoutContext:children:) ()
#270x00007fff2c267eac in specialized LayoutQuery<>.update(context:) ()
#280x00007fff2c0e5b2a in partial apply for protocol witness for static UntypedAttribute._update(_:graph:attribute:) in conformance DynamicLayoutViewChildGeometry ()
#290x00007fff2f70e429 in AG::Graph::UpdateStack::update() ()
#300x00007fff2f70e6e7 in AG::Graph::update_attribute(unsigned int, bool) ()
#310x00007fff2f711ceb in AG::Graph::input_value_ref_slow(unsigned int, unsigned int, AGTypeID, bool*) ()
#320x00007fff2bfaf2a9 in LayoutTraitsProxy.layoutTraits() ()
#330x00007fff2c24cc63 in accumulateSpacing #1 (ofChild:) in StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:) ()
#340x00007fff2c24c0a5 in StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:) ()
#350x00007fff2c24c9ad in specialized ManagedBufferPointer.init(bufferClass:minimumCapacity:makingHeaderWith:) ()
#360x00007fff2c24f11c in specialized closure #2 in HVStack.updateOutput<A>(attributeContext:layoutContext:children:) ()
#370x00007fff2c25182a in partial apply for specialized ()
#380x00007fff2c369fc7 in specialized static LayoutComputerDelegate.update<A>(_:maybeInPlace:create:) ()
#390x00007fff2c377930 in specialized static LayoutComputerDelegate.update<A>(_:maybeInPlace:create:) ()
#400x00007fff2c24a34c in specialized HVStack.updateOutput<A>(attributeContext:layoutContext:children:) ()
#410x00007fff2c24a3b0 in specialized HVStack.updateOutput<A>(attributeContext:layoutContext:children:) ()
#420x00007fff2c26804c in specialized LayoutQuery<>.update(context:) ()
#430x00007fff2c0e5b2a in partial apply for protocol witness for static UntypedAttribute._update(_:graph:attribute:) in conformance DynamicLayoutViewChildGeometry ()
#440x00007fff2f70e429 in AG::Graph::UpdateStack::update() ()
#450x00007fff2f70e6e7 in AG::Graph::update_attribute(unsigned int, bool) ()
#460x00007fff2f711ceb in AG::Graph::input_value_ref_slow(unsigned int, unsigned int, AGTypeID, bool*) ()
#470x00007fff2c4b2f2b in _ZStackLayout.layoutTraits(in:children:) ()
#480x00007fff2c26a673 in specialized _LayoutEngine.init(layout:layoutContext:children:) ()
#490x00007fff2c4fa650 in specialized _Layout<>.updateOutput<A>(attributeContext:layoutContext:children:) ()
#500x00007fff2c4fa594 in specialized _Layout<>.updateOutput<A>(attributeContext:layoutContext:children:) ()
#510x00007fff2c2682b4 in specialized LayoutQuery<>.update(context:) ()
#520x00007fff2c0e5b2a in partial apply for protocol witness for static UntypedAttribute._update(_:graph:attribute:) in conformance DynamicLayoutViewChildGeometry ()
#530x00007fff2f70e429 in AG::Graph::UpdateStack::update() ()
#540x00007fff2f70e6e7 in AG::Graph::update_attribute(unsigned int, bool) ()
#550x00007fff2f711ceb in AG::Graph::input_value_ref_slow(unsigned int, unsigned int, AGTypeID, bool*) ()
#560x00007fff2c4b2f2b in _ZStackLayout.layoutTraits(in:children:) ()
#570x00007fff2c26a673 in specialized _LayoutEngine.init(layout:layoutContext:children:) ()
#580x00007fff2c4fa650 in specialized _Layout<>.updateOutput<A>(attributeContext:layoutContext:children:) ()
#590x00007fff2c4fa594 in specialized _Layout<>.updateOutput<A>(attributeContext:layoutContext:children:) ()
#600x00007fff2c2682b4 in specialized LayoutQuery<>.update(context:) ()
#610x00007fff2c0e5b2a in partial apply for protocol witness for static UntypedAttribute._update(_:graph:attribute:) in conformance DynamicLayoutViewChildGeometry ()
#620x00007fff2f70e429 in AG::Graph::UpdateStack::update() ()
#630x00007fff2f70e6e7 in AG::Graph::update_attribute(unsigned int, bool) ()
#640x00007fff2f713263 in AG::Subgraph::update(unsigned int) ()
#650x00007fff2c0b7110 in ViewGraph.runTransaction(in:) ()
#660x00007fff2c0b759d in closure #1 in ViewGraph.updateOutputs(at:) ()
#670x00007fff2c0b720b in ViewGraph.updateOutputs(at:) ()
#680x00007fff2c40d6ea in closure #1 in closure #1 in ViewRendererHost.render(interval:updateDisplayList:) ()
#690x00007fff2c40d46c in closure #1 in ViewRendererHost.render(interval:updateDisplayList:) ()
#700x00007fff2c40ad47 in ViewRendererHost.render(interval:updateDisplayList:) ()
#710x00007fff2c5a5472 in _UIHostingView.layoutSubviews() ()
#720x00007fff2c5a5495 in @objc _UIHostingView.layoutSubviews() ()
#730x00007fff47636722 in -[UIView(CALayerDelegate) layoutSublayersOfLayer:] ()
#740x00007fff2b030ef9 in -[CALayer layoutSublayers] ()
#750x00007fff2b0358ff in CA::Layer::layout_if_needed(CA::Transaction*) ()
#760x00007fff2b041fe4 in CA::Layer::layout_and_display_if_needed(CA::Transaction*) ()
#770x00007fff2af8a4a8 in CA::Context::commit_transaction(CA::Transaction*, double) ()
#780x00007fff2afbfab3 in CA::Transaction::commit() ()
#790x00007fff4717a1e1 in __34-[UIApplication _firstCommitBlock]_block_invoke_2 ()
#800x00007fff23afb8ec in __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ ()
#810x00007fff23afb058 in __CFRunLoopDoBlocks ()
#820x00007fff23af5ee4 in __CFRunLoopRun ()
#830x00007fff23af56b6 in CFRunLoopRunSpecific ()
#840x00007fff3815cbb0 in GSEventRunModal ()
#850x00007fff47162a67 in UIApplicationMain ()

Is ViewGraph an Apple View ? May be it is an internal graph for views dependency.

If so, have you an idea where it is called ?

Could you show your complete project so that one can try to replicate ?


If not, could you provide its code ?


But that could well be a 13.0 simulator bug…

Is it possible to attach a complete project? I've never had any success doing this.

I have a vague memory of attempting to add an attachment here, and my post being stuck forever waiting for a moderator. Since then, I've tried to not include links/attachments.

any time I tried to isolate the element that might be causing the problem, the problem disappeared. my full project has (I think) too complex a view hierarchy to include in-line.

You cannot post here.


You can either:

- post on a site and give the url (need to edit as h ttps://

- post your email for a minute and continue exchange later by mail with someone who will reply to this mail to provide his or hers.

swiftUI app crashing when running in iOS 13.0 simulator
 
 
Q