{"action":"created","comment":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments/73122692","id":73122692,"diff_hunk":"@@ -0,0 +1,26 @@\n+//\n+//  Bug-15776.cpp\n+//  cocos2d_tests\n+//\n+//  Created by Ricardo Quesada on 6/17/16.\n+//\n+//\n+\n+#include \"Bug-15776.h\"\n+\n+\n+USING_NS_CC;\n+\n+bool Bug15776Layer::init()\n+{\n+    if (BugsTestBase::init())\n+    {\n+        cocos2d::Image *cocos2dxImage = new cocos2d::Image();\n+        cocos2dxImage->initWithImageData(nullptr, 0);\n+        // should not crash. invalid cocos2dImage\n+        auto texture2d = Director::getInstance()->getTextureCache()->addImage(cocos2dxImage, \"unused\");\n+        return texture2d;","path":"tests/cpp-tests/Classes/BugsTest/Bug-15776.cpp","position":22,"original_position":22,"commit_id":"c387f953fa262d2f5d51154ff842c6a941a68337","original_commit_id":"c387f953fa262d2f5d51154ff842c6a941a68337","user":{"login":"minggo","id":488203,"avatar_url":"https://avatars.githubusercontent.com/u/488203?v=3","gravatar_id":"","url":"https://api.github.com/users/minggo","html_url":"https://github.com/minggo","followers_url":"https://api.github.com/users/minggo/followers","following_url":"https://api.github.com/users/minggo/following{/other_user}","gists_url":"https://api.github.com/users/minggo/gists{/gist_id}","starred_url":"https://api.github.com/users/minggo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minggo/subscriptions","organizations_url":"https://api.github.com/users/minggo/orgs","repos_url":"https://api.github.com/users/minggo/repos","events_url":"https://api.github.com/users/minggo/events{/privacy}","received_events_url":"https://api.github.com/users/minggo/received_events","type":"User","site_admin":false},"body":"@ricardoquesada it will cause `assert` error as you added `CCASSERT(image->getData() != nullptr, \"TextureCache: image MUST not be nil\");` in `TextureCache::addImage`. So i am confused with the test case.","created_at":"2016-08-02T09:26:49Z","updated_at":"2016-08-02T09:26:49Z","html_url":"https://github.com/cocos2d/cocos2d-x/pull/15880#discussion_r73122692","pull_request_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15880","_links":{"self":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments/73122692"},"html":{"href":"https://github.com/cocos2d/cocos2d-x/pull/15880#discussion_r73122692"},"pull_request":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15880"}}},"pull_request":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15880","id":74317012,"html_url":"https://github.com/cocos2d/cocos2d-x/pull/15880","diff_url":"https://github.com/cocos2d/cocos2d-x/pull/15880.diff","patch_url":"https://github.com/cocos2d/cocos2d-x/pull/15880.patch","issue_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15880","number":15880,"state":"closed","locked":false,"title":"fix: TextureCache ASSERTS if image is invalid","user":{"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},"body":"Github issue #15776","created_at":"2016-06-17T23:08:24Z","updated_at":"2016-08-02T09:26:49Z","closed_at":"2016-06-17T23:48:19Z","merged_at":"2016-06-17T23:48:19Z","merge_commit_sha":"d9b3ef55ae8aeaf53df3190ef1a56582b43d57ce","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones/29","html_url":"https://github.com/cocos2d/cocos2d-x/milestones/3.13","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones/29/labels","id":1768287,"number":29,"title":"3.13","description":"","creator":{"login":"minggo","id":488203,"avatar_url":"https://avatars.githubusercontent.com/u/488203?v=3","gravatar_id":"","url":"https://api.github.com/users/minggo","html_url":"https://github.com/minggo","followers_url":"https://api.github.com/users/minggo/followers","following_url":"https://api.github.com/users/minggo/following{/other_user}","gists_url":"https://api.github.com/users/minggo/gists{/gist_id}","starred_url":"https://api.github.com/users/minggo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minggo/subscriptions","organizations_url":"https://api.github.com/users/minggo/orgs","repos_url":"https://api.github.com/users/minggo/repos","events_url":"https://api.github.com/users/minggo/events{/privacy}","received_events_url":"https://api.github.com/users/minggo/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":144,"state":"open","created_at":"2016-05-16T09:52:30Z","updated_at":"2016-08-02T08:19:33Z","due_on":"2016-08-29T16:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15880/commits","review_comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15880/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/15880/comments","statuses_url":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/c387f953fa262d2f5d51154ff842c6a941a68337","head":{"label":"ricardoquesada:issue-15776","ref":"issue-15776","sha":"c387f953fa262d2f5d51154ff842c6a941a68337","user":{"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},"repo":{"id":7613866,"name":"cocos2d-x","full_name":"ricardoquesada/cocos2d-x","owner":{"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},"private":false,"html_url":"https://github.com/ricardoquesada/cocos2d-x","description":"Port of cocos2d-iphone in C++","fork":true,"url":"https://api.github.com/repos/ricardoquesada/cocos2d-x","forks_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/forks","keys_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/teams","hooks_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/hooks","issue_events_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/issues/events{/number}","events_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/events","assignees_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/assignees{/user}","branches_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/branches{/branch}","tags_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/tags","blobs_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/git/refs{/sha}","trees_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/statuses/{sha}","languages_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/languages","stargazers_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/stargazers","contributors_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/contributors","subscribers_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/subscribers","subscription_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/subscription","commits_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/commits{/sha}","git_commits_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/git/commits{/sha}","comments_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/comments{/number}","issue_comment_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/issues/comments{/number}","contents_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/contents/{+path}","compare_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/merges","archive_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/downloads","issues_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/issues{/number}","pulls_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/pulls{/number}","milestones_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/milestones{/number}","notifications_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/labels{/name}","releases_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/releases{/id}","deployments_url":"https://api.github.com/repos/ricardoquesada/cocos2d-x/deployments","created_at":"2013-01-14T22:20:32Z","updated_at":"2015-05-06T00:57:54Z","pushed_at":"2016-07-28T14:27:02Z","git_url":"git://github.com/ricardoquesada/cocos2d-x.git","ssh_url":"git@github.com:ricardoquesada/cocos2d-x.git","clone_url":"https://github.com/ricardoquesada/cocos2d-x.git","svn_url":"https://github.com/ricardoquesada/cocos2d-x","homepage":"http://www.cocos2d-x.org","size":1036011,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":0,"forks":4,"open_issues":0,"watchers":1,"default_branch":"v3"}},"base":{"label":"cocos2d:v3","ref":"v3","sha":"f9988cad8e98b8716778ae062e938d79c2678d96","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-08-02T09:25:32Z","pushed_at":"2016-08-02T08:52:15Z","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":1513490,"stargazers_count":8466,"watchers_count":8466,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5582,"mirror_url":null,"open_issues_count":884,"forks":5582,"open_issues":884,"watchers":8466,"default_branch":"v3"}},"_links":{"self":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15880"},"html":{"href":"https://github.com/cocos2d/cocos2d-x/pull/15880"},"issue":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15880"},"comments":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15880/comments"},"review_comments":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/15880/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/15880/commits"},"statuses":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/c387f953fa262d2f5d51154ff842c6a941a68337"}}}}
{"actor":{"display_login":"minggo"}}