我遇到了错误的堆栈跟踪问题。 当我在调试播放器中使用error.getStackTrace()时它工作正常。
ReferenceError: Error #1056: Не удается создать свойство asdad в starling.display.Stage. at app.views::MachineHeader/onSoundButtonTriggered()
[/var/lib/jenkins/jobs/.../src/app/views/MachineHeader.as:111] at starling.events::EventDispatcher/invokeEvent()
[/var/lib/jenkins/jobs/.../workspace/src/starling/events/EventDispatcher.as:141] at starling.events::EventDispatcher/dispatchEvent()
[/var/lib/jenkins/jobs/.../workspace/src/starling/events/EventDispatcher.as:112] at starling.events::EventDispatcher/dispatchEventWith()
[/var/lib/jenkins/jobs/.../workspace/src/starling/events/EventDispatcher.as:190] at org.feathers.controls::Button/button_touchHandler()
[/var/lib/jenkins/jobs/.../workspace/src/org/feathers/controls/Button.as:3052] at starling.events::EventDispatcher/invokeEvent()
[/var/lib/jenkins/jobs/.../workspace/src/starling/events/EventDispatcher.as:141] at starling.events::TouchEvent/dispatch()
[/var/lib/jenkins/jobs/.../workspace/src/starling/events/TouchEvent.as:174] at starling.events::Touch/dispatchEvent()
[/var/lib/jenkins/jobs/.../workspace/src/starling/events/Touch.as:231]
但是在发布播放器stackTrace看起来像:
ReferenceError: Error #1056
代码:
this.loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, onGlobalErrorsHandler);
private function onGlobalErrorsHandler(e:UncaughtErrorEvent):void {
if (_errorList[e.errorID]) {
e.preventDefault();
return;
}
trace(e.error.getStackTrace());
var data:Object = {};
data["login"] = AMFService.instance.login;
data["error_type"] = String(e.error.errorID);
data["stacktrace"] = e.error.getStackTrace();
AMFService.instance.sendError("statistics.error_send", data);
_errorList[e.errorID] = e.error;
e.preventDefault();
}
调试播放器:Linux 11.2 发布者:PepperFlash 11.9
我做错了什么?如何在发布播放器上获得堆栈跟踪?
比你。
答案 0 :(得分:3)
要在发布播放器(11.5+)中启用堆栈跟踪,您必须使用swf-version = 18编译swf
http://www.adobe.com/devnet/articles/flashplayer-air-feature-list.html
答案 1 :(得分:2)
根据Adobe的Error.getStackTrace()的API参考...
“对于Flash Player 11.4及更早版本以及AIR 3.4及更早版本,请执行堆栈 跟踪仅在代码在调试器版本中运行时可用 Flash Player或AIR Debug Launcher(ADL)。在非调试器中 这些运行时的版本,调用此方法返回null。“
抱歉,但是没有办法解决它。 :(