Archive: NSISdl crash when finishing download


NSISdl crash when finishing download
Hi all,

in the last two days I'm getting crazy with the following problem:

in the installer script attached there's an optional section that downloads and extracts an archive. The problem is that it downloads the tar.gz archive but it crashes (app not responding) when the download is finished. If I watch the destination folder I can see the file that reports 0 Kb dimension... but when I kill the application, magically the dimension of the file turns to the dimension that it should be... it seems that the installer downloads the file but it's unable to "finalize" the task...

I also tried to put the same download script "alone" (that is only the content of the section of download and untar), I compiled it and launched... it works!!!!

I modified the whole script many times to let it work... but now I really don't know what I could do more...

could someone help me please? many thanks,

Marco


This may help with the debugging:
if I simply add a MessageBox right before the nsisdl instruction, it works!

an example:

MessageBox MB_OKCANCEL "$ARCHIVE_SIZE_MB MB" IDOK download IDCANCEL cancel_download

download:
SetShellVarContext current
InitPluginsDir
NSISdl::download "$HTTP_PATH/$ARCHIVE_NAME" "$TEMP\$ARCHIVE_NAME"
Pop $0
StrCmp $0 "success" download_ok download_failed


I feel it very strange, don't you?

Thanks,

Marco

Yes, this happens sometimes with NSISdl. And with InetLoad in NSISdl mode (uses code fragment from NSISdl). Inetc looks free from this bug. Use something like this:

inetc::get "$HTTP_PATH/$ARCHIVE_NAME" "$TEMP\$ARCHIVE_NAME" /END
Pop $0
StrCmp $0 "OK" download_ok download_failed

Hi Takhir,

many thanks for your reply. Very useful.
Regards,

Marco