Hi guys,
I got a hold of an affected device and was able to test for a workaround. Since initial testing showed that upon refreshing the page the error was intermittent, my current (admittedly ugly) workaround is to refresh the page in the event of the Context3D not available error. On my test device, it refreshes a few times* and eventually loads properly.
(I tried a couple ways of re-initializing starling, but none of them resolved the issue.)
So I patched the onStage3DError handler in Starling.as -- see below.
Note that ENV::WEB is our build system's way of conditional-compiling for device vs web, and will be different / unnecessary in your build.
private function onStage3DError(event:ErrorEvent):void
{
if (event.errorID == 3702)
{
// Refresh page on Context3D not available
ENV::WEB {
if (ExternalInterface.available) {
ExternalInterface.call("document.location.reload", true);
return;
}
}
var mode:String = Capabilities.playerType == "Desktop" ? "renderMode" : "wmode";
showFatalError("Context3D not available! Possible reasons: wrong " + mode +
" or missing device support.");
}
else
showFatalError("Stage3D error: " + event.text);
}
* It could be entirely random, but it seemed like a "clear browser cache" caused the most refresh loops, and opening the dev tools could change behavior. A random timeout before the SWFObject embed call may have helped (or, again, it may be totally random.)
Madness. Can't wait for the Chromium fix. 😛
Interesting note -- on this Samsung 303C device, when I got it it had Chrome 53.0.2785.154, and didn't get the error. I updated to 57.0.2987.146 and started getting the error. While it may not be related, I notice there is a Flash-GPU-related difference in the Chrome startup flags.