Sign in to follow this  
Followers 0
jvanegmond

Recursion level has been exceeded

5 posts in this topic

Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.:

For $x = 1 to _ArrayMaxIndex($maps)

What is this? Obviously, this is not what i want.

Share this post


Link to post
Share on other sites



Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.:

For $x = 1 to _ArrayMaxIndex($maps)

What is this? Obviously, this is not what i want.

The program was terminated because the stack was too full. I'm not extremely familiar with manipulating the stack, but I do know that certain functions store information on the stack and if it gets too full...

I've hit a similar problem in the past because I was calling functions from inside of functions and never allowing a function to fully complete and return. Maybe _ArrayMaxIndex was called too many times without relieving the stack and this is what caused this. That's where I would start.

You have a lot of posts so I'm sure you are already aware of this information I am giving you. I'm just offering it incase you aren't aware.

Hope this helps,

Nomad


Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

You should try something like this to see if it is truly this line causing the problem.

$maxIndex = _ArrayMaxIndex($maps)
For $x = 1 to $maxIndex
Edited by neogia

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

The program was terminated because the stack was too full. I'm not extremely familiar with manipulating the stack, but I do know that certain functions store information on the stack and if it gets too full...

I've hit a similar problem in the past because I was calling functions from inside of functions and never allowing a function to fully complete and return. Maybe _ArrayMaxIndex was called too many times without relieving the stack and this is what caused this. That's where I would start.

You have a lot of posts so I'm sure you are already aware of this information I am giving you. I'm just offering it incase you aren't aware.

Hope this helps,

Nomad

Im also making a function call itself. So i'm getting a feeling it is that problem. I had a bit of a pause but i'm now stripping as many as possible from the function, so away goes the #include <array.au3>

Thanks for the help in advance and i'll let you know where it goes wrong again.

I stil don't have a answer though ! What is stack overflow exactly?

[edit] I'm just having the error now.. :

Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.:

ListAllFilesToArray($maps[$x])

this line is inside the function ListAllFilesToArray()

Edited by Manadar

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Stack is special address space used by your program for calculations. You "push" values onto the stack and you pull them off again ("pop") in reverse order (LIFO - Last In First Out). If you've ever used an RPN calculator, every time you press Enter you push a value onto the stack... operators (+ - * /) pop values off and use them in calculations (and free their positions on the stack).

Understand that or not, you should untuitively understand that infinitely recursing is a bad thing. The system has to keep track of each previous context so that you can unwind back to it. Unchecked it can eat all the resources on your system, thus recursion limits.

Before you use recursion you need to think through how each level can know that it is done and exit back to the calling level - otherwise you find yourself at the bottom of a very deep hole with no means of getting back out.

Dale

Edit: typo

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0