Log in or register to post comments

App Crash (IOS 10, Xcode, Unity)

October 12, 2016 - 4:58am #1

Hello,

 

im actually evaluating different AR Frameworks. Vuforia is looking quite good so far. I created a simple Program in Unity (1 Scene, AR Camera, 1x ImageTarget).

Everything is working fine on MAC.

 

I used Unity 5.4.1f1. Build for IOS -> Xcode 8.0 to deploy the exported project on my iPhone (6s) using IOS 10.0.2. 

When i was trying to compile the project in Xcode i got many UNetWeaver errors. (i read that there is a problem with Unity, Monodev. etc. don't wann describe here in depth). 

The easiest solution for me was, using the new beta version of Unity (5.5.0b6).

After exporting the project, i was able to compile it in Xcode without any errors.

The app is starting on iPhone, (asking for Camera access) . so far so good

 

but then the app crashes (it looks like i never had access to the camera, black screen all the time)

I tried to change settings (deactivating Metal API Validation; . using Open GL ES2) etc. but nothing worked for me.

 

FYI: Vuforia: 6.0.117

Hopefully someone can help me?

Thanks

 

Here the Log:

 

2016-10-12 13:27:15.993693 vuart[1289:227318] [DYMTLInitPlatform] platform initialization successful

2016-10-12 13:27:16.053712 vuart[1289:227103] -> registered mono modules 0x10180c000

-> applicationDidFinishLaunching()

2016-10-12 13:27:16.302278 vuart[1289:227103] Metal GPU Frame Capture Enabled

2016-10-12 13:27:16.303260 vuart[1289:227103] Metal API Validation Disabled

-> applicationDidBecomeActive()

Renderer: Apple A9 GPU

Vendor:   Apple Inc.

Version:  OpenGL ES 2.0 Metal - 33

GLES:     2

GL_OES_depth_texture GL_OES_depth_texture_cube_map 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_r

ead_format GL_IMG_texture_compression_pvrtc

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

Initialize engine version: 5.5.0b6 (e398e763a5a6)

OnLevelWasLoaded was found on WebCamBehaviour

This message has been deprecated and will be removed in a later version of Unity.

Add a delegate to SceneManager.sceneLoaded instead to get notifications after scene loading has completed



(Filename:  Line: 379)

OnLevelWasLoaded was found on KeepAliveBehaviour

This message has been deprecated and will be removed in a later version of Unity.

Add a delegate to SceneManager.sceneLoaded instead to get notifications after scene loading has completed



(Filename:  Line: 379)

-------- 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.

UnloadTime: 0.941166 ms

Setting BehaviourComponentFactory

UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)

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

UnityEngine.Logger:Log(LogType, Object)

UnityEngine.Debug:Log(Object)

Vuforia.ComponentFactoryStarterBehaviour:SetBehaviourComponentFactory()

System.Action:Invoke()

Vuforia.ComponentFactoryStarterBehaviour:Awake()

UnityEngine.GameObject:Internal_AddComponentWithType(Type)

UnityEngine.GameObject:AddComponent(Type)

UnityEngine.GameObject:AddComponent()

Vuforia.VuforiaBehaviour:Awake()



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

Initializing Vuforia...

2016-10-12 13:27:17.392390 vuart[1289:227103] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles

2016-10-12 13:27:17.392842 vuart[1289:227103] [MC] Reading from public effective user settings.

2016-10-12 13:27:19.341623 vuart[1289:227103] INFO/AR(1289) 2016-10-13 13:27:19: Vuforia SDK version 6.0.114

2016-10-12 13:27:19.447306 vuart[1289:227103] Rendering mode set to: OpenGL ES 2.0

2016-10-12 13:27:19.500421 vuart[1289:227103] Rendering mode set to: OpenGL ES 2.0

2016-10-12 13:27:19.500641 vuart[1289:227103] DEBUG/AR(1289) UIView has CAEAGLLayer layer class

2016-10-12 13:27:19.500685 vuart[1289:227103] DEBUG/AR(1289) UIView does not respond to selector renderFrameVuforia

2016-10-12 13:27:19.500715 vuart[1289:227103] DEBUG/AR(1289) UIView has CAEAGLLayer layer class

2016-10-12 13:27:19.500733 vuart[1289:227103] DEBUG/AR(1289) UIView does not respond to selector renderFrameVuforia

2016-10-12 13:27:19.500750 vuart[1289:227103] DEBUG/AR(1289) Could not find a UIView with CAEAGLLayer or CAMetalLayer layer class that responds to selector renderFrameVuforia

Vuforia initialization successful

UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)

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

UnityEngine.Logger:Log(LogType, Object)

UnityEngine.Debug:Log(Object)

Vuforia.VuforiaAbstractBehaviour:Start()



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

SetHint

UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)

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

UnityEngine.Logger:Log(LogType, Object)

UnityEngine.Debug:Log(Object)

Vuforia.VuforiaUnityImpl:SetHint(VuforiaHint, Int32)

Vuforia.VuforiaUnity:SetHint(VuforiaHint, Int32)

Vuforia.VuforiaAbstractBehaviour:Start()



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

SetHint

UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)

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

UnityEngine.Logger:Log(LogType, Object)

UnityEngine.Debug:Log(Object)

Vuforia.VuforiaUnityImpl:SetHint(VuforiaHint, Int32)

