-1

This error occurred when one of the "developer rows" box in the ColorDataGrid is selected which in turn calls the updateDeveloper() method in ExtractProjectPopup.mxml that is shown below.

public function updateDeveloper():void
{
    developerIndexArray:ArrayCollection = new ArrayCollection();
    var devObject:Object = new Object();
    var ObjectString:String = developerIndexArray.toString();
    if(developerGrid.selectedIndex >= 0)
    {
        var developer:ExtractPopUpDeveloperRow = this.developerRows.getItemAt(developerGrid.selectedIndex) as ExtractPopUpDeveloperRow;
        developer.isPartOfProject = ! developer.isPartOfProject;
        if(developer.isPartOfProject)
        {   
        devObject.index = developerGrid.selectedIndex;
        viewResumeButton.visible = true;
        developerIndexArray.addItem(devObject);     
        }
    }
}

我目前正在使用 Flex SDK 3.6,并且我知道已知的错误,其解决方法(添加跟踪语句)在这种情况下并没有真正的帮助。我怀疑当我将对象添加到 ArrayCollection 时会发生溢出,但我真的不知道为什么。

一定有某种递归迫使溢出,我错过了什么吗?

这是导致溢出的堆栈跟踪:

[mpt.project::ExtractProjectPopUp~[O] Object~[A] int[I] int[I]  mpt.vo.extraction::ExtractPopUpDeveloperRow[O] String[S] int[I]]   {mpt.project::ExtractProjectPopUp~[O]} (mx.collections::ArrayCollection[O] int[I])
60:callproperty getItemAt 1
                   [mpt.project::ExtractProjectPopUp~[O] Object~[A] int[I] int[I]  mpt.vo.extraction::ExtractPopUpDeveloperRow[O] String[S] int[I]]  {mpt.project::ExtractProjectPopUp~[O]} (Object[A])
64:getlex 7044
                   [mpt.project::ExtractProjectPopUp~[O] Object~[A] int[I] int[I] mpt.vo.extraction::ExtractPopUpDeveloperRow[O] String[S] int[I]] {mpt.project::ExtractProjectPopUp~[O]} (Object[A] mpt.vo.extraction::ExtractPopUpDeveloperRow$[O])
67:astypelate
                   [mpt.project::ExtractProjectPopUp~[O] Object~[A] int[I] int[I] mpt.vo.extraction::ExtractPopUpDeveloperRow[O] String[S] int[I]] {mpt.project::ExtractProjectPopUp~[O]} (mpt.vo.extraction::ExtractPopUpDeveloperRow[O])
68:coerce mpt.vo.extraction::ExtractPopUpDeveloperRow
                   [mpt.project::ExtractProjectPopUp~[O] Object~[A] int[I] int[I] mpt.vo.extraction::ExtractPopUpDeveloperRow[O] String[S] int[I]] {mpt.project::ExtractProjectPopUp~[O]} (mpt.vo.extraction::ExtractPopUpDeveloperRow[O])
71:dup
                   [mpt.project::ExtractProjectPopUp~[O] Object~[A] int[I] int[I] mpt.vo.extraction::ExtractPopUpDeveloperRow[O] String[S] int[I]] {mpt.project::ExtractProjectPopUp~[O]} (mpt.vo.extraction::ExtractPopUpDeveloperRow[O] mpt.vo.extraction::ExtractPopUpDeveloperRow[O])
72:dup

Warning: Failed to parse corrupt data.
VerifyError: Error #1023: Stack overflow occurred.

at mpt.project::ExtractProjectPopUp/__developerGrid_click()

谢谢大家的帮助。

4

1 回答 1

0

奇怪的是,通过在语句后添加一个空的跟踪语句来解决问题

var developer:ExtractPopUpDeveloperRow = this.developerRows.getItemAt(developerGrid.selectedIndex) as ExtractPopUpDeveloperRow;

这不是解决方案,而只是一种解决方法。

于 2013-10-24T22:38:30.537 回答