Search Issue Tracker

Fixed in Unity 2018.3

Votes

0

Found in

2017.3.1p3

Issue ID

1023109

Regression

No

[iOS] crash in "`main(argc=1, argv=0x000000016fdd7980) at main.mm:33" using LaunchScreen.storyboard

Mobile

-

-

Priority: 7Not yet prioritized for a release

-

Severity: 1Crash, freeze, data loss, work stops

Unity crashes in the SplashScreen.mm code when ShowSplashScreen() calls [_controller create: window] because UIViewController doesn't contain the 'create' selector. It is looking for _controller to be a SplashScreenController instance.

Reproduction steps:
1. Open the attached "1023109_project" project.
2. Build and run it on iOS device.

Actual behavior:
- Crash

Call stack:
ProductName was compiled with optimization - stepping may behave oddly; variables may not be available.
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x0000000185fb1014 libsystem_kernel.dylib`__pthread_kill + 8
frame #1: 0x000000018607b264 libsystem_pthread.dylib`pthread_kill + 112
frame #2: 0x0000000185f259c4 libsystem_c.dylib`abort + 140
frame #3: 0x00000001859f11b0 libc++abi.dylib`abort_message + 132
frame #4: 0x0000000185a0ac04 libc++abi.dylib`default_terminate_handler() + 304
frame #5: 0x0000000185a18820 libobjc.A.dylib`_objc_terminate() + 124
frame #6: 0x0000000185a075d4 libc++abi.dylib`std::__terminate(void (*)()) + 16
frame #7: 0x0000000185a071a8 libc++abi.dylib`__cxa_rethrow + 144
frame #8: 0x0000000185a186f8 libobjc.A.dylib`objc_exception_rethrow + 44
frame #9: 0x0000000186e92e10 CoreFoundation`CFRunLoopRunSpecific + 532
frame #10: 0x000000018d14b384 UIKit`-[UIApplication _run] + 652
frame #11: 0x000000018d146058 UIKit`UIApplicationMain + 208
* frame #12: 0x000000010002d3d0 ProductName`main(argc=1, argv=0x000000016fdd7980) at main.mm:33 [opt]
frame #13: 0x0000000185ea159c libdyld.dylib`start + 4

Workaround:
- Remove the Storyboard code from ShowSplashScreen and make it like this instead:
void ShowSplashScreen(UIWindow* window)
{
_controller = [[SplashScreenController alloc] init];

[_controller create: window];
[window makeKeyAndVisible];
}

Reproduced with:
2017.3.0b1, 2017.4.1f1, 2018.1.0f1
iPhone 7 iOS 11.2.6, iPod Touch 6 iOS 10.2.1, iPad Mini 3 iOS 10.3.2

Not reproducible with:
Android

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.