Premature end of image file--so close

Ross Boylan RossBoylan at
Wed May 19 01:27:50 UTC 2004

On Tue, May 18, 2004 at 11:11:19AM -0700, Tim Rowledge wrote:
> Ross Boylan <RossBoylan at> wrote:
> > On Fri, May 14, 2004 at 09:49:42PM -0700, Ross Boylan wrote:
> > > When I try to start squeak, I get 
> > > "Read failed or premature end of image file"
> > 
> > I think I see the code that issues the error
> > (readImageFromFile:HeapSize:StartingAt:).  The image internally says
> > it should be 43,914,644 bytes.(*) ls -l says the file is 43,913,280.
> I you've actually lost bits from the file, you're screwed.  Since we do
> a garbage collect before snapshotting, every bit in the supposed dump
> is sacred, every little one (and zero). At the top end of memory you're
> going to be missing some relatively new objects that are being pointed
> to by older ones. Dangling pointers are not allowed!
> Basically you can usually rescue a lot from the changes log assuming it
> wasn't also mangled somewhere along the line.
> tim
The stuff I want is all data.  Even if I lost the most recent stuff,
it would still be nice to recover the rest.

I'm imagining going through the image fragment and identifying all
pointers to destroyed space and replacing them with .... maybe nil,
though I'd need some way of identifying where the damaged pointers
were to verify what happened.

So far I've restrained myself because this seems like a potentially
big and slightly silly project.  But is it impossible?

(Ideally, I'd replace each bad reference with a stub object that
included the pointer, so I could tell which stubs were pointing to the
same place.  The problem is that I have no stub class in the image.)

More information about the Squeak-dev mailing list