[comp.sys.ibm.pc.misc] "Packed file is corrupt" means what?

yee@edison.seas.ucla.edu (John Yee) (04/11/91)

Hi, we need some help around here with our new machine.
Under some circumstances, running some programs (those compiled by
a Microsoft compiler), we get the message "Packed file is corrupt"
(or something like that) and we found using NU that the msg comes
from within the .exe file itself.  Our machine is a noname 486,
and one of the ways we can get this to happen is to boot from a floppy.
If we boot from the HD, the programs seem to run OK---sometimes.
In both cases the program we are trying to run is stored on the HD.
Comments welcome,
Thanks in advance,
jy, yee@seas.ucla.edu

cur022%cluster@ukc.ac.uk (Bob Eager) (04/12/91)

In article <2364@lee.SEAS.UCLA.EDU>, yee@edison.seas.ucla.edu (John Yee) writes:
> Under some circumstances, running some programs (those compiled by
> a Microsoft compiler), we get the message "Packed file is corrupt"
> (or something like that) and we found using NU that the msg comes
> from within the .exe file itself.  Our machine is a noname 486,
> and one of the ways we can get this to happen is to boot from a floppy.
> If we boot from the HD, the programs seem to run OK---sometimes.
> In both cases the program we are trying to run is stored on the HD.

There is an option in the Microsoft linker to build an executable file that
is compressed in a fairly simple minded way. The linker includes code to
unpack the file at runtime. The message comes from the unpacking code.

I believe that the unpacking code is slightly buggy - it won't work if the
program is loaded at certain memory addresses (probably near 64K boundaries).
You can solve this by altering the BUFFERS= statement in CONFIG.SYS to
change the size of resident DOS and move the program a bit. Just alter the
number by 1 either way until it loads OK (reboot after each change, of
course).

A program does exist to unpack packed files. It's bundled with one of the
other executable file compression utilities - LZEXE. It's there so that
you can undo the MS packing and apply something better.
-------------------------+-------------------------------------------------
Bob Eager                | University of Kent at Canterbury
                         | +44 227 764000 ext 7589
-------------------------+-------------------------------------------------

kabra437@pallas.athenanet.com (Ken Abrams) (04/12/91)

In article <2364@lee.SEAS.UCLA.EDU> yee@edison.seas.ucla.edu (John Yee) writes:
>Hi, we need some help around here with our new machine.
>Under some circumstances, running some programs (those compiled by
>a Microsoft compiler), we get the message "Packed file is corrupt"

This is caused by the EXE packer that comes with the MS compiler.
It (usually) only occurs when the program load into RAM starts below
the first 64K segment boundary.  The quick and dirty way to avoid the
problem is to load enough things memory resident to fill up the first
64K.  Adding more BUFFERS is probably the easiest way.  When you get
the free memory down below 576K (589,824) as shown by CHKDSK or MEM
then the problem should disappear.  
I have heard rumors that the problem will not occur with (not yet released)
MS-DOS 5.0.

-- 
========================================================
Ken Abrams                     uunet!pallas!kabra437
Illinois Bell                  kabra437@athenanet.com
Springfield                    (voice) 217-753-7965

schuster@panix.uucp (Michael Schuster) (04/14/91)

In article <1065@pallas.athenanet.com> kabra437@pallas.athenanet.com (Ken Abrams) writes:
>I have heard rumors that the problem will not occur with (not yet released)
>MS-DOS 5.0.

It still occurs. But Microsoft includes a utility, LOADFIX.COM, which
makes sure the load occurs above the first 64K boundary.


-- 
 Mike Schuster                                      |    CIS: 70346,1745
 NY Public Access UNIX:  ...cmcl2!panix!schuster    |    MCI Mail, GENIE:
 The Portal (R) System:  schuster@cup.portal.com    |           MSCHUSTER