{"action":"created","issue":{"url":"https://api.github.com/repos/Gamua/Starling-Framework/issues/1012","repository_url":"https://api.github.com/repos/Gamua/Starling-Framework","labels_url":"https://api.github.com/repos/Gamua/Starling-Framework/issues/1012/labels{/name}","comments_url":"https://api.github.com/repos/Gamua/Starling-Framework/issues/1012/comments","events_url":"https://api.github.com/repos/Gamua/Starling-Framework/issues/1012/events","html_url":"https://github.com/Gamua/Starling-Framework/issues/1012","id":281590479,"number":1012,"title":"Android textures getting cropped - workaround?","user":{"login":"tconkling","id":709022,"avatar_url":"https://avatars2.githubusercontent.com/u/709022?v=4","gravatar_id":"","url":"https://api.github.com/users/tconkling","html_url":"https://github.com/tconkling","followers_url":"https://api.github.com/users/tconkling/followers","following_url":"https://api.github.com/users/tconkling/following{/other_user}","gists_url":"https://api.github.com/users/tconkling/gists{/gist_id}","starred_url":"https://api.github.com/users/tconkling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tconkling/subscriptions","organizations_url":"https://api.github.com/users/tconkling/orgs","repos_url":"https://api.github.com/users/tconkling/repos","events_url":"https://api.github.com/users/tconkling/events{/privacy}","received_events_url":"https://api.github.com/users/tconkling/received_events","type":"User","site_admin":false},"labels":[{"id":64488856,"url":"https://api.github.com/repos/Gamua/Starling-Framework/labels/Bug%20in%20Flash/AIR","name":"Bug in Flash/AIR","color":"5319e7","default":false},{"id":130317,"url":"https://api.github.com/repos/Gamua/Starling-Framework/labels/Feature","name":"Feature","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2017-12-13T01:03:05Z","updated_at":"2018-04-15T05:33:10Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Preamble!\r\n\r\nI'm being bitten by a very old AIR-on-Android issue, described in detail on the Starling forum: https://forum.starling-framework.org/topic/textures-partially-uploaded-to-gpu-original-bitmapdata-is-perfect\r\n\r\nIn short, on Android, textures will occasionally be \"cropped\" when uploaded to the GPU: all texels below a certain line in the texture will render as invisible. There's no programmer-observable rhyme or reason to when this occurs, and quitting and restarting the game will frequently solve the problem. Here's an example from my game. I've circled the areas subtextures are cropped or completely invisible:\r\n\r\n![broken](https://user-images.githubusercontent.com/709022/33915964-44da0a76-df5b-11e7-95f4-bc73a85a2081.jpg)\r\n\r\nHere's what the screen should look like:\r\n\r\n![working](https://user-images.githubusercontent.com/709022/33915985-5e8f8b6c-df5b-11e7-8401-9fe54065378c.png)\r\n\r\nFolks have been reporting this issue way back since AIR 19, and it's still recurring as of AIR 27. Adobe's been notified of it several times. The original Adobe tracker bug was seemingly lost when Adobe updated their bug tracking; a new bug is here: https://tracker.adobe.com/#/view/AIR-4198475\r\n\r\n### Actually getting to the point!\r\n\r\nAdobe seems to have like 1/2 an engineer on AIR these days, so the chances of them fixing this bug are slim. My game is blocked until this is fixed or I can work around it. \r\n\r\nAnecdotally, it sounds like there's a potential workaround: after creating a ConcreteTexture on Android, immediately draw that texture to a render-texture and compare the results with the source image that was uploaded to the GPU. If there's a mismatch, recreate the texture.\r\n\r\nI'd love for this workaround to be baked into Starling itself (presumably via an opt-in flag that client code can set on Starling during initialization, e.g. `Starling.validateTextureAfterUpload` or something). This would obviously slow texture loading (hence the opt-in), but better a slightly slower load than a broken game.\r\n\r\n@PrimaryFeather, does this sound reasonable? I'm happy to take a stab at this and make a PR if it seems like something you'd want in Starling. It looks like `ConcretePotTexture.uploadBitmapData` and `ConcreteRectangleTexture.uploadBitmapData` could check a Starling flag and perform this validation in a loop (with some low number of maximum iterations), delaying any `TextureReady` event until successful?"},"comment":{"url":"https://api.github.com/repos/Gamua/Starling-Framework/issues/comments/381381462","html_url":"https://github.com/Gamua/Starling-Framework/issues/1012#issuecomment-381381462","issue_url":"https://api.github.com/repos/Gamua/Starling-Framework/issues/1012","id":381381462,"user":{"login":"ll24llll","id":1378350,"avatar_url":"https://avatars2.githubusercontent.com/u/1378350?v=4","gravatar_id":"","url":"https://api.github.com/users/ll24llll","html_url":"https://github.com/ll24llll","followers_url":"https://api.github.com/users/ll24llll/followers","following_url":"https://api.github.com/users/ll24llll/following{/other_user}","gists_url":"https://api.github.com/users/ll24llll/gists{/gist_id}","starred_url":"https://api.github.com/users/ll24llll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ll24llll/subscriptions","organizations_url":"https://api.github.com/users/ll24llll/orgs","repos_url":"https://api.github.com/users/ll24llll/repos","events_url":"https://api.github.com/users/ll24llll/events{/privacy}","received_events_url":"https://api.github.com/users/ll24llll/received_events","type":"User","site_admin":false},"created_at":"2018-04-15T05:33:10Z","updated_at":"2018-04-15T05:33:10Z","author_association":"NONE","body":"Dear Tim,\nI implemented AIR29 the day before yesterday and I've not published an\nupdate thereafter. I'll let you know if the problem persists.\n\nOn Sun, Apr 15, 2018 at 3:00 AM, Tim Conkling <notifications@github.com>\nwrote:\n\n> AIR 29 claims to have fixed this issue - have you tried the latest version?\n>\n> On Wed, Apr 11, 2018 at 11:14 PM, ll24llll <notifications@github.com>\n> wrote:\n>\n> > Dear Daniel,\n> > I'll check out the new AssetManager as soon as possible, thanks.\n> >\n> > Unfortunately I can not reproduce the problem myself, but some of my\n> > clients are sending me screen captures like this every now and then:\n> picture\n> > link <http://s9.picofile.com/file/8323517618/tank_texture_bug.jpg>\n> >\n> > By implementing Tim's solution and tracking it, I'll be aware of that how\n> > much and in which situations the problem is occurring.\n> >\n> > —\n> > You are receiving this because you authored the thread.\n> > Reply to this email directly, view it on GitHub\n> > <https://github.com/Gamua/Starling-Framework/issues/\n> 1012#issuecomment-380690592>,\n> > or mute the thread\n> > <https://github.com/notifications/unsubscribe-auth/AArRnkbQP8F3MaHI830-\n> pfHKOdrbSzHXks5tnvCtgaJpZM4Q_3HU>\n> > .\n>\n> >\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/Gamua/Starling-Framework/issues/1012#issuecomment-381365133>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ABUILjTWIawKRIAflpR5apWnyV01jsolks5tonh4gaJpZM4Q_3HU>\n> .\n>\n"}}
{"actor":{"display_login":"ll24llll"}}