Crash with ahkThread on Win10 x64 - v1.1.28

Post AHK_H specific scripts & libraries and discuss the usage and development of HotKeyIt's fork/branch
robodesign
Posts: 366
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Crash with ahkThread on Win10 x64 - v1.1.28

15 Feb 2018, 14:50

Hello!

AHK_H always crashes when I want to use ahkThread.

Main AHK file:

Code: [Select all] [Download] GeSHi © Codebox Plus

 #Persistent
testThread := ahkThread(" #Include test.ahk")
SoundBeep
Return


The secondary thread: test.ahk file


I do not know if others reported it, but this worked until AHK_H 1.1.27.06. But, with the latest version, it crashes instantenously [v1.1.28].

Expected behaviour: two consecutive beeps and both AHK_H scripts should remain persistent [not exit]. What happens: it crashes, no error messages and no beeps.

I hope this will be fixed. Thank you.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
HotKeyIt
Posts: 1689
Joined: 29 Sep 2013, 18:35
Contact:

Re: Crash with ahkThread on Win10 x64 - v1.1.28

17 Feb 2018, 08:55

Works fine for me, make sure you have no ahkThread.ahk file in your lib folders!

Code: [Select all] [Download] GeSHi © Codebox Plus

 #Persistent
testThread := ahkThread("#Persistent`n#NoTrayIcon`nSoundBeep`nReturn")
SoundBeep
Return
robodesign
Posts: 366
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: Crash with ahkThread on Win10 x64 - v1.1.28

18 Feb 2018, 07:58

I don't have any. Please test it more, on different systems.

Or have me run a debug version to send you reports.

It's frustrating.....

Please note, you did not use include.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
HotKeyIt
Posts: 1689
Joined: 29 Sep 2013, 18:35
Contact:

Re: Crash with ahkThread on Win10 x64 - v1.1.28

18 Feb 2018, 08:39

I tried #include as well, does the above without #include not fail for you?
robodesign
Posts: 366
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: Crash with ahkThread on Win10 x64 - v1.1.28

18 Feb 2018, 09:41

It crashes all the same. I just tested it.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
HotKeyIt
Posts: 1689
Joined: 29 Sep 2013, 18:35
Contact:

Re: Crash with ahkThread on Win10 x64 - v1.1.28

18 Feb 2018, 10:19

Can you try downloading the latest AHK_H, extract to a folder and create AutoHotkey.ahk in Win32w folder with the content above, then double click AutoHotkey.exe in the same folder.
robodesign
Posts: 366
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: Crash with ahkThread on Win10 x64 - v1.1.28

18 Feb 2018, 10:43

Yes, sure!

1. I downloaded the ZIP and unpacked it.
2. I created the file: AutoHotkey.ahk ... in x32w.
The content is:

Code: [Select all] [Download] GeSHi © Codebox Plus

 #Persistent
testThread := ahkThread("#Persistent`n#NoTrayIcon`nSoundBeep`nReturn")
SoundBeep
Return


3. Executed the file with AutoHotkey.exe from x32w.
4. Result: it crashed all the same. Instantly. No beeps.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
guest3456
Posts: 2396
Joined: 09 Oct 2013, 10:31

Re: Crash with ahkThread on Win10 x64 - v1.1.28

18 Feb 2018, 10:50

robodesign wrote:Yes, sure!

1. I downloaded the ZIP and unpacked it.
2. I created the file: AutoHotkey.ahk ... in x32w.
The content is:

Code: [Select all] [Download] GeSHi © Codebox Plus

 #Persistent
testThread := ahkThread("#Persistent`n#NoTrayIcon`nSoundBeep`nReturn")
SoundBeep
Return


3. Executed the file with AutoHotkey.exe from x32w.
4. Result: it crashed all the same. Instantly. No beeps.


i just tested this, and it worked fine for me. i got two soundbeeps. no errors. Win10 x64

robodesign
Posts: 366
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: Crash with ahkThread on Win10 x64 - v1.1.28

18 Feb 2018, 11:22

Ugh... here it crashes, with any script that uses ahkThread... and AHK_H v1.1.27.06 does not crash.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
guest3456
Posts: 2396
Joined: 09 Oct 2013, 10:31

Re: Crash with ahkThread on Win10 x64 - v1.1.28

18 Feb 2018, 11:44

do you get any error messages or any other clues about the crash? how do you know it crashes? does it just silently exit as if the script was empty?

robodesign
Posts: 366
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: Crash with ahkThread on Win10 x64 - v1.1.28

18 Feb 2018, 11:49

With complex scripts, I get the common Windows 10 error message.

Autohotkey_H Unicode 64-bit a cesse de fonctionner. Un problème a fait que le programme a cesse de fonctionner correctement.

[I have Windows en français :-) ].

With this simple script, it silently exits and I get no message and no beeps.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
robodesign
Posts: 366
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: Crash with ahkThread on Win10 x64 - v1.1.28

22 Feb 2018, 09:41

Any updates on this issue?
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
HotKeyIt
Posts: 1689
Joined: 29 Sep 2013, 18:35
Contact:

Re: Crash with ahkThread on Win10 x64 - v1.1.28

22 Feb 2018, 17:14

Since it can't be reproduced here, I would need to take a look on it on your machine using teamviewer or similar.
Let me know if that would be possible and we can schedule a session.
robodesign
Posts: 366
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: Crash with ahkThread on Win10 x64 - v1.1.28

22 Feb 2018, 17:32

Yes, we can do that. Please let me know how to get in contact and establish the details. I am available on WhatsApp. Messenger or irc.

Should I drop you a private message with my contact details?

Thank you very much.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
robodesign
Posts: 366
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: Crash with ahkThread on Win10 x64 - v1.1.28

02 Mar 2018, 12:39

HotKeyIt wrote:Yes please.


In the latest build, more precisely... v1.1.28.H003... the threads issue is fixed, partially.

The same script given as example in the initial post works now, but on Reload [from the standard tray menu], it crashes. The same applies with all other scripts I tested and use ahkThread.

I suppose the same fix must be applied to the reload routine[?].

Thank you!

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
HotKeyIt
Posts: 1689
Joined: 29 Sep 2013, 18:35
Contact:

Re: Crash with ahkThread on Win10 x64 - v1.1.28

02 Mar 2018, 18:04

I don't think any of the changes were relevant to this, can't imagine it would fix something and I still can't reproduce.
User avatar
Drugwash
Posts: 567
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: Crash with ahkThread on Win10 x64 - v1.1.28

04 Mar 2018, 11:52

Incidentally I've stumbled into a comment in the source file AhkThread.ahk, stating "; keep dll loadded even if returned object is freed".
I'm wondering whether the dll remains in memory even after last object/thread was deleted/closed and this could somehow clash with creating a new thread upon main script's restart, maybe if the dll is slow to unload or is hung?

Actually I just posted a question regarding the two thread-closing functions ahkThread_Free() and ahkTerminate[] since their usage is confusing.
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
HotKeyIt
Posts: 1689
Joined: 29 Sep 2013, 18:35
Contact:

Re: Crash with ahkThread on Win10 x64 - v1.1.28

04 Mar 2018, 17:41

That should be no problem, when program exits the threads are terminated and memory is freed automatically.
robodesign
Posts: 366
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: Crash with ahkThread on Win10 x64 - v1.1.28

07 Mar 2018, 15:31

@hotkeyit: I was able to reproduce the issue on Win 7 x64 as well, on my old PC. On reload, with just one ahkThread, it crashed.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.

Return to “AutoHotkey_H”

Who is online

Users browsing this forum: No registered users and 2 guests