Weird crash when using criticalObject() and hotkey, ifwinactive

Post AHK_H specific scripts & libraries and discuss the usage and development of HotKeyIt's fork/branch
User avatar
bichlepa
Posts: 154
Joined: 15 Aug 2014, 06:44
GitHub: bichlepa
Contact:

Weird crash when using criticalObject() and hotkey, ifwinactive

08 Apr 2018, 05:36

Try this out:

Main.ahk

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


Thread.ahk

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

CoordMode,ToolTip,screen
parentAHKThread := AhkExported()
hotkey, ifwinactive, asdf ;Remove this line and it will not crash
Loop
{
;Or remove those tree lines an it will not crash
_share.index:=A_Index
if (_share.index / 1000 == _share.index // 1000)
ToolTip % _share.index
}
return


It will always crash.
crash.png
crash.png (6.23 KiB) Viewed 314 times

Is there a bug in this code or in AutoHotkey_H (v 1.1.28.0)?
Scripting is too complicated? Try AutoHotFlow, the graphical automation tool! Written in AutoHotkey.
User avatar
SpeedMaster
Posts: 190
Joined: 12 Nov 2016, 16:09

Re: Weird crash when using criticalObject() and hotkey, ifwinactive

09 Apr 2018, 11:31

Lexikos wrote:Script function recursion is limited by available stack space
https://autohotkey.com/board/topic/4372 ... ashes-ahk/

Maybe this has to do with a recursive function call. :evil:

https://en.wikipedia.org/wiki/Stack_overflow
User avatar
bichlepa
Posts: 154
Joined: 15 Aug 2014, 06:44
GitHub: bichlepa
Contact:

Re: Weird crash when using criticalObject() and hotkey, ifwinactive

10 Apr 2018, 13:21

But .. I don't see any recursive function calls. Not even a function is defined.
Scripting is too complicated? Try AutoHotFlow, the graphical automation tool! Written in AutoHotkey.
User avatar
SpeedMaster
Posts: 190
Joined: 12 Nov 2016, 16:09

Re: Weird crash when using criticalObject() and hotkey, ifwinactive

10 Apr 2018, 14:53

Yep, it was just a bet because I know that such a thing can lead to a crash in ahk. :twisted:

Good luck :!:

Return to “AutoHotkey_H”

Who is online

Users browsing this forum: No registered users and 2 guests