HomeiOS Developmentswift - iOS app crashes with EXC_BAD_ACCESS (code=1, deal with=0x10)

swift – iOS app crashes with EXC_BAD_ACCESS (code=1, deal with=0x10)


I’ve an app with authorization. It was a single-window app, and logout button was situated on the primary web page. Now I’ve made a second settings web page and moved the logout button to the settings. And generally I get am app crash with

Thread 1: EXC_BAD_ACCESS (code=1, deal with=0x10)

It throws me at @important and would not level to any particular place within the code.

I’ve learn that reminiscence leaks might be the reason for this error, I examined my app in Devices and it did not present any leaks. I additionally tried enabling Deal with/Thread Sanitizer, Zombie Objects and nothing labored for me.

logout button code:

 Button {
   showingAlert = true
 } label: {
   Textual content("Sign off")
       .foregroundColor(.black)
       .background(Shade(ColorConstant.tabBarColor))
 }
 .alert(isPresented: $showingAlert) {
   Alert(title: Textual content("Are you positive you need to log off?"),
         message: Textual content("All of your present and future progress won't be saved"),
         primaryButton: .harmful(Textual content("Log Out")) {
             authModel.logout(exitCase: .signOut)
         },
         secondaryButton: .cancel(Textual content("Cancel")))
 }

macOS Ventura 13.0.1, Xcode 14.1, min deployment iOS 14

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments