Compile issue v1.1.30.00 and v1.1.30.01

Report problems with documented functionality
User avatar
PuzzledGreatly
Posts: 1303
Joined: 29 Sep 2013, 22:18

Compile issue v1.1.30.00 and v1.1.30.01

09 Dec 2018, 19:13

When compiling I keep seeing this error message:
Error: Could not copy final compiled binary file to destination
Note, this happens when the compiling succeeds. It doesn't happen every time but always after my computer has rebooted. I seem to remember this problem from several years ago.
User avatar
jmeneses
Posts: 524
Joined: 28 Oct 2014, 11:09
Location: Catalan Republic

Re: Compile issue v1.1.30.00 and v1.1.30.01

10 Dec 2018, 03:22

Hi PuzzledGreatly,
Try When this happens to you or before compiling make sure, with the task manager, that the name you give to your executable is not running.
I use a BAT to compile my scripts, which I did a TASKKILL
Each BAT is different but here is an example

Code: Select all

taskkill /F /IM EMULHootL* /T
DEL X:\PortableApps\Auto\Scripts\AUTOHOT\MisScripts\EMULHootL*.exe
X:\PortableApps\Auto\AutohotKey_L\Compiler\Ahk2Exe.exe /in X:\PortableApps\Auto\Scripts\AUTOHOT\MisScripts\EMULHootL_v5.ahk /out X:\PortableApps\Auto\Scripts\AUTOHOT\MisScripts\EMULHootL_v5.exe /icon X:\PortableApps\Auto\Scripts\Icons\2387.ico
I Hope this can help you
regards
Donec Perficiam
User avatar
PuzzledGreatly
Posts: 1303
Joined: 29 Sep 2013, 22:18

Re: Compile issue v1.1.30.00 and v1.1.30.01

10 Dec 2018, 09:58

Thanks, I use process, close rather than taskkill. I've confirmed using task manger that the executable is not running and that the message appears when the executable is compiled.
User avatar
jmeneses
Posts: 524
Joined: 28 Oct 2014, 11:09
Location: Catalan Republic

Re: Compile issue v1.1.30.00 and v1.1.30.01

11 Dec 2018, 02:06

Hello PuzzledGreatly
I doubt it's a BUG of AHK, I'm compiling daily with v1.1.30.00 and W10 64b, It's evident that AhK2Exe can not record the output file in the destination directory for some reason. It's probably a Windows permissions or privileges issue, with this if I have had very several problems whit old scripts that worked correctly and they stopped doing it without compiling them and and everything was for permissions issue.
When it happens to you and before you answering the message, try to copy a file or generate a TXT in the destination directory of the * .EXE

Regards
Donec Perficiam
User avatar
jmeneses
Posts: 524
Joined: 28 Oct 2014, 11:09
Location: Catalan Republic

Re: Compile issue v1.1.30.00 and v1.1.30.01

11 Dec 2018, 02:41

Donec Perficiam
User avatar
PuzzledGreatly
Posts: 1303
Joined: 29 Sep 2013, 22:18

Re: Compile issue v1.1.30.00 and v1.1.30.01

04 Jan 2019, 18:23

Thanks for the replies. I had no trouble compiling with version AHK 1.1.29.01. I don't think it is a permissions issue as this occurs in different folders on different hard drives and yes I can carry out regular activities in those folders. I think it is a memory issue as the issue is not consistent.
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: Compile issue v1.1.30.00 and v1.1.30.01

16 Mar 2019, 22:04

The error message in question is raised by this:

Code: Select all

	try FileCopy, %ExeFileTmp%, %ExeFile%, 1
	catch
		Util_Error("Error: Could not copy final compiled binary file to destination.")
So you see, a simple FileCopy is failing. You might get more information by getting the Ahk2Exe source and adding A_LastError to the message shown by Util_Error. Error 5 would be "access denied".

When I see a "permissions" error for a file which I clearly have write permission to (and is not read-only), I think of two possibilities:
  • The file is locked/in use.
  • The antivirus is interfering.
robertnixon
Posts: 1
Joined: 17 Jan 2020, 15:33

Re: Compile issue v1.1.30.00 and v1.1.30.01

17 Jan 2020, 15:57

I have had this error and found that the it was cured by NOT having the source code in the AutoHotKey folder under Program Files (or presumably any other folders that Windows "manages"). Putting the source on Desktop works, but I opted for a folder not under Program Files with all my AHK sources etc. in it.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 25 guests