Skip to main content

Bug Report: changes in java.util.zip.ZipFile break PP demo application

3 replies [Last post]
davyp
Offline
Joined: 2007-01-03

Hi,

I reported this issue to Hinkmond in private about a month ago. He told me I could also post
these types of topics to the forum. As the bug is not resolved yet, I will report it here again:

In revision 7960 several changes were made to the java.util.zip.* package. These changes
break the Personal Profile application personal.DemoFrame in democlasses.jar. When
launching the application I get several exceptions:

sun.awt.image.ImageFormatException: not a GIF file.
at sun.awt.image.GifImageDecoder.error(Unknown Source)
...
sun.awt.image.ImageFormatException: Not a JPEG file: starts with 0x49 0x46
at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
...
java.awt.AWTError: Cannot create pixmap! Image size not known
at sun.awt.qt.QtImageRepresentation.finish(Native Method)
...

and so on.

If I revert the changes made to the following files, the problem disappears:
cdc/src/share/classes/java/util/zip/InflaterInputStream.java
cdc/src/share/classes/java/util/zip/ZipFile.java

I encountered this issue while testing my builds for Windows Mobile, but I can confirm that
this issue also occurs on linux builds.

Davy

PS: I do not know who is responsible for managing this forum, but I got I nice servlet
exception and null pointer exception while posting this message. If somebody is interested, I
can forward the stacktrace.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Hinkmond Wong

Hi Davy,

phonemeadvanced@mobileandembedded.org wrote:
> Hi,
>
> I reported this issue to Hinkmond in private about a month ago. He told me I could also post
> these types topics to the forum. As the bug is not resolved yet, I will report it here again:
>
> In revision 7960 several changes were made to the java.util.zip.* package. These changes
> break the Personal Profile application personal.DemoFrame in democlasses.jar. When
> launching the application I get several exceptions:
>
> sun.awt.image.ImageFormatException: not a GIF file.
> at sun.awt.image.GifImageDecoder.error(Unknown Source)
> ...
> sun.awt.image.ImageFormatException: Not a JPEG file: starts with 0x49 0x46
> at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
> ...
> java.awt.AWTError: Cannot create pixmap! Image size not known
> at sun.awt.qt.QtImageRepresentation.finish(Native Method)
> ...
>
> and so on.
>
> If I revert the changes made to the following files, the problem disappears:
> cdc/src/share/classes/java/util/zip/InflaterInputStream.java
> cdc/src/share/classes/java/util/zip/ZipFile.java
>
> I encountered this issue while testing my builds for Windows Mobile, but I can confirm that
> this issue also occurs on linux builds.

I apologize for falling behind on some of my phoneME Advanced action
items. One of the pending tasks I have is to update the bugs list.

I just submitted a new bug on your behalf to report this bug.

See Issue #32:

https://phoneme.dev.java.net/issues/show_bug.cgi?id=32

Do you know which line in DemoFrame is failing? If you use a
CVM_DEBUG=true build, you should get line numbers in the stack trace.

Is it trying to read one of the image files from the JAR file to display
at the point of crashing in DemoFrame?

> Davy
>
> PS: I do not know who is responsible for managing this forum, but I got I nice servlet
> exception and null pointer exception while posting this message. If somebody is interested, I
> can forward the stacktrace.

We can let Roger Brinkley (leader@mobileandembedded.org) know. But,
please keep it as a separate thread since it is not related to the
ZipFile bug. Roger may have to forward this separate forum posting
problem you are seeing to the people at CollabNet to fix.

Thanks,

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

davyp
Offline
Joined: 2007-01-03

> Do you know which line in DemoFrame is failing? If you use a CVM_DEBUG=true build,
> you should get line numbers in the stack trace.
>
> Is it trying to read one of the image files from the JAR file to display
> at the point of crashing in DemoFrame?

I tried this before when trying to find an error in the application itself. This is the error log:

sun.awt.image.ImageFormatException: not a GIF file.
at sun.awt.image.GifImageDecoder.error(Ljava/lang/String;)V(GifImageDecoder.java:83)
at sun.awt.image.GifImageDecoder.readHeader()V(GifImageDecoder.java:292)
at sun.awt.image.GifImageDecoder.produceImage()V(GifImageDecoder.java:119)
at sun.awt.image.InputStreamImageSource.doFetch()V(InputStreamImageSource.java:266)
at sun.awt.image.ImageFetcher.fetchloop()V(ImageFetcher.java:199)
at sun.awt.image.ImageFetcher.run()V(ImageFetcher.java:155)
at java.lang.Thread.startup(Z)V(Thread.java:776)

