ivan_b
Topic Author
Posts: 85
Joined: 22 Jul 2015, 12:57

System fonts and iPad2 crash

12 Jul 2019, 14:54

Hi,

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
Image
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
#endif
#define gl_FragDepth gl_FragDepthEXT
#ifdef GL_FRAGMENT_PRECISION_HIGH
    precision highp float;
#else
    precision mediump float;
#endif
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);
    return;
}
-------- failed compiling:
fragment evaluation shader
ERROR: 0:32: Use of undeclared identifier 'gl_FragDepthEXT'
Could this be caused by using the system fonts?

Tags:
 
User avatar
jsantos
Site Admin
Posts: 2563
Joined: 20 Jan 2012, 17:18
Contact:

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.
 
ivan_b
Topic Author
Posts: 85
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
jsantos
Site Admin
Posts: 2563
Joined: 20 Jan 2012, 17:18
Contact:

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.
 
ivan_b
Topic Author
Posts: 85
Joined: 22 Jul 2015, 12:57

Re: System fonts and iPad2 crash

07 Sep 2019, 19:35

Hi

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.
 
User avatar
jsantos
Site Admin
Posts: 2563
Joined: 20 Jan 2012, 17:18
Contact:

Re: System fonts and iPad2 crash

09 Sep 2019, 13:11

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?

Who is online

Users browsing this forum: Google [Bot] and 3 guests