-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling Error #3768 on IOS #23
Comments
It would be great if you could create a pull request will all the implementation that you mentioned so others will also benefit from it. |
ok, but I can't seem to understand what to choose here in order to submit On Wed, Sep 21, 2016 at 12:23 PM, Gil Amran [email protected]
|
feel free to ask if it's not clear thanks |
First of all - I am using the DMT already for my android game- works great !! loving it !
Thanks a lot Gil (and XTDStudios) for your continued efforts...
I am performing testing on ipad\iphone devicesnow before launching my game
and I have this problem
whenever a DMT instance is still processing graphics - I exit the app (background).
this always results on this error:
Error: Error #3768: The Stage3D API may not be used during background execution on this operating system.
at ConcreteRectangleTexture/uploadBitmapData()[/Users/redge/Dropbox/Development/starling-2/starling/src/starling/textures/ConcreteRectangleTexture.as:38]
at starling.textures::Texture$/fromBitmapData()[/Users/redge/Dropbox/Development/starling-2/starling/src/starling/textures/Texture.as:321]
at com.xtdstudios.DMT.starlingConverter::StarlingConverter/init()[C:\Client\Flash\Libraries\PkamaLib\V_6_STAR\com\xtdstudios\DMT\starlingConverter\StarlingConverter.as:75]
at com.xtdstudios.DMT::DMTBasic/processTextures()[C:\Client\Flash\Libraries\PkamaLib\V_6_STAR\com\xtdstudios\DMT\DMTBasic.as:119]
at com.xtdstudios.DMT::DMTAbsAPI/onTexturesReady()[C:\Client\Flash\Libraries\PkamaLib\V_6_STAR\com\xtdstudios\DMT\DMTAbsAPI.as:274]
at com.xtdstudios.DMT::DMTAbsAPI/onGenerateComplete()[C:\Client\Flash\Libraries\PkamaLib\V_6_STAR\com\xtdstudios\DMT\DMTAbsAPI.as:269]
at com.xtdstudios.DMT::DMTAbsAPI/onGenerateComplete()
The DMT tries to render textures while app is in background.
But I have notice this:
on StarlingConverter.init function - you have this Try & Catch:
.....
catch (e:Error)
{
// we will ignore any error in case the context was diposed when creating the textures
// the context should be re-created anyways.
if (Starling.context && Starling.context.driverInfo != "Disposed")
throw e;
}
As I see it, in order to ignore this scenario as well, we should check the 'Starling.current.isStarted' result as well, thus resulting in this:
if (Starling.context && Starling.context.driverInfo != "Disposed" && Starling.current.isStarted)
In this way, we will avoid having this error thrown in this case.
we can also check this condition before 'Texture.fromBitmapData' ....
In addition, I have found out that it is wise, on the 'dmtComplete' event to check weather your app is active\deactivate.
and if it is suspended (on background) then I handle this manully... and continue the flow of generating graphics and using the dmt's created assets.
This bug has troubled me a lot lately, and I hope this sharing will help resolving this for others as well.
The text was updated successfully, but these errors were encountered: