{"action":"closed","issue":{"url":"https://api.github.com/repos/processing/processing/issues/4436","repository_url":"https://api.github.com/repos/processing/processing","labels_url":"https://api.github.com/repos/processing/processing/issues/4436/labels{/name}","comments_url":"https://api.github.com/repos/processing/processing/issues/4436/comments","events_url":"https://api.github.com/repos/processing/processing/issues/4436/events","html_url":"https://github.com/processing/processing/issues/4436","id":152488829,"number":4436,"title":"Resizing sketch window produces crash in loadPixels()","user":{"login":"Splitter4","id":2946729,"avatar_url":"https://avatars.githubusercontent.com/u/2946729?v=3","gravatar_id":"","url":"https://api.github.com/users/Splitter4","html_url":"https://github.com/Splitter4","followers_url":"https://api.github.com/users/Splitter4/followers","following_url":"https://api.github.com/users/Splitter4/following{/other_user}","gists_url":"https://api.github.com/users/Splitter4/gists{/gist_id}","starred_url":"https://api.github.com/users/Splitter4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Splitter4/subscriptions","organizations_url":"https://api.github.com/users/Splitter4/orgs","repos_url":"https://api.github.com/users/Splitter4/repos","events_url":"https://api.github.com/users/Splitter4/events{/privacy}","received_events_url":"https://api.github.com/users/Splitter4/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-02T06:21:17Z","updated_at":"2016-05-08T20:15:49Z","closed_at":"2016-05-08T20:15:49Z","body":"The crash in question happens in version 3.0.2 and is shown in the console as\r\n\r\n> ArrayIndexOutOfBoundsException: Coordinate out of bounds!\r\n\r\nHere's the code:\r\n\r\n```\r\nvoid setup()\r\n{\r\n  surface.setResizable(true);\r\n}\r\n\r\nvoid draw()\r\n{\r\n  loadPixels();\r\n}\r\n```\r\n\r\nThen, with the sketch running, try resizing its window to make it larger.\r\n\r\nThis issue does not happen in an earlier version like 2.2.1 using `frame.setResizable(true)` instead of `surface.setResizable(true)`.\r\n\r\nP.S.: I didn't know if this was worthy of another issue, but a crash also happens if you resize the window so that the height equals 0 (\"Width(128) and height (0) cannot be <= 0\"). I imagine the same must occur for a width of zero, but I was unable to resize the window to make it so. Is it the sketch author's responsibility to deal with this issue? If so, how?"}}