Hey guys,
I'm using a pretty long NSIS script which compiles just fine with NSIS 2.42 — as long as no “!packhdr” is added to the script..
Lines above/below that command line:
—————
SetCompress auto
SetCompressor /SOLID lzma
SetCompressorDictSize 64
SetDatablockOptimize on
CRCCheck on
!packhdr "${PRODUCT_PUB_SHORT}_${PRODUCT_NAME}_Header.tmp" "inc\upx.exe --best ${PRODUCT_PUB_SHORT}_${PRODUCT_NAME}_Header.tmp"
Name "${PRODUCT_PUB_SHORT} ${PRODUCT_NAME} ${PRODUCT_VERSION}"
Caption "${PRODUCT_PUB_SHORT} ${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "${PRODUCT_PUB_SHORT}_${PRODUCT_NAME}_${PRODUCT_VERSION}.exe"
—————
Last log lines before the crash:
—————
(...)
Processed 1 file, writing output:
Adding plug-ins initializing function... Done!
Processing pages... Done!
Removing unused resources... Done!
Generating language tables... Done!
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2008
UPX 3.03w Markus Oberhumer, Laszlo Molnar & John Reiser Apr 27th 2008
File size Ratio Format Name
-------------------- ------ ----------- -----------
410112 -> 396288 96.63% win32/pe MyPub_MyProd_Header.tmp
Packed 1 file.
Generating uninstaller... <-- the crash happens here and _nothing_ is written to the log about why or where the error happened.. :(
—————
Is this a bug or am I doing something wrong?
Best regards,
Martin..
I cannot reproduce this. Can you include the crash details and a minimal script reproducing this?
I would like to, but probably need further assistance on how to generate crash-details..
A screenshot of the dialog you're getting would be a good start. Then, there should be a "details" button somewhere on it that should reveal more useful information.
I attached a screenshot (and turned the bug into a private one, because I'd like to see my script's code being kept privately ;)), showing the error.
Because I'm using Vista Business x64 with German language-interface, you might not be able to read that dialog-box in the front.
Therefore, I provide you with a translation:
"makensis.exe doesn't work anymore.
A Problem prevents the program from being executing correctly. Close the program.
[Close Program]-button"
Looking at the screenshot, I discovered (too late) that the "!packhdr"-line isn't fully visible - so here's the full line:
!packhdr "${PRODUCT_PUB_SHORT}_${PRODUCT_NAME}_Header.tmp" "inc\upx.exe --best ${PRODUCT_PUB_SHORT}_${PRODUCT_NAME}_Header.tmp"
Damn Vista... That doesn't help at all. In the Control Panel, go to Problem Reports and Solutions, find the problem in View Problem History, hit More Details and paste that here. Maybe that would contain more valuable information.
I had Problem reports turned off, so that might be the reason for having only one single button.. ;)
Anyway, this is what the requested textbox offered (translated where needed):
Product
makensis.exe
Problem
Doesn’t work anymore
Date
31.01.2009 15:03
Status
Not reported
Problem signature
Problem’s event name: APPCRASH
Application’s name: makensis.exe
Application’s version: 0.0.0.0
Application’s timestamp: 494ce7ad
Error module’s name: makensis.exe
Error module’s version: 0.0.0.0
Error module’s timestamp: 494ce7ad
Exception’s code: c0000005
Exception’s offset 00020bf3
Operating system’s version: 6.0.6001.2.1.0.256.6
Region scheme’s ID: 1031
Additional information 1: f509
Additional information 2: df26dd7229b907994e6475142dc3cfce
Additional information 3: 14c1
Additional information 4: 72850f9a588b3f43531f82872423fbad
Hopefully this helps you — in case you need more, just let me know.. :)
--best tells UPX to compress the icons. You can probably avoid this error by using --compress-icons=0. I'll keep looking why it happens though as a better error should be thrown.
Try it with:
http://stashbox.org/383780/makensis.7z
OK, found the problem. I was using the resource editor to generate the uninstaller icon offsets. The resource editor tries to save every piece of data it can on the resources and that's not always possible in case of compressed executables. I've made this change so there won't be duplicate code between the resource editor and the functions that handle the icons. To fix this, I've added a special "no change" mode to the resource editor where it doesn't even look for the resource data and can't actually edit.
The fixed version is available here and will be part of 2.43:
http://stashbox.org/383827/makensis.7z