{"action":"opened","number":81,"pull_request":{"url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/pulls/81","id":38688039,"html_url":"https://github.com/Flipboard/FLAnimatedImage/pull/81","diff_url":"https://github.com/Flipboard/FLAnimatedImage/pull/81.diff","patch_url":"https://github.com/Flipboard/FLAnimatedImage/pull/81.patch","issue_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/issues/81","number":81,"state":"open","locked":false,"title":"Corrupt frame fixup","user":{"login":"tijoinc","id":522951,"avatar_url":"https://avatars.githubusercontent.com/u/522951?v=3","gravatar_id":"","url":"https://api.github.com/users/tijoinc","html_url":"https://github.com/tijoinc","followers_url":"https://api.github.com/users/tijoinc/followers","following_url":"https://api.github.com/users/tijoinc/following{/other_user}","gists_url":"https://api.github.com/users/tijoinc/gists{/gist_id}","starred_url":"https://api.github.com/users/tijoinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tijoinc/subscriptions","organizations_url":"https://api.github.com/users/tijoinc/orgs","repos_url":"https://api.github.com/users/tijoinc/repos","events_url":"https://api.github.com/users/tijoinc/events{/privacy}","received_events_url":"https://api.github.com/users/tijoinc/received_events","type":"User","site_admin":false},"body":"This pull request resolves an issue causing images with corrupt frames to crash `FLAnimatedImage`, specifically images like [this](https://dl.dropboxusercontent.com/s/duveng0hqjc263t/scotus-gay-marriage-decision%20copy-6-26-2015.gif). The reason for this crash was that frames were attempting to be injected into the `cachedFrames` at indexes that were out of bounds. As a simplification, I converted `cachedFrames` and `delayTimes` to dictionaries, which are more tolerant of nulls. I also made it so that frames lacking delays are skipped in https://github.com/Flipboard/FLAnimatedImage/commit/178b714357fef62c38c7aec5ba65d41ca2cf069e.\r\n\r\nA simple way to test this is to change the URL on [this line](https://github.com/Flipboard/FLAnimatedImage/blob/master/FLAnimatedImageDemo/RootViewController.m#L103) to https://dl.dropboxusercontent.com/s/duveng0hqjc263t/scotus-gay-marriage-decision%20copy-6-26-2015.gif.","created_at":"2015-06-26T20:48:56Z","updated_at":"2015-06-26T20:48:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/pulls/81/commits","review_comments_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/pulls/81/comments","review_comment_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/issues/81/comments","statuses_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/statuses/622b97a099acf79dbe461dcf1047dec47f21bf65","head":{"label":"Flipboard:corrupt-frame-fixup","ref":"corrupt-frame-fixup","sha":"622b97a099acf79dbe461dcf1047dec47f21bf65","user":{"login":"Flipboard","id":457049,"avatar_url":"https://avatars.githubusercontent.com/u/457049?v=3","gravatar_id":"","url":"https://api.github.com/users/Flipboard","html_url":"https://github.com/Flipboard","followers_url":"https://api.github.com/users/Flipboard/followers","following_url":"https://api.github.com/users/Flipboard/following{/other_user}","gists_url":"https://api.github.com/users/Flipboard/gists{/gist_id}","starred_url":"https://api.github.com/users/Flipboard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flipboard/subscriptions","organizations_url":"https://api.github.com/users/Flipboard/orgs","repos_url":"https://api.github.com/users/Flipboard/repos","events_url":"https://api.github.com/users/Flipboard/events{/privacy}","received_events_url":"https://api.github.com/users/Flipboard/received_events","type":"Organization","site_admin":false},"repo":{"id":19951534,"name":"FLAnimatedImage","full_name":"Flipboard/FLAnimatedImage","owner":{"login":"Flipboard","id":457049,"avatar_url":"https://avatars.githubusercontent.com/u/457049?v=3","gravatar_id":"","url":"https://api.github.com/users/Flipboard","html_url":"https://github.com/Flipboard","followers_url":"https://api.github.com/users/Flipboard/followers","following_url":"https://api.github.com/users/Flipboard/following{/other_user}","gists_url":"https://api.github.com/users/Flipboard/gists{/gist_id}","starred_url":"https://api.github.com/users/Flipboard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flipboard/subscriptions","organizations_url":"https://api.github.com/users/Flipboard/orgs","repos_url":"https://api.github.com/users/Flipboard/repos","events_url":"https://api.github.com/users/Flipboard/events{/privacy}","received_events_url":"https://api.github.com/users/Flipboard/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Flipboard/FLAnimatedImage","description":"Performant animated GIF engine for iOS","fork":false,"url":"https://api.github.com/repos/Flipboard/FLAnimatedImage","forks_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/forks","keys_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/teams","hooks_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/hooks","issue_events_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/issues/events{/number}","events_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/events","assignees_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/assignees{/user}","branches_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/branches{/branch}","tags_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/tags","blobs_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/git/refs{/sha}","trees_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/statuses/{sha}","languages_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/languages","stargazers_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/stargazers","contributors_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/contributors","subscribers_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/subscribers","subscription_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/subscription","commits_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/commits{/sha}","git_commits_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/git/commits{/sha}","comments_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/comments{/number}","issue_comment_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/issues/comments{/number}","contents_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/contents/{+path}","compare_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/merges","archive_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/downloads","issues_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/issues{/number}","pulls_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/pulls{/number}","milestones_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/milestones{/number}","notifications_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/labels{/name}","releases_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/releases{/id}","created_at":"2014-05-19T17:44:51Z","updated_at":"2015-06-26T14:38:47Z","pushed_at":"2015-06-26T20:48:56Z","git_url":"git://github.com/Flipboard/FLAnimatedImage.git","ssh_url":"git@github.com:Flipboard/FLAnimatedImage.git","clone_url":"https://github.com/Flipboard/FLAnimatedImage.git","svn_url":"https://github.com/Flipboard/FLAnimatedImage","homepage":"","size":12453,"stargazers_count":2375,"watchers_count":2375,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":297,"mirror_url":null,"open_issues_count":35,"forks":297,"open_issues":35,"watchers":2375,"default_branch":"master"}},"base":{"label":"Flipboard:master","ref":"master","sha":"b6657dfa83a6644e7e692887a4ec1e1bda559489","user":{"login":"Flipboard","id":457049,"avatar_url":"https://avatars.githubusercontent.com/u/457049?v=3","gravatar_id":"","url":"https://api.github.com/users/Flipboard","html_url":"https://github.com/Flipboard","followers_url":"https://api.github.com/users/Flipboard/followers","following_url":"https://api.github.com/users/Flipboard/following{/other_user}","gists_url":"https://api.github.com/users/Flipboard/gists{/gist_id}","starred_url":"https://api.github.com/users/Flipboard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flipboard/subscriptions","organizations_url":"https://api.github.com/users/Flipboard/orgs","repos_url":"https://api.github.com/users/Flipboard/repos","events_url":"https://api.github.com/users/Flipboard/events{/privacy}","received_events_url":"https://api.github.com/users/Flipboard/received_events","type":"Organization","site_admin":false},"repo":{"id":19951534,"name":"FLAnimatedImage","full_name":"Flipboard/FLAnimatedImage","owner":{"login":"Flipboard","id":457049,"avatar_url":"https://avatars.githubusercontent.com/u/457049?v=3","gravatar_id":"","url":"https://api.github.com/users/Flipboard","html_url":"https://github.com/Flipboard","followers_url":"https://api.github.com/users/Flipboard/followers","following_url":"https://api.github.com/users/Flipboard/following{/other_user}","gists_url":"https://api.github.com/users/Flipboard/gists{/gist_id}","starred_url":"https://api.github.com/users/Flipboard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flipboard/subscriptions","organizations_url":"https://api.github.com/users/Flipboard/orgs","repos_url":"https://api.github.com/users/Flipboard/repos","events_url":"https://api.github.com/users/Flipboard/events{/privacy}","received_events_url":"https://api.github.com/users/Flipboard/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Flipboard/FLAnimatedImage","description":"Performant animated GIF engine for iOS","fork":false,"url":"https://api.github.com/repos/Flipboard/FLAnimatedImage","forks_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/forks","keys_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/teams","hooks_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/hooks","issue_events_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/issues/events{/number}","events_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/events","assignees_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/assignees{/user}","branches_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/branches{/branch}","tags_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/tags","blobs_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/git/refs{/sha}","trees_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/statuses/{sha}","languages_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/languages","stargazers_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/stargazers","contributors_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/contributors","subscribers_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/subscribers","subscription_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/subscription","commits_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/commits{/sha}","git_commits_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/git/commits{/sha}","comments_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/comments{/number}","issue_comment_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/issues/comments{/number}","contents_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/contents/{+path}","compare_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/merges","archive_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/downloads","issues_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/issues{/number}","pulls_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/pulls{/number}","milestones_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/milestones{/number}","notifications_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/labels{/name}","releases_url":"https://api.github.com/repos/Flipboard/FLAnimatedImage/releases{/id}","created_at":"2014-05-19T17:44:51Z","updated_at":"2015-06-26T14:38:47Z","pushed_at":"2015-06-26T20:48:56Z","git_url":"git://github.com/Flipboard/FLAnimatedImage.git","ssh_url":"git@github.com:Flipboard/FLAnimatedImage.git","clone_url":"https://github.com/Flipboard/FLAnimatedImage.git","svn_url":"https://github.com/Flipboard/FLAnimatedImage","homepage":"","size":12453,"stargazers_count":2375,"watchers_count":2375,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":297,"mirror_url":null,"open_issues_count":35,"forks":297,"open_issues":35,"watchers":2375,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Flipboard/FLAnimatedImage/pulls/81"},"html":{"href":"https://github.com/Flipboard/FLAnimatedImage/pull/81"},"issue":{"href":"https://api.github.com/repos/Flipboard/FLAnimatedImage/issues/81"},"comments":{"href":"https://api.github.com/repos/Flipboard/FLAnimatedImage/issues/81/comments"},"review_comments":{"href":"https://api.github.com/repos/Flipboard/FLAnimatedImage/pulls/81/comments"},"review_comment":{"href":"https://api.github.com/repos/Flipboard/FLAnimatedImage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Flipboard/FLAnimatedImage/pulls/81/commits"},"statuses":{"href":"https://api.github.com/repos/Flipboard/FLAnimatedImage/statuses/622b97a099acf79dbe461dcf1047dec47f21bf65"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":63,"deletions":58,"changed_files":5}}