{"action":"created","issue":{"url":"https://api.github.com/repos/OpenRCT2/OpenRCT2/issues/4122","repository_url":"https://api.github.com/repos/OpenRCT2/OpenRCT2","labels_url":"https://api.github.com/repos/OpenRCT2/OpenRCT2/issues/4122/labels{/name}","comments_url":"https://api.github.com/repos/OpenRCT2/OpenRCT2/issues/4122/comments","events_url":"https://api.github.com/repos/OpenRCT2/OpenRCT2/issues/4122/events","html_url":"https://github.com/OpenRCT2/OpenRCT2/issues/4122","id":165981031,"number":4122,"title":"Crash in gfx_object_free_images","user":{"login":"janisozaur","id":550290,"avatar_url":"https://avatars.githubusercontent.com/u/550290?v=3","gravatar_id":"","url":"https://api.github.com/users/janisozaur","html_url":"https://github.com/janisozaur","followers_url":"https://api.github.com/users/janisozaur/followers","following_url":"https://api.github.com/users/janisozaur/following{/other_user}","gists_url":"https://api.github.com/users/janisozaur/gists{/gist_id}","starred_url":"https://api.github.com/users/janisozaur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janisozaur/subscriptions","organizations_url":"https://api.github.com/users/janisozaur/orgs","repos_url":"https://api.github.com/users/janisozaur/repos","events_url":"https://api.github.com/users/janisozaur/events{/privacy}","received_events_url":"https://api.github.com/users/janisozaur/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-17T15:20:41Z","updated_at":"2016-07-17T16:15:36Z","closed_at":null,"body":"**OS:** Linux\r\n**Commit/Build:** 964cf66\r\n\r\nWhenever I close the game at 964cf66, it crashes. The crash did not occur in 83fa818 (`964cf66^`)\r\n\r\nBacktrace/additional info:\r\n```\r\nThread 1 \"openrct2\" received signal SIGSEGV, Segmentation fault.\r\n0x0164fa72 in gfx_object_free_images (baseImageId=29294, count=363) at /home/janisozaur/workspace/OpenRCT2/src/drawing/Image.cpp:153\r\n153\t                g1Elements[imageId] = { 0 };\r\n(gdb) bt\r\n#0  0x0164fa72 in gfx_object_free_images (baseImageId=29294, count=363) at /home/janisozaur/workspace/OpenRCT2/src/drawing/Image.cpp:153\r\n#1  0x015f67b5 in RideObject::Unload (this=0x1bbbe08) at /home/janisozaur/workspace/OpenRCT2/src/object/RideObject.cpp:345\r\n#2  0x015f94f5 in ObjectManager::UnloadObject (this=0x1a25048, object=0x1bbbe08) at /home/janisozaur/workspace/OpenRCT2/src/object/ObjectManager.cpp:270\r\n#3  0x015f8ff8 in ObjectManager::UnloadAll (this=0x1a25048) at /home/janisozaur/workspace/OpenRCT2/src/object/ObjectManager.cpp:184\r\n#4  0x015f8929 in object_manager_unload_all_objects () at /home/janisozaur/workspace/OpenRCT2/src/object/ObjectManager.cpp:569\r\n#5  0x0145a0a5 in rct2_dispose () at /home/janisozaur/workspace/OpenRCT2/src/rct2.c:144\r\n#6  0x015e349a in openrct2_dispose () at /home/janisozaur/workspace/OpenRCT2/src/openrct2.c:337\r\n#7  0x015e3465 in openrct2_launch () at /home/janisozaur/workspace/OpenRCT2/src/openrct2.c:326\r\n#8  0x015de30d in main (argc=1, argv=0xffffd634) at /home/janisozaur/workspace/OpenRCT2/src/platform/posix.c:60\r\n(gdb) p imageId \r\n$1 = 29294\r\n(gdb) p g1Elements[imageId]\r\n$2 = {offset = 0x43394544 <error: Cannot access memory at address 0x43394544>, width = 24320, height = 20058, x_offset = 29779, y_offset = 12337, flags = 28277, \r\n  zoomed_offset = 29033}\r\n```\r\n\r\n**Steps to reproduce:**\r\n1. Launch OpenRCT2\r\n2. Close OpenRCT2"},"comment":{"url":"https://api.github.com/repos/OpenRCT2/OpenRCT2/issues/comments/233189755","html_url":"https://github.com/OpenRCT2/OpenRCT2/issues/4122#issuecomment-233189755","issue_url":"https://api.github.com/repos/OpenRCT2/OpenRCT2/issues/4122","id":233189755,"user":{"login":"IntelOrca","id":1482259,"avatar_url":"https://avatars.githubusercontent.com/u/1482259?v=3","gravatar_id":"","url":"https://api.github.com/users/IntelOrca","html_url":"https://github.com/IntelOrca","followers_url":"https://api.github.com/users/IntelOrca/followers","following_url":"https://api.github.com/users/IntelOrca/following{/other_user}","gists_url":"https://api.github.com/users/IntelOrca/gists{/gist_id}","starred_url":"https://api.github.com/users/IntelOrca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IntelOrca/subscriptions","organizations_url":"https://api.github.com/users/IntelOrca/orgs","repos_url":"https://api.github.com/users/IntelOrca/repos","events_url":"https://api.github.com/users/IntelOrca/events{/privacy}","received_events_url":"https://api.github.com/users/IntelOrca/received_events","type":"User","site_admin":false},"created_at":"2016-07-17T16:15:36Z","updated_at":"2016-07-17T16:15:36Z","body":"It gets reallocated in `read_and_convert_gxdat`"}}
{"actor":{"display_login":"IntelOrca"}}