UWP [SOLVED] : build crashing upon using emoji with TextmeshPro as component

Hi,

i have tried many trial errors to find out the root cause of the issue. As mentioned the issue was when an emoji is entered at the end of text, app is getting crashed for UWP build using Unity. The following properties i’m using in Unity. (2020.3.29f1)

  • Component used com.unity.textmeshPro - 3.0.6
  • And there is No exception or error found in Log file generated by UnityPlayer.
  • Build Type = XAML project
  • Platform = Universal windows Platform.
  • Target SDK = 10.0.22621.0 (latest installed)
  • Architecture = x64;

I have tried following, which din’t fixed the issue.

  • Updated .net SDK
  • Using different .net unity API compatibility(2.x or 4.x)
  • Updated Windows SDK to the latest.
  • Tried in older Unity - 2019.x
  • Observed issue only when emoji is entered at the end.

i.e example

  • entered string = Hi Unity + emoji + hi Unity (Hi Unity(EMOJI) Hi Unity)= No CRASH, i.e when emoji is entered in between characters no crash
  • entered string = Hi Unity + emoji (hi Unity(EMOJI) ) = CRASH, i.e emoji is entered at the end.

i’m suspecting something is happening while exporting project by Unity and build using Visual studio. The inputField is trying to trim out emoji entered.

The same code base with all properties everything same, works totally fine if choose platform is Standalone/Android/IOS.

So anybody facing the same issue? any solution?

Best regards,

Sushanth SV

Hi, can you report a bug on this?

Hey, it sounds like you’re hitting this bug: Unity Issue Tracker - IL2CPP doesn't properly handle invalid surrogate pairs causing crash, which was fixed in 2021.2 but not backported.

Could you please check if your crash has been fixed in 2021 LTS?
If not then please file a new bug and state it’s not a dupe of this older one.

Hi Thank you for the response, i have tried in Unity 2021.3.4f1. In which the issue is not observed. So issue is resolved.

Thanks for checking!

If the bug is a real problem for you on 2020 LTS and updating to 2021 LTS isn’t an option, the go ahead and file a bug and explain you’re requesting a backport for the fix. I can’t guarantee the request will be granted, since backporting IL2CPP fixes can be tricky with high regression risk. But it’s worth asking.