Hi,
I’m running into a show stopping crash on iOS. Unity 2020.3.25f1. Trying to load scene using SceneManager.LoadScene() - even a empty scene is crashing with this stack trace:
#include <UnityFramework/UnityFramework.h>
UnityFramework* UnityFrameworkLoad()
{
NSString* bundlePath = nil;
bundlePath = [[NSBundle mainBundle] bundlePath];
bundlePath = [bundlePath stringByAppendingString: @"/Frameworks/UnityFramework.framework"];
NSBundle* bundle = [NSBundle bundleWithPath: bundlePath];
if ([bundle isLoaded] == false) [bundle load];
UnityFramework* ufw = [bundle.principalClass getInstance];
if (![ufw appController])
{
// unity is not initialized
[ufw setExecuteHeader: &_mh_execute_header];
}
return ufw;
}
int main(int argc, char* argv[])
{
@autoreleasepool
{
id ufw = UnityFrameworkLoad();
[ufw runUIApplicationMainWithArgc: argc argv: argv];
return 0;
}
}
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x132)
frame #0: 0x0000000101df7988 UnityFramework`il2cpp::vm::Type::IsStruct(Il2CppType const*) + 88
frame #1: 0x0000000101de6df4 UnityFramework`il2cpp::vm::LivenessState::FieldCanContainReferences(FieldInfo*) + 24
frame #2: 0x0000000101de70e4 UnityFramework`il2cpp::vm::Liveness::FromStatics(void*) + 160
frame #3: 0x000000010141dd84 UnityFramework`GarbageCollectSharedAssets(bool, bool) + 1360
frame #4: 0x000000010142d224 UnityFramework`UnloadUnusedAssetsOperation::IntegrateMainThread() + 28
frame #5: 0x000000010142c48c UnityFramework`PreloadManager::UpdatePreloadingSingleStep(PreloadManager::UpdatePreloadingFlags, int) + 224
frame #6: 0x000000010142cbb4 UnityFramework`PreloadManager::WaitForAllAsyncOperationsToComplete() + 212
frame #7: 0x000000010141ec68 UnityFramework`ExecutePlayerLoop(NativePlayerLoopSystem*) + 100
frame #8: 0x000000010141eca8 UnityFramework`ExecutePlayerLoop(NativePlayerLoopSystem*) + 164
frame #9: 0x000000010141ef74 UnityFramework`PlayerLoop() + 272
frame #10: 0x0000000101906c58 UnityFramework`UnityPlayerLoopImpl(bool) + 112
frame #11: 0x0000000100ecd928 UnityFramework`-[UnityAppController(Rendering) repaint] + 108
frame #12: 0x0000000100ecd890 UnityFramework`-[UnityAppController(Rendering) repaintDisplayLink] + 108
frame #13: 0x0000000185e797b8 QuartzCore`CA::smile:isplay::smile:isplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 672
frame #14: 0x0000000185f587f4 QuartzCore`display_timer_callback(__CFMachPort*, void*, long, void*) + 280
frame #15: 0x0000000182b680e0 CoreFoundation`__CFMachPortPerform + 176
frame #16: 0x0000000182b8d908 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
frame #17: 0x0000000182b8cc88 CoreFoundation`__CFRunLoopDoSource1 + 596
frame #18: 0x0000000182b8686c CoreFoundation`__CFRunLoopRun + 2372
frame #19: 0x0000000182b859f4 CoreFoundation`CFRunLoopRunSpecific + 600
frame #20: 0x000000019a25b734 GraphicsServices`GSEventRunModal + 164
frame #21: 0x000000018560475c UIKitCore`-[UIApplication _run] + 1072
frame #22: 0x0000000185609fcc UIKitCore`UIApplicationMain + 168
frame #23: 0x0000000100ecd374 UnityFramework`-[UnityFramework runUIApplicationMainWithArgc:argv:] + 108
* frame #24: 0x0000000100ae3e1c LuloClientTabatinga`main(argc=<unavailable>, argv=<unavailable>) at main.mm:26:9 [opt]
frame #25: 0x0000000182841cf8 libdyld.dylib`start + 4
I’ve tried almost everything and can’t get LoadScene to work. If I start the app with the target scene it is fine - it seems it is the call to SceneManager.LoadScene()…