{"action":"created","issue":{"url":"https://api.github.com/repos/mgba-emu/mgba/issues/1055","repository_url":"https://api.github.com/repos/mgba-emu/mgba","labels_url":"https://api.github.com/repos/mgba-emu/mgba/issues/1055/labels{/name}","comments_url":"https://api.github.com/repos/mgba-emu/mgba/issues/1055/comments","events_url":"https://api.github.com/repos/mgba-emu/mgba/issues/1055/events","html_url":"https://github.com/mgba-emu/mgba/issues/1055","id":316139822,"number":1055,"title":"GIF recorder uses wrong dimensions with SGB border","user":{"login":"dobyrch","id":2789460,"avatar_url":"https://avatars2.githubusercontent.com/u/2789460?v=4","gravatar_id":"","url":"https://api.github.com/users/dobyrch","html_url":"https://github.com/dobyrch","followers_url":"https://api.github.com/users/dobyrch/followers","following_url":"https://api.github.com/users/dobyrch/following{/other_user}","gists_url":"https://api.github.com/users/dobyrch/gists{/gist_id}","starred_url":"https://api.github.com/users/dobyrch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dobyrch/subscriptions","organizations_url":"https://api.github.com/users/dobyrch/orgs","repos_url":"https://api.github.com/users/dobyrch/repos","events_url":"https://api.github.com/users/dobyrch/events{/privacy}","received_events_url":"https://api.github.com/users/dobyrch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-04-20T06:10:33Z","updated_at":"2018-04-24T04:37:29Z","closed_at":"2018-04-21T01:58:56Z","author_association":"CONTRIBUTOR","body":"Version: 9630583646b9\r\nOS: Arch Linux x86_64\r\n\r\nThe GIF recorder always records Game Boy games at 160x144, resulting in cropped images when SGB borders are enabled.\r\n\r\n![border](https://user-images.githubusercontent.com/2789460/39033352-2d6478c8-44a4-11e8-823d-f58ea415de68.gif)\r\n"},"comment":{"url":"https://api.github.com/repos/mgba-emu/mgba/issues/comments/383800842","html_url":"https://github.com/mgba-emu/mgba/issues/1055#issuecomment-383800842","issue_url":"https://api.github.com/repos/mgba-emu/mgba/issues/1055","id":383800842,"user":{"login":"dobyrch","id":2789460,"avatar_url":"https://avatars2.githubusercontent.com/u/2789460?v=4","gravatar_id":"","url":"https://api.github.com/users/dobyrch","html_url":"https://github.com/dobyrch","followers_url":"https://api.github.com/users/dobyrch/followers","following_url":"https://api.github.com/users/dobyrch/following{/other_user}","gists_url":"https://api.github.com/users/dobyrch/gists{/gist_id}","starred_url":"https://api.github.com/users/dobyrch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dobyrch/subscriptions","organizations_url":"https://api.github.com/users/dobyrch/orgs","repos_url":"https://api.github.com/users/dobyrch/repos","events_url":"https://api.github.com/users/dobyrch/events{/privacy}","received_events_url":"https://api.github.com/users/dobyrch/received_events","type":"User","site_admin":false},"created_at":"2018-04-24T04:37:29Z","updated_at":"2018-04-24T04:37:29Z","author_association":"CONTRIBUTOR","body":"Not long at all, it usually locks up as soon as you hit start and crashes one or two seconds later.  \r\n\r\nI think I've figured out what's happening... `ImageMagickGIFEncoderInit` sets `iwidth` and `iheight` to the GBA dimensions, i.e. 240x160.  Adding a print statement right before the `malloc` in `ImageMagickGIFEncoderOpen` confirms that the dimensions don't get updated.  When SGB borders are enabled, the buffer isn't big enough, leading to an overflow that corrupts the heap—hence the segfault in `malloc`."}}
{"actor":{"display_login":"dobyrch"}}