Has anyone got images working again after cancelling the G2 exit dialog?
Building a plugin for the G2 and hit something I can't get around. Hoping someone has seen it.
What happens
Double-tap raises the OS exit confirmation. If I pick No and stay in the app, every image transfer from then on is refused. updateImageRawData returns sendFailed for every tile, every time. Text is completely unaffected: textContainerUpgrade and rebuildPageContainer keep working normally, so the rest of the app behaves as if nothing is wrong. Only images are dead.
Closing and reopening the plugin clears it every time. Nothing else does.
Repro
- Open a page that has image containers and push an image. It draws fine.
- Double-tap to trigger
shutDownPageContainer(1). - Cancel the OS dialog.
- Go back and push the same image again.
sendFailed.
What I've tried, all still sendFailed
- Resending the tiles, with delays between them
rebuildPageContainerthen resending- Rebuilding as a text-only page to drop the image containers entirely, then
createStartUpPageContainerwith fresh image containers, then resending - Image sizes from 288x126 down to 32x32, so it isn't a size or payload problem
I also tried window.location.reload() on the cancel. That made it worse: the app comes back with no working page at all, and nothing responds, not even text. Looks like the host won't let a plugin that has asked to exit create a page again in the same run.
Questions
- Is there a way to reset the image pipeline from the SDK that I've missed? I don't see one on the bridge.
- Is there a supported way to detect that the exit was cancelled, rather than inferring it from the next event?
- Does
shutDownPageContainer(0)avoid this? I'd rather not swap to it blindly since review specifically tests that double-tap raises the dialog.
SDK 0.0.13, simulator 0.8.0. The simulator refuses all image transfers regardless, so I can only reproduce this on hardware.