Topic Author
Posts: 84
Joined: 22 Jul 2015, 12:57

System fonts and iPad2 crash

12 Jul 2019, 14:54


I am having a strange problem on the iPad 2.
When I am using a system font on the iPad 2 the app crashes but on the iPad Air everything works fine.
In the image is the error that I get in XCode
The difference in the log between the iPad2 and iPad Air is that on the iPad2 I get this error
-------- Shader compilation failed
#version 100
#ifdef GL_EXT_frag_depth
#extension GL_EXT_frag_depth : enable
#define gl_FragDepth gl_FragDepthEXT
    precision highp float;
    precision mediump float;
precision highp int;
uniform 	vec4 _ProjectionParams;
uniform 	vec4 _ZBufferParams;
uniform 	vec4 hlslcc_mtx4x4unity_CameraToWorld[4];
uniform 	vec4 hlslcc_mtx4x4_NonJitteredVP[4];
uniform 	vec4 hlslcc_mtx4x4_PreviousVP[4];
uniform highp sampler2D _CameraDepthTexture;
varying highp vec2 vs_TEXCOORD0;
varying highp vec3 vs_TEXCOORD1;
#define SV_Target0 gl_FragData[0]
vec4 u_xlat0;
vec4 u_xlat1;
vec3 u_xlat2;
float u_xlat9;
void main()
    u_xlat0.x = _ProjectionParams.z / vs_TEXCOORD1.z;
    u_xlat0.xyz = u_xlat0.xxx * vs_TEXCOORD1.xyz;
    u_xlat9 = texture2D(_CameraDepthTexture, vs_TEXCOORD0.xy).x;
    u_xlat1.x = _ZBufferParams.x * u_xlat9 + _ZBufferParams.y;
    gl_FragDepth = u_xlat9;
    u_xlat9 = float(1.0) / u_xlat1.x;
    u_xlat0.xyz = vec3(u_xlat9) * u_xlat0.xyz;
    u_xlat1 = u_xlat0.yyyy * hlslcc_mtx4x4unity_CameraToWorld[1];
    u_xlat1 = hlslcc_mtx4x4unity_CameraToWorld[0] * u_xlat0.xxxx + u_xlat1;
    u_xlat0 = hlslcc_mtx4x4unity_CameraToWorld[2] * u_xlat0.zzzz + u_xlat1;
    u_xlat0 = u_xlat0 + hlslcc_mtx4x4unity_CameraToWorld[3];
    u_xlat1.xyz = u_xlat0.yyy * hlslcc_mtx4x4_PreviousVP[1].xyw;
    u_xlat1.xyz = hlslcc_mtx4x4_PreviousVP[0].xyw * u_xlat0.xxx + u_xlat1.xyz;
    u_xlat1.xyz = hlslcc_mtx4x4_PreviousVP[2].xyw * u_xlat0.zzz + u_xlat1.xyz;
    u_xlat1.xyz = hlslcc_mtx4x4_PreviousVP[3].xyw * u_xlat0.www + u_xlat1.xyz;
    u_xlat1.xy = u_xlat1.xy / u_xlat1.zz;
    u_xlat1.xy = u_xlat1.xy + vec2(1.0, 1.0);
    u_xlat1.xy = u_xlat1.xy * vec2(0.5, 0.5);
    u_xlat2.xyz = u_xlat0.yyy * hlslcc_mtx4x4_NonJitteredVP[1].xyw;
    u_xlat2.xyz = hlslcc_mtx4x4_NonJitteredVP[0].xyw * u_xlat0.xxx + u_xlat2.xyz;
    u_xlat0.xyz = hlslcc_mtx4x4_NonJitteredVP[2].xyw * u_xlat0.zzz + u_xlat2.xyz;
    u_xlat0.xyz = hlslcc_mtx4x4_NonJitteredVP[3].xyw * u_xlat0.www + u_xlat0.xyz;
    u_xlat0.xy = u_xlat0.xy / u_xlat0.zz;
    u_xlat0.xy = u_xlat0.xy + vec2(1.0, 1.0);
    u_xlat0.xy = u_xlat0.xy * vec2(0.5, 0.5) + (-u_xlat1.xy);
    SV_Target0.xy = u_xlat0.xy;
    SV_Target0.zw = vec2(0.0, 1.0);
-------- failed compiling:
fragment evaluation shader
ERROR: 0:32: Use of undeclared identifier 'gl_FragDepthEXT'
Could this be caused by using the system fonts?

User avatar
Site Admin
Posts: 2538
Joined: 20 Jan 2012, 17:18

Re: System fonts and iPad2 crash

15 Jul 2019, 16:47

The screenshot is very small to read the content 😀 could you attach a bigger one? Does the crash disappear if you stop using the system font?

The shader error is a different thing, I don't think that can be related.
Topic Author
Posts: 84
Joined: 22 Jul 2015, 12:57

Re: System fonts and iPad2 crash

15 Jul 2019, 19:14

I apologise, I thought it could be scaled up :).On this link is the full image https://www.dropbox.com/s/b31gt4n9oi35n ... .jpeg?dl=0.
When I remove the system fonts the app is running normal.
I can send you both the logs (with system fonts and without) but as I can see there is nothing in them that would point to the problem.
User avatar
Site Admin
Posts: 2538
Joined: 20 Jan 2012, 17:18

Re: System fonts and iPad2 crash

16 Jul 2019, 13:21

Thanks for the new screenshot!

The stack seems to be corrupted. Probably one of those systems fonts is corrupting the memory, Could you please try only one system font each time to discover which one is the problematic?
And let's also move this to a ticket.

Who is online

Users browsing this forum: No registered users and 1 guest