Opened 17 years ago
Closed 17 years ago
#24 closed Bug (Works For Me)
Aut2Exe throws a "failed to UPX error" on occasion
Reported by: | Valik | Owned by: | Jon |
---|---|---|---|
Milestone: | Component: | Aut2Exe | |
Version: | 3.2.10.0 | Severity: | |
Keywords: | UPX | Cc: |
Description
It seems there is a race condition in Aut2Exe somewhere. Sometimes it fails to run UPX and throws an error, other times it works just fine. Not really sure how to reproduce this so just going over the code looking for an obvious way to get out of sync is about all I know to do.
Assigning to Jon but if I get time I may look as well. Probably better if Jon has a look...
Attachments (0)
Change History (4)
comment:1 Changed 17 years ago by Jon
comment:2 in reply to: ↑ description Changed 17 years ago by Jpm
Replying to Valik:
It seems there is a race condition in Aut2Exe somewhere. Sometimes it fails to run UPX and throws an error, other times it works just fine. Not really sure how to reproduce this so just going over the code looking for an obvious way to get out of sync is about all I know to do.
Assigning to Jon but if I get time I may look as well. Probably better if Jon has a look...
I experience that too I was thinking it was due to the nonreg test environment
comment:3 Changed 17 years ago by Xenobiologist
Hi,
I get this output all the time I compile this script:
#region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=C:\Downloads\Icons\iPod-black.ico #AutoIt3Wrapper_outfile=C:\Downloads\AutoIt-Skripte\Entwicklung\ForumTests\USB\ejectUSB_Mega.exe #AutoIt3Wrapper_res_comment=Ejects USB Stick (Parameter : Drive e.g. : E:) #AutoIt3Wrapper_res_fileversion=1.0.0.0 #AutoIt3Wrapper_res_legalcopyright=Mega #AutoIt3Wrapper_res_language=1031 #AutoIt3Wrapper_run_tidy=y #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** ;ejectUSB If Not _ejectUSB() = 1 Then MsgBox(16, 'Error', 'Es ist ein Fehler aufgetreten!', 5) Func _ejectUSB($drive = '') Local $path = @TempDir & '\12345USB54321.exe' If $drive = '' Or $drive = Default Then $drive = StringLeft(@ScriptDir, 2) If $cmdLine[0] = 1 And ($cmdLine[1] = '-?' Or $cmdLine[1] = '/?') Then MsgBox(64, 'Information', 'Parameter : (Drive) e.g. : E:', 5) Exit (0) EndIf If $cmdLine[0] = 1 Then $drive = $cmdLine[1] FileInstall('EjectMedia.exe', $path, 1) If Not FileExists($drive) Then Return -1 If Not FileExists($path) Then Return -2 Run($path & ' ' & $drive & ' -l -f -s -w:1000', @TempDir, @SW_HIDE) Return 1 EndFunc ;==>_ejectUSB
>"C:\Programme\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper_Gui.exe" /in "C:\Downloads\AutoIt-Skripte\Entwicklung\ForumTests\USB\ejectUSB.au3" +>13:40:24 Starting AutoIt3Wrapper GUI v.1.9.5 -> No changes made.. +>13:40:26 Starting AutoIt3Wrapper v.1.9.5.3 Environment(Language:0407 Keyboard:00000407 OS:WIN_XP/Service Pack 2 CPU:X86) >Running Tidy (2.0.23.7) from:C:\Programme\AutoIt3\SciTE\tidy +>13:40:28 Tidy ended.rc:0 >Running AU3Check (1.54.10.0) from:C:\Programme\AutoIt3 +>13:40:28 AU3Check ended.rc:0 >Running:(3.2.10.0):C:\Programme\AutoIt3\aut2exe\aut2exe.exe +>13:40:30 Aut2exe.exe ended.rc:0 ->Warning: This is an Unicode compiled script and will not run on Win9x/ME. +>13:40:31 RC.exe ended. Changed resource language to: German (Standard). rc:0 +>13:40:31 ResHacker ended.rc:0 >Running (3.1.0.0): C:\Programme\AutoIt3\aut2exe\upx.exe Ultimate Packer for eXecutables Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007 UPX 3.01w Markus Oberhumer, Laszlo Molnar & John Reiser Jul 31st 2007 File size Ratio Format Name -------------------- ------ ----------- ----------- Packed 1 file: 0 ok, 1 error. upx: C:\Downloads\AutoIt-Skripte\Entwicklung\ForumTests\USB\ejectUSB_Mega.exe: AlreadyPackedException: already packed by UPX !>13:40:31 UPX.exe ended.rc:2
The produced exe isn't runnable and it also doesn't show my chosen icon.
So long,
Mega
comment:4 Changed 17 years ago by Valik
- Resolution set to worksforme
- Status changed from new to closed
I can't reproduce this nor can I see how it would fail unless UPX really is failing. So it seems that the problem I occasionally get is related to UPX genuinely failing and is not an Aut2Exe issue. Resolving as worksforme.
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
The only thing changed in the last couple of years in that part of the code is upx is not used if compiling x64. And just before UPX is run you added the change susbsystem code. Is it possible that it is leaving the file open or something causing trouble for upx?