iBicha / EmojiTexture

A Unity plugin to render Emojis ☺ ❤ 🍆 🍑 to a texture
Other
62 stars 9 forks source link

Crash in iOS plugin when entering Multi-Character Emoji #22

Open AKJ1 opened 5 years ago

AKJ1 commented 5 years ago

Hey.

I found a crash in the iOS Plugin. Currently unfortunately I cannot give you debug data, but i can give you reproduction steps.

  1. Create a TMP Emoji Input field.
  2. Build scene to iOS Device.
  3. Start Entering Hand/Gesture Emojis 👍✌🤞🤞🙌👍🤦‍♀️🙌👏👏👏
  4. When you get to 8 Emojis, on the 9th entered one, UTF32 sent to plugin will overflow and cause a fatal crash.

I got this fixed by changing the way the emoji is retrieved ( instead of using the character-based search, i changed it to GetFirstEmoji() ). I cannot post the source, unfortunately, and also it's kindof a bodgejob so it's probably for the best.

Cheers!

iBicha commented 5 years ago

Hi Asen,

Thank you for opening the issue. It seems that emoji textures has a couple of bugs when dealing with unsafe pointers, specifically noticeable on iOS. Some work was in progress to address this issue, but I held back from putting more effort for now, because rumours were that TextMesh Pro was working on a whole new font system, and should be able to do what EmojiTexture is capable of (but it seems that the wait has taken too long). Nonetheless, this use case will be very helpful in debugging and fixing the issue.

Cheers.