{"action":"created","issue":{"url":"https://api.github.com/repos/UPBGE/blender/issues/234","repository_url":"https://api.github.com/repos/UPBGE/blender","labels_url":"https://api.github.com/repos/UPBGE/blender/issues/234/labels{/name}","comments_url":"https://api.github.com/repos/UPBGE/blender/issues/234/comments","events_url":"https://api.github.com/repos/UPBGE/blender/issues/234/events","html_url":"https://github.com/UPBGE/blender/issues/234","id":179917685,"number":234,"title":"Cubemap crash","user":{"login":"youle31","id":10052509,"avatar_url":"https://avatars.githubusercontent.com/u/10052509?v=3","gravatar_id":"","url":"https://api.github.com/users/youle31","html_url":"https://github.com/youle31","followers_url":"https://api.github.com/users/youle31/followers","following_url":"https://api.github.com/users/youle31/following{/other_user}","gists_url":"https://api.github.com/users/youle31/gists{/gist_id}","starred_url":"https://api.github.com/users/youle31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youle31/subscriptions","organizations_url":"https://api.github.com/users/youle31/orgs","repos_url":"https://api.github.com/users/youle31/repos","events_url":"https://api.github.com/users/youle31/events{/privacy}","received_events_url":"https://api.github.com/users/youle31/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/UPBGE/blender/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/UPBGE/blender/labels/extra%20attention%20required","name":"extra attention required","color":"fbca04"},{"url":"https://api.github.com/repos/UPBGE/blender/labels/high%20priority","name":"high priority","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-28T23:33:24Z","updated_at":"2016-09-30T12:13:48Z","closed_at":null,"body":"test file: http://pasteall.org/blend/index.php?id=43763\r\n\r\nsteps to reproduce the crash: \r\n\r\n(01:08:29) HumanSheeple: select the middle cylinder\r\n(01:08:32) HumanSheeple: edit mode\r\n(01:08:37) HumanSheeple: select the top face, scale inwards\r\n(01:08:42) HumanSheeple: go to object mode\r\n(01:08:45) HumanSheeple: select the cube\r\n(01:08:48) HumanSheeple: run game\r\n(01:08:50) HumanSheeple: quit game\r\n(01:08:52) HumanSheeple: ctrl z\r\n(01:09:01) HumanSheeple: at this point every reflective object should go black\r\n(01:09:08) HumanSheeple: run game again it should crash\r\n\r\nIt didn't crashed for me the first time but it crashed after several tries. My debugger says that at a moment, fb->colortex[slot] is NULL so when we call RAS_CubeMap::BindFace ->GPU_framebuffer_bind_no_save(m_fbos[index], 0); ->glViewport(0, 0, GPU_texture_width(fb->colortex[slot]), GPU_texture_height(fb->colortex[slot])); it causes a crash\r\n\r\nThanks very much @HumanSheeple for bug report\r\n\r\nEDIT: The crash doesn't happen when we comment GPU_free_image(texture->GetImage()); in RAS_CubeMap destructor but the image is not restored...\r\n\r\nEDIT2: I randomly tested functions from BKE_images and it seems http://pasteall.org/82276/diff does the stuff. But don't ask me why :)"},"comment":{"url":"https://api.github.com/repos/UPBGE/blender/issues/comments/250729507","html_url":"https://github.com/UPBGE/blender/issues/234#issuecomment-250729507","issue_url":"https://api.github.com/repos/UPBGE/blender/issues/234","id":250729507,"user":{"login":"youle31","id":10052509,"avatar_url":"https://avatars.githubusercontent.com/u/10052509?v=3","gravatar_id":"","url":"https://api.github.com/users/youle31","html_url":"https://github.com/youle31","followers_url":"https://api.github.com/users/youle31/followers","following_url":"https://api.github.com/users/youle31/following{/other_user}","gists_url":"https://api.github.com/users/youle31/gists{/gist_id}","starred_url":"https://api.github.com/users/youle31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youle31/subscriptions","organizations_url":"https://api.github.com/users/youle31/orgs","repos_url":"https://api.github.com/users/youle31/repos","events_url":"https://api.github.com/users/youle31/events{/privacy}","received_events_url":"https://api.github.com/users/youle31/received_events","type":"User","site_admin":false},"created_at":"2016-09-30T12:13:48Z","updated_at":"2016-09-30T12:13:48Z","body":"After playing with reflection/refraction, this bug happens very oftem so I mark it as high priority"}}
{"actor":{"display_login":"youle31"}}