iOS Game crashes after Unity 2017 upgrade and xCode 9 - Any help appreciated!

Hi all,

So recently we upgraded Unity to 2017.2.0f3 and xCode to 9.1. The game builds fine, however once it starts running we see the Unity splash screen followed by a crash as soon as the splash dismisses. Xcode logs show the crash occurs here:

2017-11-20 14:18:38.335079+0000 zomtastitc[483:804910] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSCFString al_containsSubstring:]: unrecognized selector sent to instance 0xb503790’

and highlights this line in the Xcode project:
UIApplicationMain(argc, argv, nil, [NSString stringWithUTF8String: AppControllerClassName]);
I don’t really know very much about iOS native programming but I know that argv is coming through as NULL.
[EDIT] I just added two breakpoints into the Xcode project as seen below - line 21 and 33. On first running the build both are hit, and everything works fine. After the splash screen has finished showing, line 21 is skipped and 33 is hit with the error. Really strange to me!

int main(int argc, char* argv[])
{
    UnityInitStartupTime();
    @autoreleasepool
    {
        UnityInitTrampoline();
(Line 21 ->)UnityInitRuntime(argc, argv);

        RegisterMonoModules();
        NSLog(@"-> registered mono modules %p\n", &constsection);
        RegisterFeatures();

        // iOS terminates open sockets when an application enters background mode.
        // The next write to any of such socket causes SIGPIPE signal being raised,
        // even if the request has been done from scripting side. This disables the
        // signal and allows Mono to throw a proper C# exception.
        std::signal(SIGPIPE, SIG_IGN);

(Line 33->)     UIApplicationMain(argc, argv, nil, [NSString stringWithUTF8String: AppControllerClassName]);
    }

    return 0;
}

I’ll paste the entire log of build to crash below but think the bits I need to concentrate on are above. I’ve tried several hours of Google searching and random attempts at changing settings to try and fix this but have had no luck. Any help at all would be hugely appreciated!!!

Thanks in advance,
Oscar

All of the Xcode output:

2017-11-20 14:18:29.200811+0000 zomtastitc[483:805056] [DYMTLInitPlatform] platform initialization successful

2017-11-20 14:18:29.403180+0000 zomtastitc[483:804910] → registered mono modules 0x1356ae0

→ applicationDidFinishLaunching()

Player data archive not found at /var/containers/Bundle/Application/F0C58BBD-37F0-4680-9C37-C5289037302C/zomtastitc.app/Data/data.unity3d, using local filesystem

2017-11-20 14:18:30.660644+0000 zomtastitc[483:804910] Metal GPU Frame Capture Enabled

2017-11-20 14:18:30.664517+0000 zomtastitc[483:804910] Metal API Validation Disabled

→ applicationDidBecomeActive()

Renderer: PowerVR SGX 543

Vendor: Imagination Technologies

Version: OpenGL ES 2.0 IMGSGX543-129

GLES: 2

GL_OES_depth_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_vertex_array_object GL_EXT_blend_minmax GL_EXT_color_buffer_half_float GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_draw_instanced GL_EXT_instanced_arrays GL_EXT_map_buffer_range GL_EXT_occlusion_query_boolean GL_EXT_pvrtc_sRGB GL_EXT_read_format_bgra GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_texture_lod GL_EXT_shadow_samplers GL_EXT_sRGB GL_EXT_texture_filter_anisotropic GL_EXT_texture_rg GL_EXT_texture_storage GL_APPLE_clip_distance GL_APPLE_color_buffer_packed_float GL_APPLE_copy_texture_levels GL_APPLE_framebuffer_multisample GL_APPLE_rgb_422 GL_APPLE_sync GL_APPLE_texture_format_BGRA8888 GL_APPLE_texture_max_level GL_APPLE_texture_packed_float GL_IMG_read_format GL_IMG_texture_comp

ression_pvrtc

OPENGL LOG: Creating OpenGL ES 2.0 graphics device ; Context level <OpenGL ES 2.0> ; Context handle 350822944

Initialize engine version: 2017.2.0f3 (46dda1414e51)

2017-11-20 14:18:31.518908+0000 zomtastitc[483:805032] [ ] nw_parameters_set_source_application Failed to convert from PID (0) to UUID. This could lead to wrong data usage accounting.

2017-11-20 14:18:31.549777+0000 zomtastitc[483:805032] PAC Fetch failed with error [NSURLErrorDomain:-1003]

2017-11-20 14:18:31.551078+0000 zomtastitc[483:805032] [ ] nw_proxy_resolver_create_parsed_array PAC evaluation error: NSURLErrorDomain: -1003

-------- Shader compilation failed

#version 100

#extension GL_EXT_frag_depth : enable

precision highp float;

uniform highp vec4 _ProjectionParams;

uniform highp vec4 _ZBufferParams;

uniform highp mat4 unity_CameraToWorld;

uniform highp mat4 _NonJitteredVP;

uniform highp mat4 _PreviousVP;

uniform highp sampler2D _CameraDepthTexture;

varying highp vec2 xlv_TEXCOORD0;

