Fruta sample crashes when compact on iPad Pro 12.9" and selecting a row

Originator:indiekiduk
Number:rdar://FB7756438 Date Originated:23/6/20
Status:Open Resolved:No
Product:Sample code Product Version:Xcode 12b1
Classification:Crash Reproducible:Always
 
Basic information
Please provide a descriptive title for your feedback:
Fruta sample crashes when compact on iPad Pro 12.9" and selecting a row
Which area are you seeing an issue with?
Sample Code
What type of feedback are you reporting?
Application Crash
Is this Feedback related to a Lab, Engineering Session, or Forum Topic from WWDC20?
Yes, an Engineering Session
Please provide the session title:
10637: Platforms State of the Union
Description
Please describe the issue:
I discovered a crash in the Fruta sample from https://developer.apple.com/documentation/swiftui/fruta_building_a_feature-rich_app_with_swiftui

When ran on iPad 12.9" in compact using the OS multi-tasking split view it crashes when selecting a row. This crash doesn't happen on iPhone or on iPad Pro 11" in compact.
Please list the steps you took to reproduce the issue:
Launch the Frutua sample app on iPad 12.9" simulator.
Drag on messages from the dock to right side of split view.
Adjust split so Frutua is in compact.
Select the top row "Berry Blue" as in the attached screenshot.
What did you expect to happen?
A view should push on.
What actually happened?
App crashes with Thread 1: EXC_BAD_ACCESS (code=1, address=0x47)

(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x47)
  * frame #0: 0x00007fff4a9b11ee AttributeGraph`AG::Graph::input_value_ref_slow(AG::data::ptr<AG::Node>, AG::AttributeID, unsigned int, AGSwiftMetadata const*, bool*, long) + 322
    frame #1: 0x00007fff4a9c22a5 AttributeGraph`AGGraphGetValue + 203
    frame #2: 0x00007fff5501ea99 SwiftUI`SwiftUI.AnimatableFrameAttribute.updateValue() -> () + 105
    frame #3: 0x00007fff54aba2ff SwiftUI`partial apply forwarder for generic specialization <SwiftUI.ViewFrame, SwiftUI.AnimatableFrameAttribute> of implicit closure #2 (Swift.UnsafeMutableRawPointer, __C.AGAttribute) -> () in implicit closure #1 (A1.Type) -> (Swift.UnsafeMutableRawPointer, __C.AGAttribute) -> () in closure #1 () -> (Swift.UnsafeMutableRawPointer, __C.AGAttribute) -> () in closure #1 (Swift.UnsafePointer<A1>) -> AttributeGraph.Attribute<A> in AttributeGraph.Attribute.init<A where A == A1.Value, A1: AttributeGraph.StatefulRule>(A1) -> AttributeGraph.Attribute<A> + 15
    frame #4: 0x00007fff4a9ac3d9 AttributeGraph`AG::Graph::UpdateStack::update() + 505
    frame #5: 0x00007fff4a9ac86f AttributeGraph`AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) + 335
    frame #6: 0x00007fff4a9b442d AttributeGraph`AG::Subgraph::update(unsigned int) + 781
    frame #7: 0x00007fff5506748a SwiftUI`SwiftUI.GraphHost.runTransaction() -> () + 186
    frame #8: 0x00007fff54bbe17a SwiftUI`SwiftUI.ViewGraph.updateOutputs(at: SwiftUI.Time) -> () + 90
    frame #9: 0x00007fff54ff238c SwiftUI`closure #1 () -> () in (extension in SwiftUI):SwiftUI.ViewRendererHost.render(interval: Swift.Double, updateDisplayList: Swift.Bool) -> () + 1308
    frame #10: 0x00007fff54ff1167 SwiftUI`(extension in SwiftUI):SwiftUI.ViewRendererHost.render(interval: Swift.Double, updateDisplayList: Swift.Bool) -> () + 343
    frame #11: 0x00007fff55102c51 SwiftUI`SwiftUI._UIHostingView.layoutSubviews() -> () + 241
    frame #12: 0x00007fff55102c75 SwiftUI`@objc SwiftUI._UIHostingView.layoutSubviews() -> () + 21
    frame #13: 0x00007fff24a74928 UIKitCore`-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2480
    frame #14: 0x00007fff2789007b QuartzCore`-[CALayer layoutSublayers] + 258
    frame #15: 0x00007fff278964d9 QuartzCore`CA::Layer::layout_if_needed(CA::Transaction*) + 575
    frame #16: 0x00007fff278a2185 QuartzCore`CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 65
    frame #17: 0x00007fff277e49cc QuartzCore`CA::Context::commit_transaction(CA::Transaction*, double, double*) + 496
    frame #18: 0x00007fff2781b61f QuartzCore`CA::Transaction::commit() + 783
    frame #19: 0x00007fff2455a87a UIKitCore`_afterCACommitHandler + 164
    frame #20: 0x00007fff203a2ab7 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
    frame #21: 0x00007fff2039d5ee CoreFoundation`__CFRunLoopDoObservers + 487
    frame #22: 0x00007fff2039db1f CoreFoundation`__CFRunLoopRun + 1137
    frame #23: 0x00007fff2039d2fa CoreFoundation`CFRunLoopRunSpecific + 538
    frame #24: 0x00007fff2b6c1db3 GraphicsServices`GSEventRunModal + 139
    frame #25: 0x00007fff2452b942 UIKitCore`-[UIApplication _run] + 912
    frame #26: 0x00007fff24530f62 UIKitCore`UIApplicationMain + 1570
    frame #27: 0x00007fff55020cc7 SwiftUI`closure #1 (Swift.UnsafeMutablePointer<Swift.Optional<Swift.UnsafeMutablePointer<Swift.Int8>>>) -> Swift.Never in SwiftUI.(KitRendererCommon in _ACC2C5639A7D76F611E170E831FCA491)(Swift.AnyObject.Type) -> Swift.Never + 119
    frame #28: 0x00007fff55020c3f SwiftUI`SwiftUI.runApp<A where A: SwiftUI.App>(A) -> Swift.Never + 143
    frame #29: 0x00007fff54bb7fdd SwiftUI`static (extension in SwiftUI):SwiftUI.App.main() -> () + 61
    frame #30: 0x0000000109a70d61 Fruta`static FrutaApp.$main(self=Fruta.FrutaApp) at <compiler-generated>:0
    frame #31: 0x0000000109a70e64 Fruta`main at FrutaApp.swift:0
    frame #32: 0x00007fff20253941 libdyld.dylib`start + 1
    frame #33: 0x00007fff20253941 libdyld.dylib`start + 1

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!