sun.awt.image.ImageFormatException: Not a JPEG file: starts with 0x49 0x46
at sun.awt.image.JPEGImageDecoder.readImage(Ljava/io/InputStream;[B)V(Native Method)
at sun.awt.image.JPEGImageDecoder.produceImage()V(JPEGImageDecoder.java:119)
at sun.awt.image.InputStreamImageSource.doFetch()V(InputStreamImageSource.java:266)
at sun.awt.image.ImageFetcher.fetchloop()V(ImageFetcher.java:199)
at sun.awt.image.ImageFetcher.run()V(ImageFetcher.java:155)
at java.lang.Thread.startup(Z)V(Thread.java:776)

sun.awt.image.ImageFormatException: not a GIF file.
at sun.awt.image.GifImageDecoder.error(Ljava/lang/String;)V(GifImageDecoder.java:83)
at sun.awt.image.GifImageDecoder.readHeader()V(GifImageDecoder.java:292)
at sun.awt.image.GifImageDecoder.produceImage()V(GifImageDecoder.java:119)
at sun.awt.image.InputStreamImageSource.doFetch()V(InputStreamImageSource.java:266)
at sun.awt.image.ImageFetcher.fetchloop()V(ImageFetcher.java:199)
at sun.awt.image.ImageFetcher.run()V(ImageFetcher.java:155)
at java.lang.Thread.startup(Z)V(Thread.java:776)

java.awt.AWTError: Cannot create pixmap! Image size not known
at sun.awt.qt.QtImageRepresentation.finish(Z)Z(Native Method)
at sun.awt.image.ImageRepresentation.imageComplete(I)V(ImageRepresentation.java:230)
at sun.awt.image.ImageDecoder.imageComplete(IZ)I(ImageDecoder.java:155)
at sun.awt.image.PNGImageDecoder.produceImage()V(PNGImageDecoder.java:571)
at sun.awt.image.InputStreamImageSource.doFetch()V(InputStreamImageSource.java:266)
at sun.awt.image.ImageFetcher.fetchloop()V(ImageFetcher.java:199)
at sun.awt.image.ImageFetcher.run()V(ImageFetcher.java:155)
at java.lang.Thread.startup(Z)V(Thread.java:776)

java.lang.IllegalArgumentException: width and height must be > 0
at sun.awt.image.Image.(Ljava/awt/Component;II)V(Image.java:55)
at sun.awt.qt.QtImage.(Ljava/awt/Component;II)V(QtImage.java:52)
at sun.awt.qt.QtGraphicsConfiguration.createCompatibleImage(II)Ljava/awt/image/BufferedImage;(QtGraphicsConfiguration.java:53)
at basis.demos.ImageDemo.()V(ImageDemo.java:55)
at basis.demos.GraphicsDemo.()V(GraphicsDemo.java:39)
at basis.Builder.build(Ljava/awt/Container;)V(Builder.java:70)
at basis.DemoFrame.(Ljava/util/ArrayList;Ljava/awt/Dimension;)V(DemoFrame.java:108)
at personal.DemoFrame.(Ljava/util/ArrayList;Ljava/awt/Dimension;)V(DemoFrame.java:49)
at personal.DemoFrame.main([Ljava/lang/String;)V(DemoFrame.java:44)
at sun.misc.CVM.runMain()V(CVM.java:514)

These exceptions are thrown by the loadImage method in the constructor of ImageDemo where
the various images are loaded. This static method will try to obtain the resource from either
the current dir (in the jar) or in the classpath. As this code has not changed I tracked back
which revision was causing the problem, and it turned out to be the changes to the java.util.zip
files.

Davy

Hinkmond Wong

>> Do you know which line in DemoFrame is failing? If you use a CVM_DEBUG=true build,
>> you should get line numbers in the stack trace.
>>
>> Is it trying to read one of the image files from the JAR file to display
>> at the point of crashing in DemoFrame?
>>
>
> I tried this before when trying to find an error in the application itself. This is the error log:
>
> ...
> java.lang.IllegalArgumentException: width and height must be > 0
> at sun.awt.image.Image.(Ljava/awt/Component;II)V(Image.java:55)
> at sun.awt.qt.QtImage.(Ljava/awt/Component;II)V(QtImage.java:52)
> at sun.awt.qt.QtGraphicsConfiguration.createCompatibleImage(II)Ljava/awt/image/BufferedImage;(QtGraphicsConfiguration.java:53)
> at basis.demos.ImageDemo.()V(ImageDemo.java:55)
> at basis.demos.GraphicsDemo.()V(GraphicsDemo.java:39)
> at basis.Builder.build(Ljava/awt/Container;)V(Builder.java:70)
> at basis.DemoFrame.(Ljava/util/ArrayList;Ljava/awt/Dimension;)V(DemoFrame.java:108)
> at personal.DemoFrame.(Ljava/util/ArrayList;Ljava/awt/Dimension;)V(DemoFrame.java:49)
> at personal.DemoFrame.main([Ljava/lang/String;)V(DemoFrame.java:44)
> at sun.misc.CVM.runMain()V(CVM.java:514)
>
> These exceptions are thrown by the loadImage method in the constructor of ImageDemo where
> the various images are loaded. This static method will try to obtain the resource from either
> the current dir (in the jar) or in the classpath. As this code has not changed I tracked back
> which revision was causing the problem, and it turned out to be the changes to the java.util.zip
> files.
>
> Davy
>

Thanks, Davy. I added this info into the Issue #32 bug report. Thanks
for also narrowing down the source of the error.

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net