Ok,

Thanks,

FYI I wrote it this way so I could break down the road. I see what you are saying now.

Now that I see the light, if I need to break, just use an if statement in the loop.

You know, some times I feel stupid for trying to do things that in the end look a little funny :)

Ironically, I was trying to solve a future problem and I created a future problem.

Thanks for the time Gordon. :)

Peace, Mike

On 6/15/06, Gordon Smith <[EMAIL PROTECTED]> wrote:

You have six methods calls being pushed onto the stack for each of 600 files, so you are at 3600 stack frames.

 

You need to write your algorithm to loop rather than recurse.

 

- Gordon

 


From: [email protected] [mailto:[email protected]] On Behalf Of Michael Schmalle
Sent: Wednesday, June 14, 2006 6:58 PM
To: [email protected]
Subject: Re: [flexcoders] Re: Flex2B3 :: StackOverflow #1023 :: hmmm

 

So,

I need to slim what I call then? I am no where near 4000 recursions on this.

Do you have any advice for me? I wrote this documenter in Flex to really test the Flash player, I am getting good feelings but, this I just need to work right now and then when I refactor it won't be a problem.

So a stack is like a method call chain, so really I need to slim the whole algorithm and not use dispatchEvent().

Maybe me using dispatchEvent() is adding on the recursions I am not seeing.

Peace, Mike

On 6/14/06, Gordon Smith <[EMAIL PROTECTED]> wrote:

I got more info from the AS3 team... The Player's stack limit is 128K and can't be changed. When a method calls another method, a stack frame gets created which requires 4 bytes for its size, 4 bytes for the return address, 4 bytes for each parameter, and 4 bytes for each local variable. So if a typical function has 2 parameters and 4 local variables, you could have about 4000 recursive metthod calls.

 

- Gordon

 


From: [email protected] [mailto:[email protected]] On Behalf Of Gordon Smith
Sent: Wednesday, June 14, 2006 6:17 PM
To: [email protected]
Subject: RE: [flexcoders] Re: Flex2B3 :: StackOverflow #1023 :: hmmm

 

A StackOverflowError does not necessarily involve an Array. It generally is an indicator of infinite (or at last overly deep) recursion, such as where method A calls method B and method B calls method A, over and over. In your stack trace, it looks like File/analyzeNextFile() is being called recursively rather than sequentially.

 

- Gordon

 

 


From: [email protected] [mailto:[email protected]] On Behalf Of Michael Schmalle
Sent: Wednesday, June 14, 2006 3:57 PM
To: [email protected]
Subject: [flexcoders] Re: Flex2B3 :: StackOverflow #1023 :: hmmm

 

oh yeah,

StackOverflowError: Error #1023: Stack overflow occurred.
    at mx.collections::ListCollectionView/::addItemsToView()
    at mx.collections::ListCollectionView/::listChangeHandler()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.collections::ArrayList/::internalDispatchEvent()
    at mx.collections::ArrayList/addItemAt()
    at mx.collections::ListCollectionView/addItemAt()
    at mx.collections::ListCollectionView/addItem()
    at com.teotiGraphix.documentfx.models.elements::Comment/::populateTagList()
    at com.teotiGraphix.documentfx.models.elements::Comment/process()
    at com.teotiGraphix.documentfx.models.elements::Comment$iinit()
    at com.teotiGraphix.documentfx.analyzers::Analyzer/::getComment()
    at com.teotiGraphix.documentfx.analyzers::Analyzer/com.teotiGraphix.documentfx.analyzers:Analyzer::parseMethods()
    at com.teotiGraphix.documentfx.analyzers::Analyzer/analyzeMethods()
    at com.teotiGraphix.documentfx.models.objects::File/::analyzePackage()
    at com.teotiGraphix.documentfx.models.objects::File/parseTokens()
    at com.teotiGraphix.documentfx.models.objects::File/analyze()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFile()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeFileQueue()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFileHandler()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.teotiGraphix.documentfx.models.objects::File/parseTokens()
    at com.teotiGraphix.documentfx.models.objects::File/analyze()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFile()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeFileQueue()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFileHandler()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.teotiGraphix.documentfx..models.objects::File/parseTokens()
    at com.teotiGraphix.documentfx.models.objects::File/analyze()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFile()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeFileQueue()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFileHandler()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.teotiGraphix.documentfx.models.objects::File/parseTokens()
    at com.teotiGraphix.documentfx.models.objects::File/analyze()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFile()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeFileQueue()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFileHandler()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.teotiGraphix.documentfx.models.objects::File/parseTokens()
    at com.teotiGraphix.documentfx.models.objects::File/analyze()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFile()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeFileQueue()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFileHandler()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.teotiGraphix.documentfx.models.objects::File/parseTokens()
    at com.teotiGraphix.documentfx.models.objects::File/analyze()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFile()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeFileQueue()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFileHandler()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.teotiGraphix.documentfx.models.objects::File/parseTokens()
    at com.teotiGraphix.documentfx.models.objects::File/analyze()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFile()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeFileQueue()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFileHandler()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.teotiGraphix.documentfx.models.objects::File/parseTokens()
    at com.teotiGraphix.documentfx.models.objects::File/analyze()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFile()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeFileQueue()
    at com.teotiGraphix.documentfx.documents::ComponentDocument/com.teotiGraphix.documentfx.documents:ComponentDocument::analyzeNextFileHandler()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.teotiGraphix.documentfx.models.objects::File/parseTokens()
    at com.teotiGraphix.documentfx.models.objects::File/analyze()


the error...

On 6/14/06, Michael Schmalle <[EMAIL PROTECTED]> wrote:

Hi,

I am getting a #1023 statckoverflow error on lines that have nothing to do with an array.

Is this a memory error? Like the player is out of memory. It's happening in a VERY intensive proccessing loop.

The docs say talk to Adobe, if the swf is not corrupt.

Thoughts?

Peace, Mike


--
What goes up, does come down.




--
What goes up, does come down.




--
What goes up, does come down.




--
What goes up, does come down. __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to