UWP build crash when try to paste text

Hello all!!

I’m not quite sure what is happening here.

I have some input fields in my UWP app in which the user can fill different data (name, description, links etc) and I notice that when some of that data is copy (from a text file, link whatever) and pasted, the app just freezes out. I have notice also that this only happen with “large” text like:

Input Field | Unity UI | 1.0.0

If I jus copy "“https://docs.unity3d.com/Packages/com.unity.ugui” it works fine but thats weird because I have no Character limits in the input fields.

I also I searched for a “App capabilitie declaration” or something that I could been missing but theres nothing about “copy paste”. Also I have tried with/without development buld but it doesn’t make a change.

In a attempt to find out what could be the character limit, I start to write random character (you know, in a silly way) and find out that writing character fast also freezes the app, thats CRAZY!!

The UnityPlayer.Log doesn’t have any crash or error input which is also weird.

I can close the app with the close button but the app itself stop responding at all.

I have to say that I Develop this app originally for Windows Standalone and it worked fine then.

Last, sometimes if I paste something in an input field and try to paste the same data to another imput field, it also crashed.

If anybody has an advice or any idea of what is happening here I’ll thank you a lot!!!

//Edit

I’m pretty sure that the cause of the crash is the paste action itself because the Inputfield call the “OnEndEdit” method and I check it by:

 public void OnLinkChange()
    {
        linkURL = webLink.text;
        ButtonLink.SetActive(false);
        Debug.LogError("Pasted or written"); //just to see it in the player build
    }

when it crashes, the "“OnEndEdit” is never called so the error above is never called

6981917--823853--upload_2021-3-27_23-12-43.png

Hey,

This is a known issue that has already been fixed in 2020.2+, and the PR to backport the fix to 2019 LTS is currently in review and should land soon.

This bug was discovered and fixed internally, and so there isn’t a public link for the issue ticket. However, the fix for this issue is in the same PR, and you can use it track the progress.

1 Like

Oh God! good to known, I was very confused on that one :rage:

I’m working with 2019.4.15 and no planning to upgrade soon but I can make a branch to test.

Thanks a lot!!.

Hello

I have test with version 2020.3.3 F1 and can confirm that the “bug” or issue has gone, I can copy and paste long text (more than 380 char) or type it fast and it keep working and responding.

Thanks!!

I’m really glad to hear that! Otherwise I’d be in a bit of a panic right now :slight_smile:

For others who might encounter this bug, the 2019 backport of the fix is still “under review” but will eventually make it out.

1 Like

One more update: the 2019 backport landed, and this fix will be in 2019.4.25f1 patch release.