I added an event listener to track how many players of my games encounter Starling Fatal Error.
_starling.addEventListener(starling.events.Event.FATAL_ERROR, onStarlingFatalError)
In the listener I post message to Google Analytics. It appears, that fatal error happens less than for 1 player among 4000 on Android (and has never happened on iOS). This is really great! I just want to find out, what might cause these errors, to, maybe, reduce them more.
So, in the event listener function I added the code to get the stack trace for posting (the code alike is used in Junkbyte console to show the stack trace)
//here e is starling.events.Event
var error:* = e.hasOwnProperty("error")?e["error"]:e; // for flash 9 compatibility
if (error is Error){
str += error.hasOwnProperty("getStackTrace")?error.getStackTrace():error.toString();
}else if (error is ErrorEvent){
str += ErrorEvent(error).text;
}
if(!str){
str += String(error);
}
But the code is unable to get the stack trace from theStarling Fatal Error.
I manage to get the other info when posting the error message to my analytics: OS, cpuAddressSize, pixelAspectRatio, etc, but not the stack trace.
So, I'm wondering, is there a way to get some deeper info about the origins of Starling Fatal Error, which some of my players encounter?