Sign in to follow this  
Followers 0
(^_^)

Recursion level has been exceeded

12 posts in this topic

#1 ·  Posted (edited)

C:\Documents and Settings\Shawn\Desktop\gui\hunter.au3 (18) : ==> Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.:

what is this error? and how do i fix it?

Edited by (^_^)

[center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center]

Share this post


Link to post
Share on other sites



)" data-cid="215264" data-date="Jul 31 2006, 06:06 PM">

C:\Documents and Settings\Shawn\Desktop\gui\hunter.au3 (18) : ==> Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.:

what is this error? and how do i fix it?

That usually means you have a logical loop where a function is calling itself.

:whistle:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

)" data-cid="215264" data-date="Aug 1 2006, 12:06 AM">

C:\Documents and Settings\Shawn\Desktop\gui\hunter.au3 (18) : ==> Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.:

what is this error? and how do i fix it?

search the forum for "+recursion +exceeded" and you'll find several suggestions. Most certainly you are calling functions in a "circular way", without ever returning. That's a "default" problem of game cheating bots :-)

func1()

func func1()
func2()
; This line will never be reached.
endfunc

func func2()
func1()
; This line will never be reached.
endfunc

Re-design your code.

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Re-design your code.

If you can ^^

There is some code i have that no one has yet been able to rescructure this way. It's possbile (but unlikely) that your existing code may be entirely unusable becuase it's design relys specifically on function recursion...

Share this post


Link to post
Share on other sites

There is some code i have that no one has yet been able to rescructure this way.

I'm sure there are people here who are able to restructure it, however I think they simply don't want to do it for you if your script is large enough. Would you do it? :whistle:

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

It's not really that long of a function (32 lines)...

I might ^^

You can take alook if you want -

http://www.autoitscript.com/forum/index.php?showtopic=29193

I really don't know if it's possible. I've redone functions before do remove funciton recursion but this is a bit different becuase it requires a 'marker' point that can only be made from the function return.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

It's not really that long of a function (32 lines)...

I might ^^

You can take alook if you want -

http://www.autoitscript.com/forum/index.php?showtopic=29193

I really don't know if it's possible. I've redone functions before do remove funciton recursion but this is a bit different becuase it requires a 'marker' point that can only be made from the function return.

O.K. the code is not very long, but it's impossible to understand what you are doing without proper documentation and without the code for the other functions like _PixelRead and _PixelWrite. Also, what's the purpose of your "check chart"? etc., etc., ...

You see: I guess it will be possible to restructure the code, but it will take a lot of time to actually understand what you are doing, before one can start to restructure your code.

EDIT: Btw. I don't know the "magic paintbrush" effect ....

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Those are unessacry...its redo-ing the logic doesn't depend on those at all. PM me and I'll show you what i've been working on with Smoke_N.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Those are unessacry...its redo-ing the logic doesn't depend on those at all. PM me and I'll show you what i've been working on with Smoke_N.

They are not in the code you posted in the thread, because you use the result of _PixelRead() to decide if you let PixelBomb call itself. That could well lead to a never ending loop.

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

PixelRead simply does what it seems...reads a pixel...how it does it aren't that important...look at that link i posted though and scroll on down....you'll see the functions you and others asked for and a link to the scripts and scraps post where the whole source is avialable if you so choose. But really it's unneccary for restructuring purposees... anywho, thanks for your interest and PM me with anything else as i dont want to hijack this guys thread.

Share this post


Link to post
Share on other sites

eviltoaster, did it occur to you that maybe it is necessary to have that information to restructure the code? I'm not very inclined to believe your opinion on what is and is not needed to restructure code when you can't do it. If you were able to restructure the code, I would be inclined to believe you when you say that the implementation details of those functions are not necessary. However, if you were able to restructure the code, this conversation would not exist. Therefore, logic dictates that since you are incapable of restructuring the code, you can not judge what is and is not necessary to restructuring the code.

In short, what I'm saying is shut up and show all the code so Kurt can maybe help you or just shut up. It all depends on whether you really want help or not in solving the problem. If you do, shut up and show the code - if you don't, shut up, you're wasting Kurt's time playing the run-around game.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

in the meantime I know what was is trying to do. He implemented a variant of the flood-fill algorithm with recursion but the code hits the max. recursion limit of AutoIT when the fill area gets too large. I recommended to use a non recursive flood-fill algorithm (the ones that use it's own stack instead).

http://student.kuleuven.be/~m0216922/CG/floodfill.html

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

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