{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1930","repository_url":"https://api.github.com/repos/HaxeFlixel/flixel","labels_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1930/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1930/comments","events_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1930/events","html_url":"https://github.com/HaxeFlixel/flixel/issues/1930","id":175162373,"number":1930,"title":"Crash at splash screen when loading embedded sound asset","user":{"login":"bendmorris","id":544977,"avatar_url":"https://avatars.githubusercontent.com/u/544977?v=3","gravatar_id":"","url":"https://api.github.com/users/bendmorris","html_url":"https://github.com/bendmorris","followers_url":"https://api.github.com/users/bendmorris/followers","following_url":"https://api.github.com/users/bendmorris/following{/other_user}","gists_url":"https://api.github.com/users/bendmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/bendmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendmorris/subscriptions","organizations_url":"https://api.github.com/users/bendmorris/orgs","repos_url":"https://api.github.com/users/bendmorris/repos","events_url":"https://api.github.com/users/bendmorris/events{/privacy}","received_events_url":"https://api.github.com/users/bendmorris/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-06T05:21:48Z","updated_at":"2016-09-06T07:01:17Z","closed_at":null,"body":"- **Flixel version:** dev\r\n- **OpenFL version:** 3.6.1\r\n- **Lime version:** 2.9.1\r\n- **Affected targets:** cpp/mac\r\n\r\n________________________________\r\n\r\nSeems like there may be an issue with embedded sounds in Lime? On application start I'm getting this message and a crash:\r\n\r\n    linearogue(44830,0x7fff761c7310) malloc: *** error for object 0x103d74bb0: pointer being freed was not allocated\r\n\r\nBacktrace from lldb:\r\n\r\n```\r\n  * frame #0: 0x00007fff84cba866 libsystem_kernel.dylib`__pthread_kill + 10\r\n    frame #1: 0x00007fff8ef5f35c libsystem_pthread.dylib`pthread_kill + 92\r\n    frame #2: 0x00007fff8e2bbb1a libsystem_c.dylib`abort + 125\r\n    frame #3: 0x00007fff88bb907f libsystem_malloc.dylib`free + 411\r\n    frame #4: 0x0000000100eae59e linearogue`free_root(inValue=0x0000000103d74bb0) + 62 at CFFI.cpp:840\r\n    frame #5: 0x0000000103124c19 lime.ndll`___lldb_unnamed_function111$$lime.ndll + 233\r\n    frame #6: 0x00000001007d1e80 linearogue`lime::audio::AudioBuffer_obj::fromBytes(bytes=<unavailable>) + 192 at AudioBuffer.cpp:59\r\n    frame #7: 0x0000000100e59e82 linearogue`DefaultAssetLibrary_obj::getAudioBuffer(this=0x0000000103113770, id=<unavailable>) + 466 at DefaultAssetLibrary.cpp:670\r\n    frame #8: 0x00000001008703da linearogue`lime::Assets_obj::getAudioBuffer(id=<unavailable>, __o_useCache=<unavailable>) + 1674 at Assets.cpp:145\r\n    frame #9: 0x000000010040182b linearogue`openfl::Assets_obj::getSound(id=<unavailable>, __o_useCache=<unavailable>) + 875 at Assets.cpp:353\r\n    frame #10: 0x0000000100a5fe2d linearogue`flixel::_hx_system::FlxSplash_obj::create(this=0x000000010d96f0e4) + 3357 at FlxSplash.cpp:182\r\n    frame #11: 0x0000000100ca1255 linearogue`flixel::FlxGame_obj::switchState(this=0x00000001031174b0) + 869 at FlxGame.cpp:501\r\n    frame #12: 0x0000000100ca0a22 linearogue`flixel::FlxGame_obj::create(this=0x00000001031174b0, _=<unavailable>) + 2722 at FlxGame.cpp:287\r\n    frame #13: 0x0000000100ca1740 linearogue`flixel::__FlxGame_objcreate(inObj=0x00000001031174b0, inArg0=0x00007fff5fbfbed8) + 64 at FlxGame.cpp:295\r\n```\r\n\r\nIt seems like trying to load the embedded flixel.ogg triggers the crash.\r\n\r\nI've been able to avoid crashing by:\r\n- setting FLX_NO_SOUND_SYSTEM\r\n- editing flixel's include.xml to remove embed=\"true\"\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/37605527-crash-at-splash-screen-when-loading-embedded-sound-asset?utm_campaign=plugin&utm_content=tracker%2F254189&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F254189&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/comments/244866030","html_url":"https://github.com/HaxeFlixel/flixel/issues/1930#issuecomment-244866030","issue_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1930","id":244866030,"user":{"login":"bendmorris","id":544977,"avatar_url":"https://avatars.githubusercontent.com/u/544977?v=3","gravatar_id":"","url":"https://api.github.com/users/bendmorris","html_url":"https://github.com/bendmorris","followers_url":"https://api.github.com/users/bendmorris/followers","following_url":"https://api.github.com/users/bendmorris/following{/other_user}","gists_url":"https://api.github.com/users/bendmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/bendmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendmorris/subscriptions","organizations_url":"https://api.github.com/users/bendmorris/orgs","repos_url":"https://api.github.com/users/bendmorris/repos","events_url":"https://api.github.com/users/bendmorris/events{/privacy}","received_events_url":"https://api.github.com/users/bendmorris/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T07:01:17Z","updated_at":"2016-09-06T07:01:17Z","body":"I see this commit in lime shortly after the 2.9.1 tag:\r\n\r\ncommit b3164fa16143dc0dcc97fecf6cc2a1f7c43a79df\r\nAuthor: Lars Doucet <lars.doucet@gmail.com>\r\nDate:   Tue Apr 5 15:13:56 2016 -0500\r\n\r\n    Update ExternalInterface.cpp\r\n\r\n    Fix audio crash bug for embedded audio (thanks @mauvecow!)\r\n\r\nHaven't confirmed that this is the relevant fix, but seems likely.\r\n\r\nSo there's a dilemma here: flixel is not compatible with OpenFL 4/Lime 3, yet there are some big performance improvements in the openfl3 branch (seems like there have been some significant reductions in memory churn by the renderer, among other things) and crash fixes in lime since 2.9.1. It seems like openfl3 is being supported mostly by flixel people at this point. Is there a corresponding lime branch/commit you can recommend that's still compatible with flixel? Do we need a separate branch on lime as well for backporting these fixes without breaking compatibility?\r\n\r\nSad and annoying situation to be in - I would've expected something as major as drawTiles being deprecated wouldn't go forward until major consumers like HaxeFlixel were on board."}}
{"actor":{"display_login":"bendmorris"}}