flash - 版本中的堆栈溢出错误,但不是调试错误。 ( ActionScript )

标签 flash actionscript-3 actionscript crash

我有一些ActionScript3代码,由于某种原因,在为“发布”模式进行编译时,它只会在堆栈溢出中崩溃。它崩溃的方法不会调用任何其他函数,因此不会以任何方式递归。
奇怪的是,当在“调试”模式下编译时,它可以完美运行。
如果在编译器选项中启用了“详细堆栈跟踪”,则“发布”模式也将开始工作。这是什么骗术?尝试过多优化时,Flash编译器中是否存在错误?

编辑:

这是堆栈跟踪:

Stacktrace:
VerifyError: Error #1023: Stack overflow occurred.

    at Extensions::CRunObjectSelection/filterNonQualifierObjects()
    at Extensions::CRunObjectSelection/filterObjects()
    at Extensions::CRunEasing/con_IsObjectMoving()
    at Extensions::CRunEasing/condition()
    at Objects::CExtension/condition()
    at Conditions::CCndExtension/eva2()
    at Conditions::CCndExtension/eva1()
    at Events::CEventProgram/computeEventList()
    at RunLoop::CRun/f_GameLoop()
    at RunLoop::CRun/doRunLoop()
    at Application::CRunApp/loopFrame()
    at Application::CRunApp/playApplication()
    at Application::CRunApp/stepApplication()

这是该报告中引用的一些代码:
public function selectAll(Oi:int):void
{
    var pObjectInfo:CObjInfo = OiList[Oi];
    pObjectInfo.oilNumOfSelected = pObjectInfo.oilNObjects;
    pObjectInfo.oilListSelected = pObjectInfo.oilObject;
    pObjectInfo.oilEventCount = eventProgram.rh2EventCount;

    var i:int = pObjectInfo.oilObject;
    while(i >= 0)
    {
        var pObject:CObject = ObjectList[i];
        pObject.hoNextSelected = pObject.hoNumNext;
        i = pObject.hoNumNext;
    }
}

public function filterNonQualifierObjects(rdPtr:Object, Oi:int, negate:Boolean, filter:Function):Boolean
{
    var pObjectInfo:CObjInfo = OiList[Oi];
    var hasSelected:Boolean;
    if (pObjectInfo.oilEventCount != eventProgram.rh2EventCount){
        selectAll(Oi);  //The SOL is invalid, must reset.
    }

    //If SOL is empty
    if(pObjectInfo.oilNumOfSelected <= 0){
        return false;
    }

    var firstSelected:int = -1;
    var count:int = 0;
    var current:int = pObjectInfo.oilListSelected;
    var previous:CObject = null;

    while(current >= 0)
    {
        var pObject:CObject = ObjectList[current];
        var filterResult:Boolean = filter(rdPtr, pObject);
        var useObject:Boolean = Boolean(int(filterResult) ^ int(negate));
        hasSelected = Boolean(int(hasSelected) | int(useObject));

        if(useObject)
        {
            if(firstSelected == -1){
                firstSelected = current;
            }

            if(previous != null){
                previous.hoNextSelected = current;
            }

            previous = pObject;
            count++;
        }
        current = pObject.hoNextSelected;
    }
    if(previous != null){
        previous.hoNextSelected = -1;
    }

    pObjectInfo.oilListSelected = firstSelected;
    pObjectInfo.oilNumOfSelected = count;

    return hasSelected;
}

最佳答案

关于flash - 版本中的堆栈溢出错误,但不是调试错误。 ( ActionScript ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8773090/

相关文章:

xml - 更改 AS3 中 XML 对象的属性值

actionscript-3 - 检查类是否实现特定接口(interface)

actionscript-3 - AIR - 将位图数据传输到 FFmpeg 视频

flash - 从 Flash 切换到 <canvas> 的建议

Flash Builder 4.6 问题 : Access to undefined property - clean its not the answer

actionscript-3 - 防止 DisplayObject 的高度变化

android - 使用 starling 缩放 Android 设备会导致一些布局问题

actionscript-3 - facebook actionscript graph api - 发布到 "/feed"

html - 将 SWF 文件链接到另一个 HTML

javascript - javascript/HTML5是否能够支持 "flash like"动画和拖放