Search code examples
iosxcodeswiftuicrashcrash-reports

Xcode Crash Report • EXC_BAD_ACCESS (SIEGSEGV) • KERN_INVALID_ADDRESS


I currently submitted a new SwiftUI app for App Review. The App got rejected with the following reason:

When tapping the More-Tab Icon, the App crashes. (Device: iPad with iOS 14.6)

Crash Report Crash Report

Problem: I tested the App multiple times and was not able to reproduce the error (even on an iPad with iOS 14.6) while Apple rejected the App two times based on the reason above.

Question: Do you have any Idea why the App always crashes on Review while working on my devices. The app supports Localization. Could this be the problem (I am based in Germany, Apple obviously in the U.S.)?


Solution

  • For reproducing the crash you could try the following steps:

    • Build the App on a real device, not just the simulator
    • Use the Release Build configuration when debugging the crash (Edit Scheme => Run => Build Configuration)
    • Make a clean build of your app, a common mistake could be having already some data in user defaults
    • The crash EXC_BAD_ACCESS mostly points to an error when setting the environment object, or accessing them in the background
    • Set the Localization to the correct region/language, as you said the U.S.
    • Check your code which will be called when the 'More' Button is tapped

    Hope that'll help you fix the crash