Attempting to run Swift UI App on iPhone XR: Thread 1: EXC_BAD_ACCESS (code=2, address=0x100470190)

When trying to run the 'Hello World' Swift UI application on my iPhone XR, I'm getting;

"Thread 1: EXC_BAD_ACCESS (code=2, address=0x100470190)" @ Line 26 of SceneDelegate.swift.

Replies

I have the same problem with my own Watch OS app. So I tried using a fresh Hello World app and I get the same crash on my Apple Watch.

Line 23 error is 'Thread 1: EXC_BAD_ACCESS (code=1, address=0x8)'


SwiftUI`SwiftUI.Text.resolve(into: inout SwiftUI.Text._Resolved, in: SwiftUI.EnvironmentValues) -> ():

0x22b8bc80 <+0>: sub sp, sp, #0xd0 ; =0xd0

0x22b8bc84 <+4>: stp x28, x27, [sp, #0x70]

0x22b8bc88 <+8>: stp x26, x25, [sp, #0x80]

0x22b8bc8c <+12>: stp x24, x23, [sp, #0x90]

0x22b8bc90 <+16>: stp x22, x21, [sp, #0xa0]

0x22b8bc94 <+20>: stp x20, x19, [sp, #0xb0]

0x22b8bc98 <+24>: stp x29, x30, [sp, #0xc0]

0x22b8bc9c <+28>: add x29, sp, #0xc0 ; =0xc0

(line 10) 0x22b8bca0 <+32>: mov x22, x5

0x22b8bca4 <+36>: mov x28, x4

0x22b8bca8 <+40>: stp w2, w3, [sp, #0x18]

0x22b8bcac <+44>: str x1, [sp, #0x10]

0x22b8bcb0 <+48>: mov x24, x0

0x22b8bcb4 <+52>: ldr w0, [x0]

0x22b8bcb8 <+56>: ldp w27, w26, [x24, #0x4]

0x22b8bcbc <+60>: ldur d0, [x24, #0xc]

0x22b8bcc0 <+64>: str q0, [sp, #0x40]

0x22b8bcc4 <+68>: ldp w8, w25, [x24, #0x14]

(line 20) 0x22b8bcc8 <+72>: str w8, [sp, #0x8]

0x22b8bccc <+76>: ldp w23, w21, [x24, #0x1c]

0x22b8bcd0 <+80>: ldr w20, [x24, #0x24]

-> 0x22b8bcd4 <+84>: ldr w19, [x5, #0x8]

0x22b8bcd8 <+88>: str x0, [sp, #0x20]

0x22b8bcdc <+92>: bl 0x227a743c

0x22b8bce0 <+96>: stp w27, w26, [sp, #0x28]

0x22b8bce4 <+100>: mov x0, x27

0x22b8bce8 <+104>: mov x1, x26

0x22b8bcec <+108>: bl 0x22b25258 ; outlined copy of Swift.Optional<@escaping @callee_guaranteed (@guaranteed __C.CTFontDescriptorRef) -> (@owned __C.CTFontDescriptorRef)>

Tried running an Hello World app on a Xs Max, and iPad Pro (12.9 inch, 3rd generation):


class SceneDelegate: UIResponder, UIWindowSceneDelegate {


var window: UIWindow?



func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {

// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.

// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.

// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).


// Use a UIHostingController as window root view controller

let window = UIWindow(frame: UIScreen.main.bounds)

window.rootViewController = UIHostingController(rootView: ContentView())

self.window = window

window.makeKeyAndVisible() (error this line (26) Thread 1: EXC_BAD_ACCESS (code=2, address=0x10216c190)

}

I assume we'll have to wait for future betas.


In any case, I'm really excited about SwiftUI. I just never really understood all you had to do write an app before SwiftUI.

Ive got the same problem.
Even when starting a blank project, the crash happens. It seems to be a bug.

I have the same problem. I tried using Xcode 11 beta 3 and 5, both crashed when trying to run the blank "Hello World" project. Iphone X with iOS 13 beta installed.


Anyone managed to get their app running on the iphone?