Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

EXC_BAD_ACCESS (SIGSEGV) when loading a scene

Discussion in 'iOS and tvOS' started by Vipatronon, Jul 16, 2019.

  1. Vipatronon


    Aug 23, 2016
    Hi there!

    Here in the company I work for, we're developing an application that is meant to be a hub for several minigames. All of the minigames are included into the main application after the user installed the app through AssetBundle, which is downloaded directly from our servers

    All minigames are developed in different Unity Projects, therefore they doesn't have any access to the main project until they are downloaded into the main application

    I know that isn't possible to send new scripts through Asset Bundle, so all of our scripts that the minigames could use are already compiled into the base application, which include the Bolt plugin

    Whenever the main app is open, the user has an option to download new minigames and/or update the minigames he/she has already downloaded if there is any to be updated

    When using an iOS device, whenever I try to open a minigame that has any bolt component, such as the FlowMachineattached in a GameObject for exemple, the app crashes. For Android (using Mono as script backend), Windows and Mac it works just fine

    I believe that this problem is related with Bolt, because we have minigames that does not have any bolt component and they work perfectly for Android (using Mono as script backend), iOS, Windows and Mac.

    I've tried several things in one minigame that had just one GameObject with the FlowMachine component attached to it (with and without the FlowMacro asset referenced), and thats enough to cause the crash. If the same minigame doesn't have the FlowMachine component attached, it works just fine

    To solve the problem, I've tried:

    • Change the Unity version, but never below 2018.3.2f1 due to changes in the prefab system;
    • Do the AOT prebuild (Tools>Ludiq>AOT Pre-Build);
    • Disable the Strip Engine Code option when making the build of the main application an algo when generating the AssetBundle;
    • Enable and disable the AOT Safe Mode option under Ludiq options in the Unity preferences window
    • Put some delay between loading the AssetBundle and opening the Scene
    • Include into the application base all FlowMachines that is going to be used in the minigames (doing the AOT prebuild process before generating the build for Xcode)
    • Doing the Prebuild process before generating the AssetBundle
    • Disabling the option in xcode to recompile from bitcode
    • Using Macro and embed source into the FlowMachine component

    The exception is always the same: EXC_BAD_ACCESS (SIGSEGV), always in the thread responsible for the Preload process

    According my research, this exception is related to missing references and object reference not set erros, but might be something else according with Unity

    Today I was able to reproduce this error in an Android device (using IL2CPP as script backend)

    I already contacted bolt support about this problem in this thread:

    Has anyone tried something similar or has any idea how to solve this problem?

    Bolt Version:
    Unity Version:
    .NET Version:
    .Net 4.x Equivalent - .Net Standard 2.0

    Attached Files: