Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by akimzav · Jul 15, 2015 at 10:11 AM · androiduicrashinputfield

Input field crashes on Android 4.1.2 (Unity 5.1.1f1)

Everything works fine if running standalone on PC: can perform any actions with Input fields. The situation remains the same when running on Android and device is in landscape mode, which makes any text edit to take place in separated fullscreen window.

However, if editing with default keyboard in portrait mode OR with custom keyboard which does not bring up that fullscreen edit window (so, in both these variants game stays visible, along with keyboard) strange issue appears: if during edit the cursor was moved at least once, the game will crash on the end of editing, after all functions in End Edit (string) were successfuly called.

I have tried disabling any consequent events of editing a field, no results.

What is wrong with that Input field? Thank you in advance.

EDIT: Tried creating absolutely blank game consisting only of one Input field. No results.

EDIT2: Found out that game will not crash in the following scenario: 1)edit Input field, still not moving the text cursor 2)clicking OK 3)clicking Input field again, as to start another edit 4)entered earlier text will all be selected (as if Ctrl+A in PC) 5)clicking somewhere in the text will place the edit cursor there, now allowing to edit and not crashing on pushing OK in the end.(having cursor moved mannualy still crashes on OK press, though)

EDIT3: Found out that not having the cursor moved causes the crash, but the ability to see dat blue thing:alt text

Still can't fix this...

EDIT4: Done some more testing. Two Samsung Galaxy S3 minis with Android 4.1.2 with different life history both crash on these conditions, however, Samsung Galaxy S5 did not. It appears the problem may be model specific, and not platform specific...

No progress on the Samsung, however.

EDIT5: Managed to get error log:

java.lang.Error: FATAL EXCEPTION [main] Unity version : 5.1.1f1 Device model : samsung GT-I8190N Device fingerprint: samsung/goldennfcxx/golden:4.1.2/JZO54K/I8190NXXAMA1:user/release-keys Caused by: java.lang.IndexOutOfBoundsException: charAt: -1 < 0 at android.text.SpannableStringBuilder.charAt(SpannableStringBuilder.java:112) at android.text.Selection.setSelection(Selection.java:81) at android.text.Selection.setSelection(Selection.java:115) at android.widget.Editor$InsertionHandleView.updateSelection(Editor.java:3783) at android.widget.Editor$HandleView.positionAtCursorOffset(Editor.java:3501) at android.widget.Editor$HandleView.updatePosition(Editor.java:3528) at android.widget.Editor$PositionListener.onPreDraw(Editor.java:2335) at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:707) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1944) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1113) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4481) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725) at android.view.Choreographer.doCallbacks(Choreographer.java:555) at android.view.Choreographer.doFrame(Choreographer.java:525) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711) at android.os.Handler.handleCallback(Handler.java:615) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4856) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774) at dalvik.system.NativeStart.main(Native Method)

Got no idea on what is going on...

screenshot-2015-07-14-19-03-31.png (9.8 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Set android:hardwareAccelerated="true" for input field on Android 0 Answers

Click UI button while Android keyboard visible 0 Answers

Problem with UI input field in android 1 Answer

UI Input fields not working properly in Unity 5 on Android 1 Answer

Android Keyboard Stuck / Won't Hide? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges