Damn, I'm sorry to hear that the previous solution turned out to be a red herring. 🙁
I feel with you — such black box errors are extremely frustrating and time consuming.
I've got a few ideas labeled "if we can't fix it, perhaps we can learn to ignore it". 😉
First of all: did this only happen in debug mode? When you run the game in release mode, with no debugger attached, does this pop up, too? AIR often simply recovers from an error and moves on with the next frame, in release mode. (While in debug, it always stops to show you where the error occurred.)
Second idea: since you're often seeing this in filters, we could try to catch and ignore the error on filter rendering. Open up "FragmentFilter.as" and find the "render(painter:Painter)" method. Change the code in the "if (!_cached ...)" clause like this:
if (!_cached || _cacheRequested)
_cacheRequested = false;
trace("Error while trying to render filter: " + e.message);
That way, the filter simply won't be rendered this frame. Perhaps we have more luck in the next one!
And, the last idea: We could force Stage3D to recreate the complete context whenever that problem occurs. Perhaps it can recover from the error when it recreates all context data.
For this to work, you first need to make sure your app can deal with a context loss at all. To try that out, call "Starling.context.dispose()" at any time, e.g. when a certain button is triggered. The screen will turn black and Starling will have to reload all textures — if you're using the AssetManager, that should work automatically. Otherwise, check this manual chapter.
When that works, add a default error handler to your app. This is done in the Startup class of AIR (the Flash display object that initiates your app). Add the following code to its constructor:
trace("Uncaught Error: " + event.error.message);
if (event.error.errorID == 3672)
trace("Attempting to restore render context.");
It's not beautiful, but it's worth a try.
(Note: this idea is separate from the 2nd one. If that try/catch is around your filter code, this error isn't "uncaught" and thus the above event handler won't be triggered.)
Now that I think of it, here's another idea: just for testing purposes, set "Starling.enableErrorChecking = true". Then, when you reproduce the error, is there maybe some more information coming with it? Or is it maybe replaced by another one? Worth a shot. (Never leave that active when publishing the app, though. It has a negative effect on performance.)
I know that none of these ideas is really a good solution - but if it works, it's a least an improvement. Good luck!!!