Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.82k stars 821 forks source link

crash: Starling crash when leaving PC (Windows 10 64bit) on and goes into lock screen #978

Closed born2net closed 7 years ago

born2net commented 7 years ago

Hello, first tx for an AMAZING product. We have a massive AIR application and when we leave the application on for 20+ min we come back to a crash of:

ArgumentError: Error 0002015
    at ConcreteRectangleTexture/uploadBitmapData()
    at MethodInfo-14348()
    at global/starling.utils::execute()
    at starling.textures::ConcreteTexture/onContextCreated()
    at starling.events::EventDispatcher/invokeEvent()
    at starling.events::EventDispatcher/dispatchEvent()
    at starling.events::EventDispatcher/dispatchEventWith()
    at starling.core::Starling/onContextRestored()

I believe the issue could be related to the PC (Windows 10) is going into power savings. We have tried diff options and can't seem to resolve this issue so we would greatly appreciate any help with this... I wonder if anyone had seen this and any work around / solutions?

Regards,

Sean - http://DigitalSignage.com

PrimaryFeather commented 7 years ago

Thanks for the nice words, Sean!

If you look a the last line of the call stack, you'll see that the cause is a context loss. Starling needs to recreate all textures after a context loss, and it seems it fails with at least one of them. The error "2015" means "invalid BitmapData" (see Runtime Errors), so my guess is that you disposed a BitmapData instance that's needed when the texture is recreated.

To test this more easily, simple call Starling.current.context.dispose() somewhere in your code. That will have roughly the same effect. Then you can try to find out which texture is the root of the problem.

born2net commented 7 years ago

that is perfect, I appreciate it very much. Closing bug,

regards,

Sean Levy