{"action":"opened","issue":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-Aztec-Android/issues/101","repository_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Aztec-Android","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Aztec-Android/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Aztec-Android/issues/101/comments","events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Aztec-Android/issues/101/events","html_url":"https://github.com/wordpress-mobile/WordPress-Aztec-Android/issues/101","id":184023864,"number":101,"title":"Crash: Adding Text After Reaching Undo Limit","user":{"login":"theck13","id":3827611,"avatar_url":"https://avatars.githubusercontent.com/u/3827611?v=3","gravatar_id":"","url":"https://api.github.com/users/theck13","html_url":"https://github.com/theck13","followers_url":"https://api.github.com/users/theck13/followers","following_url":"https://api.github.com/users/theck13/following{/other_user}","gists_url":"https://api.github.com/users/theck13/gists{/gist_id}","starred_url":"https://api.github.com/users/theck13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theck13/subscriptions","organizations_url":"https://api.github.com/users/theck13/orgs","repos_url":"https://api.github.com/users/theck13/repos","events_url":"https://api.github.com/users/theck13/events{/privacy}","received_events_url":"https://api.github.com/users/theck13/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-Aztec-Android/labels/bug","name":"bug","color":"ee0701"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-19T17:21:06Z","updated_at":"2016-10-19T17:21:06Z","closed_at":null,"body":"### Expected\r\nAdding text after reaching the undo limit does not crash the app and adds the text.\r\n\r\n### Observed\r\nAdding text after reaching the undo limit crashes the app with the following stack trace.\r\n\r\n```\r\n0-19 11:13:25.310 20945-20945/org.wordpress.aztec E/AndroidRuntime: FATAL EXCEPTION: main\r\n    Process: org.wordpress.aztec, PID: 20945\r\n    Theme: themes:{}\r\n    java.lang.IndexOutOfBoundsException\r\n        at java.util.LinkedList.remove(LinkedList.java:660)\r\n        at org.wordpress.aztec.History.handleHistory(History.kt:45)\r\n        at org.wordpress.aztec.AztecText.afterTextChanged(AztecText.kt:1247)\r\n        at android.widget.TextView.sendAfterTextChanged(TextView.java:8004)\r\n        at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:10165)\r\n        at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:1043)\r\n        at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:560)\r\n        at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:492)\r\n        at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:491)\r\n        at android.view.inputmethod.BaseInputConnection.replaceText(BaseInputConnection.java:685)\r\n        at android.view.inputmethod.BaseInputConnection.commitText(BaseInputConnection.java:197)\r\n        at com.android.internal.widget.EditableInputConnection.commitText(EditableInputConnection.java:184)\r\n        at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:286)\r\n        at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:78)\r\n        at android.os.Handler.dispatchMessage(Handler.java:102)\r\n        at android.os.Looper.loop(Looper.java:148)\r\n        at android.app.ActivityThread.main(ActivityThread.java:5461)\r\n        at java.lang.reflect.Method.invoke(Native Method)\r\n        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n```\r\n\r\n### Reproduced\r\n1. Edit text exceeding history limit (demo app is 10).\r\n2. Tap Undo repeatedly until history limit is reached.\r\n3. Type any character.\r\n\r\n#### Tested\r\nLG G4 (LG-H815) on Android 6.0.1 with AztecDemo 1.0"}}
{"actor":{"display_login":"theck13"}}