Well, I thought all the problems had been solved, but with a certain 80
MB image, loading under WebStart as a PNG file, it fails every time with
an Zip Exception on EOF condition, always at the same point, 55% of the
image loaded.

This happens on an Apache server, but not on a sunserver7 web server.
There may be other environmental differences as well, but that's the
main one.

If anyone has any other thoughts on what else I might try or investigate
I would greatly appreciate it.

Cheers, Eric

Eric Kolotyluk wrote:

I have just determined, after weeks of frustrating problems, that
ImageIO.setUseCache(false) is the likely source of serious bugs when
loading images.

Symptoms: PNG images get row error exceptions and sometimes zip
exceptions, JPG images get distorted. These problems get worse
depending on network environment (i.e., applets) and/or whether
WebStart is being used.

As soon as I commented out ImageIO.setUseCache(false); in my code, all
the problems went away.

I can only assume there is some sort of memory mismanagement problem
going on - perhaps the GC is freaking out causing thread sync problems
because it can't allocate memory fast enough, I don't know. I
typically use -Xms100m, but even when the image and second buffer are
smaller than that the problems happen.

Note, there is already a bug report (4821108) open on this issue and
the people responsible have been notified.

One lesson learned, it is safer to load PNG than JPG because you get
an exception thrown when something goes wrong, with JPG, no such luck.
I wonder if JP2 image decoders catch problems and throw exceptions?

Cheers, Eric


=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to