0

我有一个加载子应用程序(使用 4.1 SDK 构建)的顶级应用程序(使用 4.6 SDK 构建)。在应用程序的这种状态下,大部分内容都包含在子应用程序中,顶部应用程序中的一些 UI 元素形成了围绕子应用程序内容的框架(或“HUD”)。

在没有文本输入字段接收焦点的地方,按 Tab 会导致 Flash Player 严重崩溃,并出现错误 #1023: Stack overflow occurred

这是一个示例堆栈跟踪:

Error: Error #1023: Stack overflow occurred.
at mx.managers.systemClasses::MarshallingSupport/get swfBridgeGroup()
at mx.managers.systemClasses::MarshallingSupport/getSWFBridgeOfDisplayObject()
at mx.managers.systemClasses::MarshallingSupport/isDisplayObjectInABridgedApplication()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/keyDownHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::FocusManager/http://www.adobe.com/2006/flex/mx/internal::keyDownHandler()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/moveFocus()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/focusRequestMoveHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/moveFocusToParent()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/focusRequestMoveHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/setFocusToComponentHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::FocusManager/setFocusToComponent()
at mx.managers::FocusManager/setFocusToNextObject()
at mx.managers::FocusManager/http://www.adobe.com/2006/flex/mx/internal::keyFocusChangeHandler()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/moveFocus()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/focusRequestMoveHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/moveFocusToParent()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/focusRequestMoveHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/setFocusToComponentHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::FocusManager/setFocusToComponent()
at mx.managers::FocusManager/setFocusToNextObject()
at mx.managers::FocusManager/http://www.adobe.com/2006/flex/mx/internal::keyFocusChangeHandler()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/moveFocus()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/focusRequestMoveHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/moveFocusToParent()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/focusRequestMoveHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/setFocusToComponentHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::FocusManager/setFocusToComponent()
at mx.managers::FocusManager/setFocusToNextObject()
at mx.managers::FocusManager/http://www.adobe.com/2006/flex/mx/internal::keyFocusChangeHandler()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/moveFocus()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/focusRequestMoveHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/moveFocusToParent()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/focusRequestMoveHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/setFocusToComponentHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::FocusManager/setFocusToComponent()
at mx.managers::FocusManager/setFocusToNextObject()
at mx.managers::FocusManager/http://www.adobe.com/2006/flex/mx/internal::keyFocusChangeHandler()
at mx.managers.marshalClasses::FocusManagerMarshalMixin/moveFocus()

根据 Adob​​e 的“开发沙盒应用程序”指南,FocusManager 应该可以正常工作,即使跨沙盒、多版本应用程序也是如此。

有人见过这个吗?知道我可能会错过什么吗?

值得注意的是:

  • 子应用程序正在加载到 SWFLoader 中,该 SWFLoader 设置为使用单独的 ApplicationDomain
  • 我根本不需要在顶级应用程序中支持选项卡,但是当子应用程序中有可编辑的文本字段时,选项卡必须工作。当有文本字段可供选择时,它工作正常。

欢迎任何和所有建议。谢谢!

4

1 回答 1

0

首先,您的堆栈跟踪似乎不包含在应用程序的 scriptRecursionLimit="1000" 中设置的默认 1000 行。我不知道您的代码限制是否以某种方式或沙盒可以在默认情况下以更严格的方式限制这一点。如我所见,有些行没有重复,因此可能意味着默认行为是正确的,但由于某些限制而无法完成。

其次,如果您找不到修复它的好方法,您可以使用一些解决方法:

try{
    dispatchTabPressEventThatCausesProblems();
}catch(e:Error){
    stage.focus = null;
}
于 2012-12-18T14:13:38.110 回答