Vuforia.VuforiaUnity:SetHint(VuforiaHint, Int32)

Vuforia.VuforiaAbstractBehaviour:Start()



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

SetHint

UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)

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

UnityEngine.Logger:Log(LogType, Object)

UnityEngine.Debug:Log(Object)

Vuforia.VuforiaUnityImpl:SetHint(VuforiaHint, Int32)

Vuforia.VuforiaUnity:SetHint(VuforiaHint, Int32)

Vuforia.VuforiaAbstractBehaviour:Start()



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

2016-10-12 13:27:19.536466 vuart[1289:227103] ERROR/AR(1289) 2016-10-13 13:27:19: CameraDevice::getCameraCalibration(): Failed to get camera calibration because the camera is not initialized.

2016-10-12 13:27:19.539086 vuart[1289:227103] INFO/AR(1289) 2016-10-13 13:27:19: ObjectTracker: Successfully created dataset

Successfully created data set.

Found Trackable named cardback with id 1

UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)

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

UnityEngine.Logger:Log(LogType, Object)

UnityEngine.Debug:Log(Object)

Vuforia.StateManagerImpl:AssociateTrackableBehavioursForDataSet(DataSet)

Vuforia.DataSetImpl:Load(String, StorageType)

Vuforia.DataSetImpl:Load(String)

Vuforia.DatabaseLoadAbstractBehaviour:LoadDatasets()

Vuforia.VuforiaAbstractBehaviour:Start()



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

Creating Image Target with values:

ID:           2

Name:         mobileImage-6

Path:         QCAR/VuArtDB.xml

Size:         1024x1534.915

UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)

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

UnityEngine.Logger:Log(LogType, Object)

UnityEngine.Debug:Log(Object)

Vuforia.StateManagerImpl:CreateImageTargetBehaviour(ImageTarget)

Vuforia.StateManagerImpl:CreateMissingDataSetTrackableBehaviours(DataSet)

Vuforia.StateManagerImpl:AssociateTrackableBehavioursForDataSet(DataSet)

Vuforia.DataSetImpl:Load(String, StorageType)

Vuforia.DataSetImpl:Load(String)

Vuforia.DatabaseLoadAbstractBehaviour:LoadDatasets()

Vuforia.VuforiaAbstractBehaviour:Start()



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

StartVuforia

UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)

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

UnityEngine.Logger:Log(LogType, Object)

UnityEngine.Debug:Log(Object)

Vuforia.VuforiaAbstractBehaviour:StartVuforia(Boolean, Boolean)

Vuforia.VuforiaAbstractBehaviour:Start()



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

cameraDeviceStartCamera

Creating a Mono Camera Configuration (Check for reflection)

UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)

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

UnityEngine.Logger:Log(LogType, Object)

UnityEngine.Debug:Log(Object)

Vuforia.DigitalEyewearAbstractBehaviour:ConfigureView()

Vuforia.DigitalEyewearAbstractBehaviour:OnVuforiaStarted()

System.Action:Invoke()

System.Action:Invoke()

Vuforia.VuforiaAbstractBehaviour:Start()



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

2016-10-12 13:27:19.785396 vuart[1289:227103] ERROR/AR(1289) 2016-10-13 13:27:19: VideoBackgroundConfig with screen size of zero received, skipping config step

2016-10-12 13:27:19.786444 vuart[1289:227353] Deleting old image data @ 0x0

2016-10-12 13:27:19.786476 vuart[1289:227353] Created new image data buffer @ 0x109660000 w/ 3110400 bytes

Trackable cardback lost

UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)

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

UnityEngine.Logger:Log(LogType, Object)

UnityEngine.Debug:Log(Object)

Vuforia.DefaultTrackableEventHandler:OnTrackingLost()

Vuforia.DefaultTrackableEventHandler:OnTrackableStateChanged(Status, Status)

Vuforia.TrackableBehaviour:RegisterTrackableEventHandler(ITrackableEventHandler)

Vuforia.DefaultTrackableEventHandler:Start()



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

vuart was compiled with optimization - stepping may behave oddly; variables may not be available.

(lldb)

 

App Crash (IOS 10, Xcode, Unity)

October 13, 2016 - 5:10am #2

Hey guys,

 

after three frustrating days i accidentally found a solution for my problem.

As i said i installed Unity Beta 5.5.06b. Today i got a bug in unity, and was not able to compile my projects, so i decided to step back to the actual released version, which i used before 5.4.1f1.

After reinstalling Unity i got an error when starting it, -> which forced me to reset unity factory defaults (was a bit strange bec. i already installed it, possibly some global stored settings, whatever).

Then i tried set up my Vuforia project exactly the same way than before. (1xARCamera, 1x ImageTarget + 3d model). Exported the project for IOS.

But this time i didn't got any compile errors (UNetWeaver like the last time with unity 5.4.1f1).

Opened the exported project in Xcode chose my company for signing, and added the cam description property manually. (i didn't used audio in my sample project).

so far so good, then i compiled and deployed the app to my iPhone. (i realized the difference in the compiling process, in the past it was building 108 sources, this time 122 sources).

Anyway its running on my IPhone without any problems.

 

Seems there was a problem with Unity / Export  etc. settings.

 

I hope it helped. 

 

cya

 

Log in or register to post comments