varying highp vec3 xlv_TEXCOORD1;

void main ()

{

highp vec4 tmpvar_1;

tmpvar_1 = texture2D (_CameraDepthTexture, xlv_TEXCOORD0);

mediump vec2 tmpvar_2;

highp vec4 tmpvar_3;

tmpvar_3.w = 1.0;

tmpvar_3.xyz = ((xlv_TEXCOORD1 * (_ProjectionParams.z / xlv_TEXCOORD1.z)) * (1.0/((

(_ZBufferParams.x * tmpvar_1.x)

+ _ZBufferParams.y))));

highp vec4 tmpvar_4;

tmpvar_4 = (unity_CameraToWorld * tmpvar_3);

highp vec4 tmpvar_5;

tmpvar_5 = (_PreviousVP * tmpvar_4);

highp vec4 tmpvar_6;

tmpvar_6 = (_NonJitteredVP * tmpvar_4);

highp vec2 tmpvar_7;

tmpvar_7 = (((tmpvar_5.xy / tmpvar_5.w) + 1.0) / 2.0);

highp vec2 tmpvar_8;

tmpvar_8 = (((tmpvar_6.xy / tmpvar_6.w) + 1.0) / 2.0);

tmpvar_2 = (tmpvar_8 - tmpvar_7);

mediump vec4 tmpvar_9;

tmpvar_9.zw = vec2(0.0, 1.0);

tmpvar_9.xy = tmpvar_2;

gl_FragDepthEXT = tmpvar_1.x;

gl_FragData[0] = tmpvar_9;

}

-------- failed compiling:

fragment evaluation shader

WARNING: 0:4: extension ‘GL_EXT_frag_depth’ is not supported

ERROR: 0:38: Use of undeclared identifier ‘gl_FragDepthEXT’

Note: Creation of internal variant of shader ‘Hidden/Internal-MotionVectors’ failed.

WARNING: Shader Unsupported: ‘Hidden/Internal-MotionVectors’ - Pass ‘’ has no vertex shader

WARNING: Shader Unsupported: ‘Hidden/Internal-MotionVectors’ - Setting to default shader.

-------- Shader compilation failed

#version 100

#extension GL_EXT_frag_depth : enable

precision highp float;

uniform sampler2D _MainTex;

uniform highp sampler2D _DepthTex;

uniform highp vec4 _Color;

varying highp vec2 xlv_TEXCOORD0;

void main ()

{

lowp vec4 tmpvar_1;

tmpvar_1 = (texture2D (_MainTex, xlv_TEXCOORD0) * _Color);

gl_FragDepthEXT = texture2D (_DepthTex, xlv_TEXCOORD0).x;

gl_FragData[0] = tmpvar_1;

}

-------- failed compiling:

fragment evaluation shader

WARNING: 0:4: extension ‘GL_EXT_frag_depth’ is not supported

ERROR: 0:14: Use of undeclared identifier ‘gl_FragDepthEXT’

Note: Creation of internal variant of shader ‘Hidden/BlitCopyWithDepth’ failed.

WARNING: Shader Unsupported: ‘Hidden/BlitCopyWithDepth’ - Pass ‘’ has no vertex shader

WARNING: Shader Unsupported: ‘Hidden/BlitCopyWithDepth’ - Setting to default shader.

WARNING: Shader Unsupported: ‘Hidden/VR/BlitTexArraySlice’ - Pass ‘’ has no vertex shader

WARNING: Shader Unsupported: ‘Hidden/VR/BlitTexArraySlice’ - Setting to default shader.

Setting up 1 worker threads for Enlighten.

Thread → id: 40289000 → priority: 1

UnloadTime: 13.318750 ms

2017-11-20 14:18:37.392290+0000 zomtastitc[483:804910] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles

2017-11-20 14:18:37.396482+0000 zomtastitc[483:804910] [MC] Reading from public effective user settings.

2017-11-20 14:18:37.403399+0000 zomtastitc[483:805034] [ ] nw_parameters_set_source_application Failed to convert from PID (0) to UUID. This could lead to wrong data usage accounting.

2017-11-20 14:18:37.412121+0000 zomtastitc[483:805067] PAC Fetch failed with error [NSURLErrorDomain:-1003]

2017-11-20 14:18:37.412958+0000 zomtastitc[483:805033] [ ] nw_proxy_resolver_create_parsed_array PAC evaluation error: NSURLErrorDomain: -1003

2017-11-20 14:18:37.474253+0000 zomtastitc[483:804910] I/UnityAds: +[UnityAds initialize:delegate:testMode:] (line:68) :: Initializing Unity Ads 2.1.1 (2101) with game id 1348291 in production mode

2017-11-20 14:18:37.493372+0000 zomtastitc[483:805033] I/UnityAds: -[UADSInitializeStateConfig execute] (line:141) :: Unity Ads init: load configuration from https://config.unityads.unity3d.com/webview/2.1.1/release/config.json

[Singleton] Using instance already created: GameCanvas

UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[ ])

UnityEngine.Logger:Log(LogType, Object)

UnityEngine.Debug:Log(Object)

