Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes after a while (memory leak?) #3

Open
wywywywy opened this issue Jan 13, 2019 · 7 comments
Open

Crashes after a while (memory leak?) #3

wywywywy opened this issue Jan 13, 2019 · 7 comments

Comments

@wywywywy
Copy link

Hi,

There's a memory leak somewhere, even when using the example scripts.

After receiving some amount of requests (1000? 2000?) it will crash.

I am not sure if the problem is in AhkHttp.ahk or AhkSock.ahk.

I guess maybe an object or array is not cleared somewhere? I have had a look but couldn't find anything.

Has anyone any idea please?

Thanks.

@forbbs
Copy link

forbbs commented May 21, 2019

too many new() in AHKhttp.ahk.

@Akibakki
Copy link

Akibakki commented Jun 1, 2019

I have the same problem.
My script crashes after 1270 - 1290 requests.
And I'm not smart enough to solve this, so please help.... ;-(

Kindly Aki

@rtayne
Copy link

rtayne commented Jun 2, 2019

Has anyone any idea please?

You could try downloading and running the initial commit version https://github.com/zhamlin/AHKhttp/tree/65de0446156ccc4b2a3ed15e7f39d325ba6850db

I believe that when support for binary files was added, a Stack Overflow error was introduced.

@Akibakki
Copy link

Akibakki commented Jun 2, 2019

Yes.... Thanks!!!

I got it working....

Thank you again rtayne

@CrashKoeck
Copy link

Yeah, the new Buffer class is definitely where the issue is. I've run a few tests and it always fails between 1,000 and 2,000 requests. I end up getting a "Function recursion limit exceeded" error at line 354 (attached). I'll dig into this myself, but this is a bit beyond my current level in AHK. Any ideas on how to deal with this? Reverting back to the initial commit seems to cause other issues.
Screenshot 2020-09-20 023140

@CrashKoeck
Copy link

After hunting for a while, found this on the forums that patches the leak - https://www.autohotkey.com/boards/viewtopic.php?t=4890&start=40

In case something happens to the post, attached is the patched and zipped AHKhttp.ahk (full credit to magusneo. I'll put in a pull request with this, but seeing how there have been no responses for quite a while, the updated *.ahk is here.

Note: I've also updated it with the pull request by @bjc5233 to fix the linefeed and variable name bugs. I've also stress tested up to 10K calls and it seemed to be stable vs cashing after less than 2K calls.

AHKhttp.zip

@xinxilas
Copy link

After hunting for a while, found this on the forums that patches the leak - https://www.autohotkey.com/boards/viewtopic.php?t=4890&start=40

In case something happens to the post, attached is the patched and zipped AHKhttp.ahk (full credit to magusneo. I'll put in a pull request with this, but seeing how there have been no responses for quite a while, the updated *.ahk is here.

Note: I've also updated it with the pull request by @bjc5233 to fix the linefeed and variable name bugs. I've also stress tested up to 10K calls and it seemed to be stable vs cashing after less than 2K calls.

AHKhttp.zip

At the post, you said it didnt worked afterall?
https://www.autohotkey.com/boards/viewtopic.php?p=410391#p410391

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants