One of my players once complained that my Starling game after a while stopped working with a message "Context3D not available! Possible reasons: wrong renderMode or missing device support". Later this error disappeared just by itself, and the game became playable again.
I began wondering, how many players might have an issue alike, so, on my _starling object I added an event listener:
and inside this callback I send Google Analytics data with parameters 'ERROR_STARLING_FATAL_ERROR', e.toString()
As looked at analytics, I see, that these events are fired indeed
They are rare, but they exist.
In the details of the events in the analytics I couldn't get much useful info, just this:
I think I should've called analytics with parameters like this:
'ERROR_STARLING_FATAL_ERROR', e.toString()+'data = '+e.data
This way I will see the message with which Starling responded to the Fatal Error event. But how to get the stack trace? And understand, what's causing these fatal errors?