Archive: "Bus error" compressing big file in makensis on linux


"Bus error" compressing big file in makensis on linux
I've been using makensis on linux for a while now, very successfully (see This thread for some of the teething troubles, and how they were solved).

But now I'm getting a "bus error". It occurs when makensis tries to add a large (22M) file to the installer. I know it's daft to include a 22M file in a windows installer, but it's part of the Sun JVM and there's pressure to distribute the JVM with the app, rather than make people download it separately. Please don't just tell me this is a bad idea - I know that already.

In an attempt to narrow down the problem, I created this script:


$cat test.nsi
SetCompress off
Section
File /r jre/lib/rt.jar
SectionEnd


And here's the output when I run it:
$ makensis /V4 test.nsi
MakeNSIS v2.01 - Copyright 1999-2004 Nullsoft, Inc.

Portions Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler (zlib).
Portions Copyright (C) 1996-2002 Julian R Seward (bzip2).
Portions Copyright (C) 1999-2003 Igor Pavlov (lzma).

Contributors: nnop@newmail.ru, Ryan Geiss, Andras Varga, Drew Davidson,
Peter Windridge, Dave Laundon, Robert Rainwater, Yaroslav Faybishenko, Jeff Doozan,
Amir Szekely, Ximon Eighteen, et al.

Processing config:
Processing plugin dlls: "NSIS/Plugins/*.dll"

... lots of dlls ...

!define: "MUI_INSERT_NSISCONF"=""

Changing directory to: ...

Processing script file: "test.nsi"
SetCompress: off
Section: ""
File: "rt.jar"Bus error


I'm using a version of makensis built yesterday from cvs code.

Thanks, fixed.

Changed source attached as pserver CVS lags behind.


Brilliant. Thanks. Another lightning-fast response. I thought it was still giving problems after doing a make, but a make clean and fresh compile fixed it.


Some less good news...

When I run the new installer I've just made, it reaches the point of decompressing the jt.jar file, and dies with the message "Error decompressing data! Corrupted installer?" (after decompressing other files fine).

This happens with zlib or lzma. I can't seem to get bzip2 to work, and I can't seem to get it to work with no compression either. Setting either of these gives segmentation faults.

I also get segmentation faults using lzma (but not using zlib) with this test script:


SetCompress force
SetCompressor lzma

OutFile test.exe
Section
File jre/lib/rt.jar
SectionEnd

try this one.


Sorry, still no good. I get the same "Error decompressing data! Corrupted installer?" error on that file. I seem to be able to create a test installer containing the one file (uncompressed), but that gives the same error when I run it.


another one


Looks like that's fixed it. Thanks a lot for doing the work.

I still seem to get a segmentation fault at the end of compiling a test installer using bzip2, but I'm not using bzip2, and mine apprears to work OK.


Which test installer did you try to compile? I've tested some of the examples and got no segmentation fault. Did you try using the latest CVS sources and a clean build? Note that the fixed strlist.h is not yet in CVS.


Latest cvs seems to have fixed it - I just did a cvs update, and a clean build (but leaving the fixed strlist.h), and now there's no segmentation fault. I was using latest cvs last time, but it must have changed in the last week, I guess.


Cool, thanks. Let me know if you get the segmentation fault again. It would also be useful if you can compile with debug symbols and get a backtrace with gdb when it crashes for any reason. To do so, remove the -s flag from LDFLAGS and add the -g flag to CXXFLAGS and CFLAGS.