I'm getting Error #3694's from sources of my own, but also Starling source is throwing one which I wanted to point out.
I am able to throw this error on Android simply by rotating the device twice in a row; the second time before the first orientation change is finished. I'm assuming the context doesn't restore before it is lost again due to the second rotation.
According to our exception logging this is also happening to some of our users on iOS, but I'm personally not able to make it happen on iOS.
The orientation change fires a layout routine in my app which calls TextField.textBounds, which in turn spits out this:
Error: Error #3694: The object was disposed by an earlier call of dispose() on it. at flash.display3D::Context3D/createTexture() at starling.textures::Texture$/empty()[C:\dev\fb\starling\src\starling\textures\Texture.as:372] at starling.textures::Texture$/fromBitmapData()[C:\dev\fb\starling\src\starling\textures\Texture.as:251] at starling.text::TextField/createRenderedContents()[C:\dev\fb\starling\src\starling\text\TextField.as:193] at starling.text::TextField/redraw()[C:\dev\fb\starling\src\starling\text\TextField.as:165] at starling.text::TextField/get textBounds()[C:\dev\fb\starling\src\starling\text\TextField.as:481]
My textfields are using an embedded font face and I have handleLoastContext switched on.
In general I'd like to understand this error better; in some cases the bitmapData is claimed to be disposed earlier, although it has just been created on the previous line to the
Is there a way to check if a bitmapData object is disposed (except for try..catch)? Or is there a way to know if the context is lost, and not restored yet?