{"action":"created","issue":{"url":"https://api.github.com/repos/libgdx/libgdx/issues/3992","repository_url":"https://api.github.com/repos/libgdx/libgdx","labels_url":"https://api.github.com/repos/libgdx/libgdx/issues/3992/labels{/name}","comments_url":"https://api.github.com/repos/libgdx/libgdx/issues/3992/comments","events_url":"https://api.github.com/repos/libgdx/libgdx/issues/3992/events","html_url":"https://github.com/libgdx/libgdx/issues/3992","id":146396623,"number":3992,"title":"TextArea ColorMarkup ArrayIndexOutOfBoundsException","user":{"login":"keeyzar","id":11984331,"avatar_url":"https://avatars.githubusercontent.com/u/11984331?v=3","gravatar_id":"","url":"https://api.github.com/users/keeyzar","html_url":"https://github.com/keeyzar","followers_url":"https://api.github.com/users/keeyzar/followers","following_url":"https://api.github.com/users/keeyzar/following{/other_user}","gists_url":"https://api.github.com/users/keeyzar/gists{/gist_id}","starred_url":"https://api.github.com/users/keeyzar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keeyzar/subscriptions","organizations_url":"https://api.github.com/users/keeyzar/orgs","repos_url":"https://api.github.com/users/keeyzar/repos","events_url":"https://api.github.com/users/keeyzar/events{/privacy}","received_events_url":"https://api.github.com/users/keeyzar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/libgdx/libgdx/labels/scene2d","name":"scene2d","color":"ff00ff"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-06T18:27:37Z","updated_at":"2016-04-06T19:32:29Z","closed_at":null,"body":"#### Issue details\r\nAt some sizes the Textarea with enabled Color Markup throws an ArrayOutOfBoundsException\r\n\r\n#### Reproduction steps/code\r\n```\r\npublic class test extends Game {\r\n    Stage stage;\r\n\r\n    @Override\r\n    public void render() {\r\n        stage.act();\r\n        stage.draw();\r\n    }\r\n\r\n    @Override\r\n    public void create() {\r\n\r\n        Skin skin = assetManager.get(AssetVariables.UI_SKIN_JSON, Skin.class); //I guess any Skin will do\r\n        stage = new Stage();\r\n        TextArea textArea = new TextArea(\"\", skin);\r\n        textArea.getStyle().font.getData().markupEnabled = true;\r\n        textArea.setText(\"[RED] nice text [] i like\");\r\n        textArea.setFillParent(true);\r\n        textArea.setPosition(0, 100);\r\n        textArea.setSize(200, 100);\r\n        stage.addActor(textArea);\r\n\r\n    }\r\n}\r\n```\r\n\r\n#### Version of LibGDX and/or relevant dependencies\r\n1.9.2 (the latest)\r\n\r\n#### Stacktrace\r\n```java\r\nException in thread \"LWJGL Application\" java.lang.ArrayIndexOutOfBoundsException: 16\r\n\tat com.badlogic.gdx.scenes.scene2d.ui.TextField.calculateOffsets(TextField.java:244)\r\n\tat com.badlogic.gdx.scenes.scene2d.ui.TextArea.calculateOffsets(TextArea.java:263)\r\n\tat com.badlogic.gdx.scenes.scene2d.ui.TextField.draw(TextField.java:294)\r\n\tat com.badlogic.gdx.scenes.scene2d.Group.drawChildren(Group.java:110)\r\n\tat com.badlogic.gdx.scenes.scene2d.Group.draw(Group.java:57)\r\n\tat com.badlogic.gdx.scenes.scene2d.Stage.draw(Stage.java:128)\r\n\tat de.keeyzar.earthragequit.testingPurpose.test.render(test.java:21)\r\n\tat com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:223)\r\n\tat com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:124)\r\n```\r\n\r\n#### Please select the affected platforms\r\n- [ ] Android\r\n- [ ] iOS\r\n- [x] HTML/GWT\r\n- [ ] Windows\r\n- [ ] Linux\r\n- [ ] MacOS\r\n"},"comment":{"url":"https://api.github.com/repos/libgdx/libgdx/issues/comments/206524817","html_url":"https://github.com/libgdx/libgdx/issues/3992#issuecomment-206524817","issue_url":"https://api.github.com/repos/libgdx/libgdx/issues/3992","id":206524817,"user":{"login":"MobiDevelop","id":1095464,"avatar_url":"https://avatars.githubusercontent.com/u/1095464?v=3","gravatar_id":"","url":"https://api.github.com/users/MobiDevelop","html_url":"https://github.com/MobiDevelop","followers_url":"https://api.github.com/users/MobiDevelop/followers","following_url":"https://api.github.com/users/MobiDevelop/following{/other_user}","gists_url":"https://api.github.com/users/MobiDevelop/gists{/gist_id}","starred_url":"https://api.github.com/users/MobiDevelop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MobiDevelop/subscriptions","organizations_url":"https://api.github.com/users/MobiDevelop/orgs","repos_url":"https://api.github.com/users/MobiDevelop/repos","events_url":"https://api.github.com/users/MobiDevelop/events{/privacy}","received_events_url":"https://api.github.com/users/MobiDevelop/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T19:32:29Z","updated_at":"2016-04-06T19:32:29Z","body":"Previous discussion on use of markup in TextField/TextArea: https://github.com/libgdx/libgdx/issues/2645"}}