feathersui / feathersui-starling

User interface components for Starling Framework and Adobe AIR

Home Page:https://feathersui.com/learn/as3-starling/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting quite a few of these 3768

raresn opened this issue · comments

commented

We are getting quite a few of these for a long time now. Would be cool to be able to put them aside :)
Any clue what i can do to further debug this?

::0 -> Uncaught Error // Error // Error: Error #3768 // Error: Error #3768
at starling.rendering::VertexData/uploadToVertexBuffer()
at starling.rendering::Effect/uploadVertexData()
at starling.display::MeshBatch/syncVertexBuffer()
at starling.display::MeshBatch/render()
at starling.rendering::Painter/drawBatch()
at BatchProcessor/finishBatch()
at BatchProcessor/addMesh()
at starling.rendering::Painter/batchMesh()
at starling.display::Mesh/render()
at starling.display::DisplayObjectContainer/render()
at feathers.controls.text::TextBlockTextRenderer/render()
at starling.display::DisplayObjectContainer/render()
at starling.display::DisplayObjectContainer/render()
at feathers.controls::LayoutGroup/render()
at starling.display::DisplayObjectContainer/render()
at feathers.controls::LayoutGroup/render()
at starling.textures::RenderTexture/render()
at global/starling.utils::execute()
at starling.textures::RenderTexture/renderBundled()
at starling.textures::RenderTexture/draw()
at ro.app.items::CalendarMonth/generateMonthTexture()
at ro.app.items::CalendarMonth/refreshTexture()
at ro.app.items::Calendar/refreshTexture()
at ro.app.screens::MainView$/triggerUpdate()
at ro.app.screens::MainView$/softUpdate()
at ro.app.screens::MainView$/softUpdateCheck()
at ro.app.data::Api/checkUpdated()
at ro.app.data::Api/updateCompleted()
at Function/Api.as$6:anonymous()
at ro.app.data::ApiRequest/doCallback()
at ro.app.data::ApiRequest/completeHandler()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete() //

Error 3768: The Stage3D API may not be used during background execution.

You may be forgetting to pause Starling when your app goes into the background.

commented

Just noticed i added this as a feathers issue :) Sry about this, but thank you for the answer. I should have mentioned that we stop startling on deactivate (first thing we checked actually, thats why we don't know what to try next)

It looks like you have an API call returning, and you are updating a RenderTexture in response. This involves calling a Stage 3D API, so you probably need to delay this task until the app is restored from the background. I think you can use SystemUtil.executeWhenApplicationIsActive() for this.

We just added a bunch of async functions to work with air database. This might create multiple problems in multiple places now.

This function will definitely help right now. From the looks of it, it needs SystemUtil.initialize() to be called before, to make sure that it catches the deactivate event. If it's called for the first time while apps is deactivated we'll get the same problem since sApplicationActive is default true.

I'm actually thinking of piggybacking on the invalidation system. I'm just a bit unsure how it all works, but if I'm not wrong, draw() is called on enter frame, so whatever is invalidated will update the next frame if starling is active. One thing worries me. If there are too many update requests, app will freeze for a moment. I need to find a way to spread the updates over a few frames, and maybe prioritize the objects that are visible.