Jump to content
Sign in to follow this  
Misha

stack overflow problem

Recommended Posts

Misha

Yes, hi, I am trying to make my script run forever, basicly so it wont overflow after a day or 2, is there anyway I could find where does it overflow?Also my script is around 10k lines so I can't really post it.

Share this post


Link to post
Share on other sites
martin

Yes, hi, I am trying to make my script run forever, basicly so it wont overflow after a day or 2, is there anyway I could find where does it overflow?Also my script is around 10k lines so I can't really post it.

By 'overflow' do you mean you get a stack overflow error?

Without any code top look at we can only guess. The first thing to do is to look at the help file, Appendix, AutoIt limits/defaults.

The most common reason I have had stack overflow problems is to do with recursion.

1) a recursive function calling itself too many times.

2) Function A calling Function B which calls Function A (maybe indirectly) when a certain condition occurs, which is really the same as 1).

If you don't know which function is causing the problem you could create a log so that every time a function is called you write to the log.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
Misha

I see, you are correct stack overflow error, so I said in the title to note.

I look cearfully and I couldnt see perhaps function a calling b calling c calling d calling a or something like that...

Share this post


Link to post
Share on other sites
martin

I see, you are correct stack overflow error, so I said in the title to note.

Oh yes, sorry.

I look cearfully and I couldnt see perhaps function a calling b calling c calling d calling a or something like that...

OK. Well I would expect that there is some loop somewhere which is causing the problem. Can you try adding a log, or if you run it from Scite then add some consolewrite lines. I tried console write with a function calling itself and you get a nice error display saying that recursive level exceeded, quitting to prevent stack overflow.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
Misha

Well yes I fixed it, seems I have like 12 of those all over the script, thanks alot ;.

Share this post


Link to post
Share on other sites
Misha

Hello gentelmen, I have this problem still yet because the code is 12k lines and its impossible to find it the error specially since I got people telling me that they get errors like after 2 weeks so I am thinking is there like a Try function in autoit or perhaps something that will stop that error from appearing on an event like this stack overflow error.

Share this post


Link to post
Share on other sites
Misha

bump

Share this post


Link to post
Share on other sites
SmOke_N

bump

Without the code, no one can answer your question... no need to bump if you are not going to provide it.

Edit:

And yes, I read how many lines it was... but I'm sure someone here would look at it for you.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Zedna

Make option to turn ON logging every @scriptline activity to LOG file.

On problematic machines TURN ON this option (for example defined in INI file).

When program crashes then take LOG file and analyze what happend.

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  

×