TrueZIP
  1. TrueZIP
  2. TRUEZIP-172

OutOfMemoryError because of missing call of end() in Deflater

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: TrueZIP 7.3.1, TrueZIP 7.3.2, TrueZIP 7.3.3
    • Fix Version/s: TrueZIP 7.3.4
    • Component/s: TrueZIP Driver ZIP
    • Labels:
      None
    • Environment:

      windows xp java 1.6.25

      Description

      Following exception is thrown
      java.lang.OutOfMemoryError
      at java.util.zip.Inflater.init(Native Method)
      at java.util.zip.Inflater.<init>(Inflater.java:83)
      at de.schlichtherle.truezip.zip.Jdk6Inflater.<init>(Jdk6Inflater.java:25)
      at
      de.schlichtherle.truezip.zip.ZipInflaterInputStream$Jdk6InflaterFactory.newInflater(ZipInflaterInputStream.java:59)

      after performing million times the following code for different files and members

      TFile lFile = new TFile(filename);
      TFFile lMember = new TFile(lFile,membername);
      TFileInputStream lInputStream = new TFileInputStream(lMember);
      try {
      ...
      } finally {
      lInputStream.close();
      }
      Tfile.umount(lFile);

      It seems a native memory leak because of missing end() call on deflater when closing Inputstream

        Activity

        Hide
        Christian Schlichtherle added a comment -

        Please try the attached hotfixes. If they work, they will form the next minor version update of TrueZIP.

        Show
        Christian Schlichtherle added a comment - Please try the attached hotfixes. If they work, they will form the next minor version update of TrueZIP.
        Hide
        Christian Schlichtherle added a comment -

        Changeset: 0fa27a59d232
        Author: Christian Schlichtherle <christian AT schlichtherle DOT de>
        Date: 2011-10-13 23:37
        Message: Updated parent POM.
        Issue #TRUEZIP-172 - OutOfMemoryError because of missing call of end() in Deflater

        Show
        Christian Schlichtherle added a comment - Changeset: 0fa27a59d232 Author: Christian Schlichtherle <christian AT schlichtherle DOT de> Date: 2011-10-13 23:37 Message: Updated parent POM. Issue # TRUEZIP-172 - OutOfMemoryError because of missing call of end() in Deflater
        Hide
        ebialli added a comment -

        I tried the snapshot and cant reproduce the error. It seems to work. I hope on writing zips there will not be a similar problem.

        Show
        ebialli added a comment - I tried the snapshot and cant reproduce the error. It seems to work. I hope on writing zips there will not be a similar problem.

          People

          • Assignee:
            Christian Schlichtherle
            Reporter:
            ebialli
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: