gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 17:45:01 25 4
gpt4 key购买 nike

我有一些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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com