playMaker

Author Topic: CRASH - textfield entry  (Read 907 times)

szomaza

  • Full Member
  • ***
  • Posts: 169
    • View Profile
CRASH - textfield entry
« on: February 24, 2015, 12:03:55 AM »
I found a crash that happens every time on Android device.
I have no idea if it is Unity's fault or Playmaker action's, as I don't know how to debug the  app running on the Android device and probably would not understand the error log anyway.  :-)

But it is as simple as it gets. Here are the repro steps:
1. look at attached image and create one gameobject with one FSM that does the same.
Explanation: this simply displays a text field the user can click, than enter or edit the text in it. After pressing OK (on virtual keyboard), the text field entry disappears for 3 seconds, than it is displayed again, can be clicked and the previously entered text edited. And so on.
2. It crashes and the app is exited and an Android window shows: ("Unfortunately, (App Name) has stopped.") every time when the following is done:
3. first enter any text into the field and pres OK on the virtual keyboard
4. this saves the text into the string variable and after 3 seconds the field is displayed again, now with the previously entered text in it,
5. tap the field to bring up the virtual keyboard and edit the text,
6. now just move the text entry cursor to the end of the text and press OK
7. observe that the app hangs for a few seconds than it is exited with the above error message.

In case the text is edited, any letter written to it, or deleted, or the cursor left at the beginning of the text entry field this crash does not happen when pressing the OK.
It only crashes in this one case, when the cursor is moved to the end and nothing is modified, just the OK is pressed.

Same happens if GUILayout Password Field is used instead of the Text Field.

First I thought I might be causing this crash but than stripped it down to this bare minimum and it still happens, so I guess this will cause problems for anybody using textfields.

Please figure out what is causing this and fix.
Br,
szomaza