Launcher.ahk PCRE execution error with hotstring and function without #Requires (v1 plus v2) Topic is solved

Report problems with documented functionality
User avatar
mikeyww
Posts: 27143
Joined: 09 Sep 2014, 18:38

Launcher.ahk PCRE execution error with hotstring and function without #Requires (v1 plus v2)

30 Dec 2023, 05:23

Code: Select all

; #Requires AutoHotkey v1.1.35
::b::Send % SubStr("a", 1)

Code: Select all

; #Requires AutoHotkey v2.0
::b::Send SubStr("a", 1)
Same for :X:b.

image231230-0518-001sm.png
Error message
image231230-0518-001sm.png (83.17 KiB) Viewed 1512 times

More: viewtopic.php?f=82&t=124208

AHK installed: 1.1.37.01 and 2.0.11

Code: Select all

Operating system : Microsoft Windows 11 Pro
OS version       : 10.0.22621
PC model         : ASUS EXPERTBOOK B9400CEAV_B9450CEA
CPU              : Intel64 Family 6 Model 140 Stepping 1
OS bitness       : 64
CPU bitness      : 64
Call stack

C:\Program Files\AutoHotkey\UX\inc\identify.ahk (6) : [RegExMatch] While (p := RegExMatch(code, identify_regex, &m, p))
C:\Program Files\AutoHotkey\UX\inc\identify.ahk (6) : [IdentifyBySyntax] While (p := RegExMatch(code, identify_regex, &m, p))
C:\Program Files\AutoHotkey\UX\launcher.ahk (72) : [GetLaunchParameters] i := IdentifyBySyntax(code)
C:\Program Files\AutoHotkey\UX\launcher.ahk (139) : [IdentifyAndLaunch] lp := GetLaunchParameters(ScriptPath, !(whichMode := args.HasProp('which')))
C:\Program Files\AutoHotkey\UX\launcher.ahk (59) : [Main] IdentifyAndLaunch(ScriptPath, A_Args, switches)
C:\Program Files\AutoHotkey\UX\launcher.ahk (16) : [] Main()
> Auto-execute
User avatar
mikeyww
Posts: 27143
Joined: 09 Sep 2014, 18:38

Re: Launcher.ahk PCRE execution error with hotstring and function without #Requires (v1 plus v2)

01 Jan 2024, 22:14

Thanks for this interim fix. I am also going to hope for an official revision!
User avatar
RaptorX
Posts: 388
Joined: 06 Dec 2014, 14:27
Contact:

Re: Launcher.ahk PCRE execution error with hotstring and function without #Requires (v1 plus v2)

09 Jan 2024, 13:29

Regex Error -8 usually indicates a catastrophic backtracking in my experience and I usually fix it by modifying the expression itself.
Projects:
AHK-ToolKit
lexikos
Posts: 9629
Joined: 30 Sep 2013, 04:07
Contact:

Re: Launcher.ahk PCRE execution error with hotstring and function without #Requires (v1 plus v2)  Topic is solved

15 Feb 2024, 22:04

Commit 3c20468 fixes it. If you want to apply the fix prior to v2.0.12, it should be sufficient to update inc/identify_regex.ahk.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 15 guests