Singleton`1:get_Instance()

ZombieDataController:Start()

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

2017-11-20 14:18:37.931107+0000 zomtastitc[483:804910] -[__NSCFString al_containsSubstring:]: unrecognized selector sent to instance 0xb503790

2017-11-20 14:18:38.332634+0000 zomtastitc[483:804910] Uncaught exception: NSInvalidArgumentException: -[__NSCFString al_containsSubstring:]: unrecognized selector sent to instance 0xb503790

(

0 CoreFoundation 0x1c213b55 + 152

1 libobjc.A.dylib 0x1b49b067 objc_exception_throw + 38

2 CoreFoundation 0x1c218fd1 + 0

3 CoreFoundation 0x1c2170c3 + 696

4 CoreFoundation 0x1c13fdc8 _CF_forwarding_prep_0 + 24

5 zomtastitc 0x0121c6ff -[ALSettingsManager loadFromUserSettings:] + 1096

6 zomtastitc 0x0121a0fd -[ALSdk(Private) initWithKey:usingSettings:] + 1354

7 zomtastitc 0x01219369 +[ALSdk sharedWithKey:settings:] + 240

8 zomtastitc 0x01219093 +[ALSdk shared] + 122

9 zomtastitc 0x008be64b _AppLovinInitializeSdk + 58

10 zomtastitc 0x002ea1c3 GameController_Start_m3861888709 + 142

11 zomtastitc 0x0087162f Z31RuntimeInvoker_Void_t2267877135PFvvEPK10MethodInfoPvPS4 + 10

12 zomtastitc 0x011ab18b _ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException + 118

13 zomtastitc 0x00b4534f _Z23scripting_method_invoke18ScriptingMethodPtr18ScriptingObjectPtrR18ScriptingArgumentsP21ScriptingExceptionPtrb + 66

14 zomtastitc 0x00b4b26d _ZN19ScriptingInvocation6InvokeEP21ScriptingExceptionPtrb + 38

15 zomtastitc 0x00b4f45f _ZN13MonoBehaviour30InvokeMethodOrCoroutineCheckedE18ScriptingMethodPtr18ScriptingObjectPtrP21ScriptingExceptionPtr + 1198

16 zomtastitc 0x00b4f5d7 _ZN13MonoBehaviour30InvokeMethodOrCoroutineCheckedE18ScriptingMethodPtr18ScriptingObjectPtr + 46

17 zomtastitc 0x00b4e929 _ZN13MonoBehaviour16DelayedStartCallEP6ObjectPv + 46

18 zomtastitc 0x009f17b9 _ZN18DelayedCallManager6UpdateEi + 470

19 zomtastitc 0x00a94069 _Z10PlayerLoopv + 532

20 zomtastitc 0x008f8469 _ZL19UnityPlayerLoopImplb + 22

21 zomtastitc 0x000d492f UnityRepaint + 218

22 zomtastitc 0x000d47e9 -[UnityAppController(Rendering) repaintDisplayLink] + 76

23 GPUToolsCore 0x0384be93 -[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 290

24 QuartzCore 0x1efac9f1 + 112

25 QuartzCore 0x1efac839 + 608

26 IOMobileFramebuffer 0x1e44b1bf + 88

27 IOKit 0x1c464a7f IODispatchCalloutFromCFMessage + 236

28 CoreFoundation 0x1c1bcc19 + 128

29 CoreFoundation 0x1c1d065f + 34

30 CoreFoundation 0x1c1cfebd + 338

31 CoreFoundation 0x1c1cdeab + 994

32 CoreFoundation 0x1c1211af CFRunLoopRunSpecific + 470

33 CoreFoundation 0x1c120fd1 CFRunLoopRunInMode + 104

34 GraphicsServices 0x1d8cbb41 GSEventRunModal + 80

35 UIKit 0x214a9a53 UIApplicationMain + 150

36 zomtastitc 0x000cb8cf main + 206

37 libdyld.dylib 0x1b90e4eb + 2

)

2017-11-20 14:18:38.335079+0000 zomtastitc[483:804910] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSCFString al_containsSubstring:]: unrecognized selector sent to instance 0xb503790’

*** First throw call stack:

(0x1c213b3d 0x1b49b067 0x1c218fd1 0x1c2170c3 0x1c13fdc8 0x121c6ff 0x121a0fd 0x1219369 0x1219093 0x8be64b 0x2ea1c3 0x87162f 0x11ab18b 0xb4534f 0xb4b26d 0xb4f45f 0xb4f5d7 0xb4e929 0x9f17b9 0xa94069 0x8f8469 0xd492f 0xd47e9 0x384be93 0x1efac9f1 0x1efac839 0x1e44b1bf 0x1c464a7f 0x1c1bcc19 0x1c1d065f 0x1c1cfebd 0x1c1cdeab 0x1c1211af 0x1c120fd1 0x1d8cbb41 0x214a9a53 0xcb8cf 0x1b90e4eb)

libc++abi.dylib: terminating with uncaught exception of type NSException

(lldb)

Nevermind - I just had to add -ObjC into the Other Linker flags

brother have you solve this issue ???