Note, again referencing latest AHK code at:
https://github.com/tallpeak/AHK/tree/main/fortnite/lumberjack
I've returned to v9.6, because I had a problem with AHK crashing, and my macros run for many hours since with no crashes.
The crashing started after installing "2024-07 Cumulative Update for Windows 11 Version 23H2 for x64-based Systems (KB5040442)". (I don't know how that's relevant, but a system restore caused other problems and I ended up accidentally letting the update reinstall.)
WinDbg says this on my minidump file:
FAILURE_BUCKET_ID: NULL_POINTER_WRITE_c0000005_AutoHotkey64.exe!unknown_error_in_process
and .. FRAME_ONE_INVALID: 1
Seems like the stack is smashed?
Could you have introduced a null-pointer exception somehow in v9.7? Buffer overflow somewhere on the stack?
I ran AHK main from github (AutoHotKeyx) in the latest version of Visual Studio 2022 to try to debug it further, but still seemed to have a mess on the stack when it crashed. (I guess I should have copied some disassembly, at least...)
I'm thinking it's likely some MCode...
I know I should debug further but reverting to 9.6 fixed my problem... if I were to debug further, how would I do that? The only thing I can think of is "printf debugging", eg. create a wrapper for each FindText function call that logs its arguments so I can narrow down the problem a bit. Log exact nanoseconds too, so that I can have some confidence in whether the crash occurred during an MCode call (DllCall).
Do you have an example of a wrapper? I know it should be trivial to write one...