Compressing autohotkey.exe before compiling script causes memory error

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Compressing autohotkey.exe before compiling script causes memory error

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

Post by HotKeyIt » 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.

Compressing autohotkey.exe before compiling script causes memory error

Post by hobboy » 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]GeSHi © Codebox Plus

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?

Top