MacOS 13 Beta 4 using XCode 14 Beta 4 Crashing, but not XCode Beta 3

MacOS 13 Beta 4 using XCode 14 Beta 4 is Crashing our development app, but XCode Beta 3 runs fine. Does anyone else have a crash log like this?

2022-07-28 05:07:55.414893+0800 The Alona Beach Guide[5821:41839] [PersistentContainerLog] /Users/alanc/Library/Developer/CoreSimulator/Devices/571FE318-968A-4741-9A9B-89D03F4A3B43/data/Containers/Data/Application/792288FC-0FB3-4844-B68E-71FF6047939D/Library/Application Support/com.codefab.TheAlonaBeachGuide/Database/Database.sqlite

2022-07-28 05:07:55.984542+0800 The Alona Beach Guide[5821:41839] *** Assertion failure in -[_TtC7SwiftUIP33_8825076C2763A50452A210CBE1FA4AF020PagingCollectionView _validateScrollingTargetIndexPath:], UICollectionView.m:7283 2022-07-28 05:07:55.994061+0800 The Alona Beach Guide[5821:41839] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempted to scroll the collection view to an out-of-bounds item (0) when there are only 0 items in section 0. Collection view: <_TtC7SwiftUIP33_8825076C2763A50452A210CBE1FA4AF020PagingCollectionView: 0x1228dc800; baseClass = UICollectionView; frame = (0 0; 428 281.333); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x600001f82070>; backgroundColor = UIExtendedGrayColorSpace 0 0; layer = <CALayer: 0x6000011ee420>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}; layout: <_TtC7SwiftUIP33_8825076C2763A50452A210CBE1FA4AF012PagingLayout: 0x12189f0e0>; dataSource: (null)>.' *** First throw call stack: ( 0 CoreFoundation 0x000000018040c858 __exceptionPreprocess + 172 1 libobjc.A.dylib 0x000000018005131c objc_exception_throw + 56 2 Foundation 0x0000000180b09108 _userInfoForFileAndLine + 0 3 UIKitCore 0x0000000111362a38 -[UICollectionView _validateScrollingTargetIndexPath:] + 408 4 UIKitCore 0x0000000111362d50 -[UICollectionView _contentOffsetForScrollingToItemAtIndexPath:atScrollPosition:] + 48 5 UIKitCore 0x00000001113638c8 -[UICollectionView _scrollToItemAtIndexPath:atScrollPosition:animated:] + 220 6 SwiftUI 0x0000000109657094 OUTLINED_FUNCTION_15 + 18072 7 SwiftUI 0x0000000109657134 OUTLINED_FUNCTION_15 + 18232 8 SwiftUI 0x0000000109656f14 OUTLINED_FUNCTION_15 + 17688 9 SwiftUI 0x0000000109656f80 OUTLINED_FUNCTION_15 + 17796 10 UIKitCore 0x0000000111fcd4a8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1920 11 QuartzCore 0x0000000187f52420 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 440 12 QuartzCore 0x0000000187f5ced8 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 128 13 QuartzCore 0x0000000187e8ea70 _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 452 14 QuartzCore 0x0000000187eba718 _ZN2CA11Transaction6commitEv + 652 15 QuartzCore 0x0000000187ebbb4c _ZN2CA11Transaction25flush_as_runloop_observerEb + 68 16 CoreFoundation 0x0000000180370a2c CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 32 17 CoreFoundation 0x000000018036b3cc __CFRunLoopDoObservers + 512 18 CoreFoundation 0x000000018036b884 __CFRunLoopRun + 968 19 CoreFoundation 0x000000018036b0a4 CFRunLoopRunSpecific + 584 20 GraphicsServices 0x00000001892dcc8c GSEventRunModal + 160 21 UIKitCore 0x0000000111b3be80 -[UIApplication _run] + 868 22 UIKitCore 0x0000000111b3fe28 UIApplicationMain + 124 23 SwiftUI 0x0000000109debfdc OUTLINED_FUNCTION_51 + 496 24 SwiftUI 0x0000000109debe84 OUTLINED_FUNCTION_51 + 152 25 SwiftUI 0x00000001095e04c4 OUTLINED_FUNCTION_6 + 92 26 The Alona Beach Guide 0x0000000100e90dac $s21The_Alona_Beach_Guide0bD3AppV5$mainyyFZ + 40 27 The Alona Beach Guide 0x0000000100e90e54 main + 12 28 dyld 0x00000001029cdfa0 start_sim + 20 29 ??? 0x0000000102b5dda8 0x0 + 4340440488 30 ??? 0x523e000000000000 0x0 + 5926174159666151424 ) libc++abi: terminating with uncaught exception of type NSException *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempted to scroll the collection view to an out-of-bounds item (0) when there are only 0 items in section 0. Collection view: <_TtC7SwiftUIP33_8825076C2763A50452A210CBE1FA4AF020PagingCollectionView: 0x1228dc800; baseClass = UICollectionView; frame = (0 0; 428 281.333); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x600001f82070>; backgroundColor = UIExtendedGrayColorSpace 0 0; layer = <CALayer: 0x6000011ee420>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}; layout: <_TtC7SwiftUIP33_8825076C2763A50452A210CBE1FA4AF012PagingLayout: 0x12189f0e0>; dataSource: (null)>.' terminating with uncaught exception of type NSException CoreSimulator 857.6 - Device: iPhone 13 Pro Max (571FE318-968A-4741-9A9B-89D03F4A3B43) - Runtime: iOS 16.0 (20A5328h) - DeviceType: iPhone 13 Pro Max

So seem to build with Xcode 14 beta 4 allows our app to get around the crash problem building for 15.4, but we still have a problem with displaying PDF files in a PDFView that is crashing the app now, we noticed Affinity designer can no longer export to PDF as that will crash the app, to probably the problem is deep in Apples private frameworks

if modelList.count > 1 { self.collectionView.scrollToItem(at: IndexPath(item: 0, section: 0), at: .left, animated: false) } else { self.collectionView.setContentOffset(CGPoint(x: 10, y: 0), animated: true) }

MacOS 13 Beta 4 using XCode 14 Beta 4 Crashing, but not XCode Beta 3
 
 
Q