Android, StageWebView. Fatal crash, reboot required.
Steps:
1) Set renderMode GPU or rendermode DIRECT, enable android:hardwareAccelerated="true" in the App-Descriptor (to see videos at all).
2) Use a simple HTML (body head div iframe) to play Youtube-Videos in StageWebView.
The OS-Video-Player then "inspects" the HTML-Code and replaces the Youtube-Flash-Player (almost all newer devices do so).
3) Sometimes (about 1 in 15) the video is upside down <- this is when the rest of the bug occurs.
4) Call any Function that changes the StageWebView-Location:
StageWebView.loadString(), StageWebView.loadURL(), StageWebView.historyBack() or call StageWebView.dispose().
5) Crash:
AIR-App crashes, Youtube-Audio keeps playing -until the device if powered off-
Android>Settings>Apps>"Force close" does not help, hell, even uninstalling doesnt shut up the audio.
==============================
Step (3) is tricky:
It does not happen every time, but it does happen often enougth (average about 1/15 times) to be reproducable in 1-2 minutes. You have to start the process several times to trigger it.
Because i could not reproduce the bug reliably, my first assumption was that it has something to do with the rest of my apps state/code. So, i made an isolated test project, just 2 buttons + stageWebview: same results.
Things that do NOT matter:
- HTML-embed-method does not matter. I tried: new (iFrame), old (embed), youtube-js-API (fill div) and several other variations.
- Youtube-player parameters , stuff like fs, rel, flip(not working anyway) etc...
- StageScale, Ratio, i tried StageScaleMode NO_SCALE, SHOW_ALL...
- StageWebView.viewport size / position.
- Video size / ratio in the embed code, i tried the ones youtube embed suggests and custom sizes.
- Orientation mode, auto, landscape, portrait.
Things that DO matter:
- RenderMode must be GPU/DIRECT, it never happens in renderMode CPU or auto.
- The Youtube-Flash-Player must be replaced be the Android-OS-Player, the youtube-player never shows videos upside down nor causes a crash.
Observations:
When the Os-Player replaces the youtube player and shows the preloader/spinning wheel thing:
For the first fractions of a second, a small, empty "youtube-player-ui" is spinning instead of that wheel.
What an outlandish bug. I think thats why the bug onyl happens sometimes, depending on how long the video takes to load and how far the "mini-youtube-player" is rotated (i still cant believe this).
Test-Devices:
Nexus 7 (4.2.2) <- crashes most often
Samsung GT-N7100 (4.1.2)
HTC One (4.1.2)
xPeria Lt30p (4.1.2)
Any Ideas ?
Can someone from Adobe confirm this bug ?
CS6, Air SDK 3.5/6/7
Message was edited by: verdave, typo, details
