ivan_b
Topic Author
Posts: 100
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?
 
User avatar
jsantos
Site Admin
Posts: 3905
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: 100
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: 3905
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: 100
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: 3905
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?
 
ivan_b
Topic Author
Posts: 100
Joined: 22 Jul 2015, 12:57

Re: System fonts and iPad2 crash

25 Sep 2019, 20:06

Sorry for the late reply. I thought I would have time to test this issue more in detail but we are currently in the middle of the release.
I have tried this only with Heiti SC on the iPad 2 and iPad Air but the version did not change from the last time when we used Noesis 2.2.3 and I need to check the exact version of iOs.
I will try to check if the other fonts are working but it won't be very soon.
Once again I apologise for the late reply.
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: System fonts and iPad2 crash

26 Sep 2019, 15:27

Thanks! Don't worry, take your time. What I would do is creating a XAML with 3 different TextBlocks, each one using a different system font. If that doesn't work, please attach the XAML to a ticket and we will investigate it.
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: System fonts and iPad2 crash

27 Sep 2019, 21:14

I tried the following XAML in Unity 2.2.4 and is displaying correctly on iOS (also on macOS):
<StackPanel xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Background="Gray">
  <TextBlock FontSize="20">Default</TextBlock>
  <TextBlock FontSize="20" FontFamily="Arial">Arial</TextBlock>
  <TextBlock FontSize="20" FontFamily="Avenir">Avenir</TextBlock>
  <TextBlock FontSize="20" FontFamily="Bradley Hand">Bradley Hand</TextBlock>
</StackPanel>
 
ivan_b
Topic Author
Posts: 100
Joined: 22 Jul 2015, 12:57

Re: System fonts and iPad2 crash

30 Oct 2019, 10:00

Hi,
I can confirm now that the system font on iOs is working.
The problem was that the Heiti font family on newer version of iOs did not support Chinese characters anymore.

Who is online

Users browsing this forum: Bing [Bot] and 40 guests