Page 1 of 1

System fonts and iPad2 crash

Posted: 12 Jul 2019, 14:54
by ivan_b

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_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; = vec3(u_xlat9) *;
    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_xlat0.yyy * hlslcc_mtx4x4_PreviousVP[1].xyw; = hlslcc_mtx4x4_PreviousVP[0].xyw * +; = hlslcc_mtx4x4_PreviousVP[2].xyw * u_xlat0.zzz +; = hlslcc_mtx4x4_PreviousVP[3].xyw * u_xlat0.www +;
    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_xlat0.yyy * hlslcc_mtx4x4_NonJitteredVP[1].xyw; = hlslcc_mtx4x4_NonJitteredVP[0].xyw * +; = hlslcc_mtx4x4_NonJitteredVP[2].xyw * u_xlat0.zzz +; = hlslcc_mtx4x4_NonJitteredVP[3].xyw * u_xlat0.www +;
    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; = 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?

Re: System fonts and iPad2 crash

Posted: 15 Jul 2019, 16:47
by jsantos
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.

Re: System fonts and iPad2 crash

Posted: 15 Jul 2019, 19:14
by ivan_b
I apologise, I thought it could be scaled up :).On this link is the full image ... .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.

Re: System fonts and iPad2 crash

Posted: 16 Jul 2019, 13:21
by jsantos
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.

Re: System fonts and iPad2 crash

Posted: 07 Sep 2019, 19:35
by ivan_b

With the new version of Noesis (2.2.4) the app does not crash anymore but the font is not loaded eather.
Before that the font (Heiti SC) was loaded normally on the newer iPads but now it seems that it could not find the font.
Have you changed the locations where the font is searched with the new version?
Thank you.

Re: System fonts and iPad2 crash

Posted: 09 Sep 2019, 13:11
by jsantos
Locations should be the same, we just only changed the way we load system fonts to be compatible with older versions of iOS. Our tests are working fine, take into account that font availability depends on the version of iOS.

Is your issue only with 'Heiti SC' ? What iOS version are you testing?