Jump to content

stack overflow problem


Misha
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...