SwiftUI On Device EXC_BAD_ACCESS Overflow

Hi All,


Im getting what appears to be a Stack Overflow whenever compiling SwiftUI on device. It works just fine in simulator or in preview window. However when attempting to build on device it crashes with:


EXC_BAD_ACCESS (code=1, address=0xfffffffffffff8c0)


You can see the logs here:


objc[17195]: Class _BackdropLayer is implemented in both /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TimerSupport.framework/TimerSupport (0x13239b5e8) and /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/SwiftUI.framework/SwiftUI (0x106a8a468). One of the two will be used. Which one is undefined.
objc[17195]: Class _NoAnimationDelegate is implemented in both /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TimerSupport.framework/TimerSupport (0x13239b638) and /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/SwiftUI.framework/SwiftUI (0x106a8a4b8). One of the two will be used. Which one is undefined.
objc[17195]: Class _TSHostingViewInvocationTarget is implemented in both /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TimerSupport.framework/TimerSupport (0x13239b688) and /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/SwiftUI.framework/SwiftUI (0x106a8a508). One of the two will be used. Which one is undefined.
objc[17195]: Class AmberEnvironmentWrapper is implemented in both /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TimerSupport.framework/TimerSupport (0x13239c2a8) and /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/SwiftUI.framework/SwiftUI (0x106a8b128). One of the two will be used. Which one is undefined.
2019-06-30 21:28:07.706521+0200 feastorfast[17195:1368700] [general] CFLocaleCopyCurrent() failed to look up current locale via 'AppleLocale' and 'AppleLanguages' in user preferences; falling back to locale identifier 'en_US' as the default. Consider checking Console for sandbox violations from this process for reading from preferences, or enabling CoreFoundation debug logging for more information. This will only be logged once.
2019-06-30 21:28:07.829753+0200 feastorfast[17195:1361315] [Assert] COMPATIBILITY BUG IN CLIENT OF UIKIT: Moving method canvasToolbar from UICanvas to UIWindowScene
2019-06-30 21:28:07.832398+0200 feastorfast[17195:1361315] [Assert] Registering Canvas Component Class _UICanvasUserActivityManager, please update to Frame Components
2019-06-30 21:28:07.851213+0200 feastorfast[17195:1361315] [Assert] Calling deprecated SPI on UICanvas. This method and class will dissapear prior to GM
2019-06-30 21:28:07.865769+0200 feastorfast[17195:1361315] [TraitCollection] Class _UISheetPresentationController overrides the -traitCollection getter, which is not supported. If you're trying to override traits, you must use the appropriate API.
2019-06-30 21:28:07.865921+0200 feastorfast[17195:1361315] [TraitCollection] Class _UIRootPresentationController overrides the -traitCollection getter, which is not supported. If you're trying to override traits, you must use the appropriate API.
2019-06-30 21:28:07.962586+0200 feastorfast[17195:1361315] [TraitCollection] Class UIPopoverPresentationController overrides the -traitCollection getter, which is not supported. If you're trying to override traits, you must use the appropriate API.
2019-06-30 21:28:08.079954+0200 feastorfast[17195:1361315] [Assert] Calling deprecated SPI on UICanvas. This method and class will dissapear prior to GM
2019-06-30 21:28:10.163407+0200 feastorfast[17195:1361315] [WindowServer] display_timer_callback: unexpected state (now:c99df0fa15e < expected:c99e00aaa9c)


Any feedback would be greatly appreciated

Sounds a bit like this error:

https://forums.developer.apple.com/thread/118356?q=EXC_BAD_ACCESS*


In this case, this might be a bug.

SwiftUI On Device EXC_BAD_ACCESS Overflow
 
 
Q