This is the mail archive of the java-prs@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcj/27271] New: i/o error (java.util.zip.ZipException: Deflated stream ends early.)


The following code fails to run with the gij-4.1 runtime (4.1 branch 20060421),
works ok with the blackdown runtime (example distilled from FC's azureus-themed
patch by Stephan Michels).

$ cat TestLoadImage.java
import java.io.InputStream;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
public class TestLoadImage {
    public static void main(String[] args) {
        final Display display = new Display();

        InputStream is = TestLoadImage.class.getResourceAsStream("new.gif");
        System.out.println("is="+is);

        Image im = new Image(display, is);
        System.out.println("im="+im);
    }
}


$ gij -Djava.library.path=/usr/lib/jni -cp
/usr/lib/java/swt3.1-gtk.jar:test.jar TestLoadImage
is=java.util.jar.JarFile$EntryInputStream@2d93c04d
Exception in thread "main" org.eclipse.swt.SWTException: i/o error
(java.util.zip.ZipException: Deflated stream ends early.)
   at org.eclipse.swt.SWT.error(SWT.java:2942)
   at org.eclipse.swt.SWT.error(SWT.java:2866)
   at
org.eclipse.swt.internal.image.GIFFileFormat.readID(GIFFileFormat.java:138)
   at
org.eclipse.swt.internal.image.GIFFileFormat.getExtensions(GIFFileFormat.java:150)
   at
org.eclipse.swt.internal.image.GIFFileFormat.loadFromByteStream(GIFFileFormat.java:124)
   at
org.eclipse.swt.internal.image.FileFormat.loadFromStream(FileFormat.java:47)
   at org.eclipse.swt.internal.image.FileFormat.load(FileFormat.java:75)
   at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:126)
   at org.eclipse.swt.graphics.ImageDataLoader.load(ImageDataLoader.java:18)
   at org.eclipse.swt.graphics.ImageData.<init>(ImageData.java:327)
   at org.eclipse.swt.graphics.Image.<init>(Image.java:490)
   at TestLoadImage.main(TestLoadImage.java:11)
Caused by: java.util.zip.ZipException: Deflated stream ends early.
   at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:156)
   at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:195)
   at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:169)
   at java.io.FilterInputStream.read(FilterInputStream.java:155)
   at java.util.jar.JarFile$EntryInputStream.read(JarFile.java:974)
   at
org.eclipse.swt.internal.image.LEDataInputStream.read(LEDataInputStream.java:76)
   at
org.eclipse.swt.internal.image.GIFFileFormat.readID(GIFFileFormat.java:134)
   ...9 more


-- 
           Summary: i/o error (java.util.zip.ZipException: Deflated stream
                    ends early.)
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: doko at ubuntu dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27271


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]