Compressing autohotkey.exe before compiling script causes memory error

Post AHK_H specific scripts & libraries and discuss the usage and development of HotKeyIt's fork/branch
hobboy
Posts: 41
Joined: 05 Jan 2016, 09:59

Compressing autohotkey.exe before compiling script causes memory error

08 Sep 2017, 05:30

When compiling AHK scripts I've found that I receive a memory error if I compress AutoHotkey.exe before I compile (e.g. "The application was unable to start correctly (0xc0000005)").

This is the process:
1) build/compile AHK_H
2) compress AutoHotkey.exe with upx.exe (part of the build step in Visual Studio, or do this separately)
3) compile myscript.ahk using AutoHotkey.exe => myscript.exe
Running a script works fine with the compressed AutoHotkey.exe e.g.

Code: Select all

AutoHotkey.exe myscript.ahk
However, compiling the script with AutoHotkey.exe fails, e.g. running myscript.exe

If we compress after compiling the script it's fine:
1) build/compile AHK_H
2) compile myscript.ahk using AutoHotkey.exe => myscript.exe
3) compress myscript.exe with upx

Is there a layman explanation for why I shouldn't compress AutoHotkey.exe before using it to compile scripts? I find it a bit unusual since the Visual Studio project specifically has a macro to compress AutoHotkey.exe in the build process. Perhaps it's an issue with upx?
HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: Compressing autohotkey.exe before compiling script causes memory error

10 Sep 2017, 04:29

I am not sure what is causing this issue. I will have to debug and see what is going on.

Return to “AutoHotkey_H”

Who is online

Users browsing this forum: MiM and 14 guests