{"action":"closed","number":15646,"pull_request":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15646","id":70110180,"html_url":"https://github.com/cocos2d/cocos2d-x/pull/15646","diff_url":"https://github.com/cocos2d/cocos2d-x/pull/15646.diff","patch_url":"https://github.com/cocos2d/cocos2d-x/pull/15646.patch","issue_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15646","number":15646,"state":"closed","locked":false,"title":"Fix crash due to reallocation of shared indices memory","user":{"login":"Rypac","id":5798516,"avatar_url":"https://avatars.githubusercontent.com/u/5798516?v=3","gravatar_id":"","url":"https://api.github.com/users/Rypac","html_url":"https://github.com/Rypac","followers_url":"https://api.github.com/users/Rypac/followers","following_url":"https://api.github.com/users/Rypac/following{/other_user}","gists_url":"https://api.github.com/users/Rypac/gists{/gist_id}","starred_url":"https://api.github.com/users/Rypac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rypac/subscriptions","organizations_url":"https://api.github.com/users/Rypac/orgs","repos_url":"https://api.github.com/users/Rypac/repos","events_url":"https://api.github.com/users/Rypac/events{/privacy}","received_events_url":"https://api.github.com/users/Rypac/received_events","type":"User","site_admin":false},"body":"This PR provides a fix for issue #15439.\r\n\r\nAs detailed in the issue, the crash is caused by multiple references to the static `__indices[]` array and the invalidation of these references when this cache is expanded with `realloc()`.\r\n\r\nRather than simply expanding, new memory is allocated to `__indicies[]` and references to any previous `__indicies` are captured by the `QuadCommand` for the duration of its lifetime. The triangle indices used by the `Renderer` are now guaranteed to be valid at the point copying the GL buffer.\r\n\r\nThe proposed fix will result in a slightly higher amount of memory usage whenever the shared indices buffer grows but will eventually stabilise (assuming no references to the `QuadCommand` are kept from deallocating).\r\n\r\nMaybe a larger refactor for dealing with the shared memory should be considered but this is a fairly low impact fix which should at least stop the crashes!","created_at":"2016-05-15T02:37:54Z","updated_at":"2016-05-24T14:29:29Z","closed_at":"2016-05-24T14:29:28Z","merged_at":"2016-05-24T14:29:28Z","merge_commit_sha":"23c5c18c91ada1e652b1545900a16b491765b692","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15646/commits","review_comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15646/comments","review_comment_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15646/comments","statuses_url":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/8ca09f7c2a27ddc905ebf655c460ed9a8fe25a7c","head":{"label":"Rypac:fix_quadcommand_crash","ref":"fix_quadcommand_crash","sha":"8ca09f7c2a27ddc905ebf655c460ed9a8fe25a7c","user":{"login":"Rypac","id":5798516,"avatar_url":"https://avatars.githubusercontent.com/u/5798516?v=3","gravatar_id":"","url":"https://api.github.com/users/Rypac","html_url":"https://github.com/Rypac","followers_url":"https://api.github.com/users/Rypac/followers","following_url":"https://api.github.com/users/Rypac/following{/other_user}","gists_url":"https://api.github.com/users/Rypac/gists{/gist_id}","starred_url":"https://api.github.com/users/Rypac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rypac/subscriptions","organizations_url":"https://api.github.com/users/Rypac/orgs","repos_url":"https://api.github.com/users/Rypac/repos","events_url":"https://api.github.com/users/Rypac/events{/privacy}","received_events_url":"https://api.github.com/users/Rypac/received_events","type":"User","site_admin":false},"repo":{"id":58838600,"name":"cocos2d-x","full_name":"Rypac/cocos2d-x","owner":{"login":"Rypac","id":5798516,"avatar_url":"https://avatars.githubusercontent.com/u/5798516?v=3","gravatar_id":"","url":"https://api.github.com/users/Rypac","html_url":"https://github.com/Rypac","followers_url":"https://api.github.com/users/Rypac/followers","following_url":"https://api.github.com/users/Rypac/following{/other_user}","gists_url":"https://api.github.com/users/Rypac/gists{/gist_id}","starred_url":"https://api.github.com/users/Rypac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rypac/subscriptions","organizations_url":"https://api.github.com/users/Rypac/orgs","repos_url":"https://api.github.com/users/Rypac/repos","events_url":"https://api.github.com/users/Rypac/events{/privacy}","received_events_url":"https://api.github.com/users/Rypac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rypac/cocos2d-x","description":"cocos2d-x for C++","fork":true,"url":"https://api.github.com/repos/Rypac/cocos2d-x","forks_url":"https://api.github.com/repos/Rypac/cocos2d-x/forks","keys_url":"https://api.github.com/repos/Rypac/cocos2d-x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rypac/cocos2d-x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rypac/cocos2d-x/teams","hooks_url":"https://api.github.com/repos/Rypac/cocos2d-x/hooks","issue_events_url":"https://api.github.com/repos/Rypac/cocos2d-x/issues/events{/number}","events_url":"https://api.github.com/repos/Rypac/cocos2d-x/events","assignees_url":"https://api.github.com/repos/Rypac/cocos2d-x/assignees{/user}","branches_url":"https://api.github.com/repos/Rypac/cocos2d-x/branches{/branch}","tags_url":"https://api.github.com/repos/Rypac/cocos2d-x/tags","blobs_url":"https://api.github.com/repos/Rypac/cocos2d-x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rypac/cocos2d-x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rypac/cocos2d-x/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rypac/cocos2d-x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rypac/cocos2d-x/statuses/{sha}","languages_url":"https://api.github.com/repos/Rypac/cocos2d-x/languages","stargazers_url":"https://api.github.com/repos/Rypac/cocos2d-x/stargazers","contributors_url":"https://api.github.com/repos/Rypac/cocos2d-x/contributors","subscribers_url":"https://api.github.com/repos/Rypac/cocos2d-x/subscribers","subscription_url":"https://api.github.com/repos/Rypac/cocos2d-x/subscription","commits_url":"https://api.github.com/repos/Rypac/cocos2d-x/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rypac/cocos2d-x/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rypac/cocos2d-x/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rypac/cocos2d-x/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rypac/cocos2d-x/contents/{+path}","compare_url":"https://api.github.com/repos/Rypac/cocos2d-x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rypac/cocos2d-x/merges","archive_url":"https://api.github.com/repos/Rypac/cocos2d-x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rypac/cocos2d-x/downloads","issues_url":"https://api.github.com/repos/Rypac/cocos2d-x/issues{/number}","pulls_url":"https://api.github.com/repos/Rypac/cocos2d-x/pulls{/number}","milestones_url":"https://api.github.com/repos/Rypac/cocos2d-x/milestones{/number}","notifications_url":"https://api.github.com/repos/Rypac/cocos2d-x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rypac/cocos2d-x/labels{/name}","releases_url":"https://api.github.com/repos/Rypac/cocos2d-x/releases{/id}","deployments_url":"https://api.github.com/repos/Rypac/cocos2d-x/deployments","created_at":"2016-05-15T01:37:36Z","updated_at":"2016-05-15T01:38:00Z","pushed_at":"2016-05-21T00:53:44Z","git_url":"git://github.com/Rypac/cocos2d-x.git","ssh_url":"git@github.com:Rypac/cocos2d-x.git","clone_url":"https://github.com/Rypac/cocos2d-x.git","svn_url":"https://github.com/Rypac/cocos2d-x","homepage":"http://www.cocos2d-x.org","size":880902,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"v3"}},"base":{"label":"cocos2d:v3","ref":"v3","sha":"040354169380d124353910e12bc93d8969ee1c2b","user":{"login":"cocos2d","id":234324,"avatar_url":"https://avatars.githubusercontent.com/u/234324?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos2d","html_url":"https://github.com/cocos2d","followers_url":"https://api.github.com/users/cocos2d/followers","following_url":"https://api.github.com/users/cocos2d/following{/other_user}","gists_url":"https://api.github.com/users/cocos2d/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos2d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos2d/subscriptions","organizations_url":"https://api.github.com/users/cocos2d/orgs","repos_url":"https://api.github.com/users/cocos2d/repos","events_url":"https://api.github.com/users/cocos2d/events{/privacy}","received_events_url":"https://api.github.com/users/cocos2d/received_events","type":"Organization","site_admin":false},"repo":{"id":1093228,"name":"cocos2d-x","full_name":"cocos2d/cocos2d-x","owner":{"login":"cocos2d","id":234324,"avatar_url":"https://avatars.githubusercontent.com/u/234324?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos2d","html_url":"https://github.com/cocos2d","followers_url":"https://api.github.com/users/cocos2d/followers","following_url":"https://api.github.com/users/cocos2d/following{/other_user}","gists_url":"https://api.github.com/users/cocos2d/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos2d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos2d/subscriptions","organizations_url":"https://api.github.com/users/cocos2d/orgs","repos_url":"https://api.github.com/users/cocos2d/repos","events_url":"https://api.github.com/users/cocos2d/events{/privacy}","received_events_url":"https://api.github.com/users/cocos2d/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cocos2d/cocos2d-x","description":"cocos2d-x for C++","fork":false,"url":"https://api.github.com/repos/cocos2d/cocos2d-x","forks_url":"https://api.github.com/repos/cocos2d/cocos2d-x/forks","keys_url":"https://api.github.com/repos/cocos2d/cocos2d-x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cocos2d/cocos2d-x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cocos2d/cocos2d-x/teams","hooks_url":"https://api.github.com/repos/cocos2d/cocos2d-x/hooks","issue_events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/events{/number}","events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/events","assignees_url":"https://api.github.com/repos/cocos2d/cocos2d-x/assignees{/user}","branches_url":"https://api.github.com/repos/cocos2d/cocos2d-x/branches{/branch}","tags_url":"https://api.github.com/repos/cocos2d/cocos2d-x/tags","blobs_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/refs{/sha}","trees_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/{sha}","languages_url":"https://api.github.com/repos/cocos2d/cocos2d-x/languages","stargazers_url":"https://api.github.com/repos/cocos2d/cocos2d-x/stargazers","contributors_url":"https://api.github.com/repos/cocos2d/cocos2d-x/contributors","subscribers_url":"https://api.github.com/repos/cocos2d/cocos2d-x/subscribers","subscription_url":"https://api.github.com/repos/cocos2d/cocos2d-x/subscription","commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/commits{/sha}","git_commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/commits{/sha}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/comments{/number}","issue_comment_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/comments{/number}","contents_url":"https://api.github.com/repos/cocos2d/cocos2d-x/contents/{+path}","compare_url":"https://api.github.com/repos/cocos2d/cocos2d-x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cocos2d/cocos2d-x/merges","archive_url":"https://api.github.com/repos/cocos2d/cocos2d-x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cocos2d/cocos2d-x/downloads","issues_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues{/number}","pulls_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls{/number}","milestones_url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones{/number}","notifications_url":"https://api.github.com/repos/cocos2d/cocos2d-x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/labels{/name}","releases_url":"https://api.github.com/repos/cocos2d/cocos2d-x/releases{/id}","deployments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/deployments","created_at":"2010-11-18T23:17:00Z","updated_at":"2016-05-24T14:24:07Z","pushed_at":"2016-05-24T14:29:28Z","git_url":"git://github.com/cocos2d/cocos2d-x.git","ssh_url":"git@github.com:cocos2d/cocos2d-x.git","clone_url":"https://github.com/cocos2d/cocos2d-x.git","svn_url":"https://github.com/cocos2d/cocos2d-x","homepage":"http://www.cocos2d-x.org","size":1511002,"stargazers_count":8065,"watchers_count":8065,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5406,"mirror_url":null,"open_issues_count":1056,"forks":5406,"open_issues":1056,"watchers":8065,"default_branch":"v3"}},"_links":{"self":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15646"},"html":{"href":"https://github.com/cocos2d/cocos2d-x/pull/15646"},"issue":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15646"},"comments":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15646/comments"},"review_comments":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15646/comments"},"review_comment":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15646/commits"},"statuses":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/8ca09f7c2a27ddc905ebf655c460ed9a8fe25a7c"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"ricardoquesada","id":232330,"avatar_url":"https://avatars.githubusercontent.com/u/232330?v=3","gravatar_id":"","url":"https://api.github.com/users/ricardoquesada","html_url":"https://github.com/ricardoquesada","followers_url":"https://api.github.com/users/ricardoquesada/followers","following_url":"https://api.github.com/users/ricardoquesada/following{/other_user}","gists_url":"https://api.github.com/users/ricardoquesada/gists{/gist_id}","starred_url":"https://api.github.com/users/ricardoquesada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricardoquesada/subscriptions","organizations_url":"https://api.github.com/users/ricardoquesada/orgs","repos_url":"https://api.github.com/users/ricardoquesada/repos","events_url":"https://api.github.com/users/ricardoquesada/events{/privacy}","received_events_url":"https://api.github.com/users/ricardoquesada/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":12,"deletions":3,"changed_files":2}}
{"actor":{"display_login":"ricardoquesada"}}