GithubHelp home page GithubHelp logo

Comments (8)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 21, 2024
For what it's worth, the leak seems to be in the code that reads the file in.  
The following code does not exhibit the same problem:

                BufferedImage theImage=ImageIO.read(theFile);
                currentThumbnail=Thumbnails.of(theImage).size(200, 200).asBufferedImage();

Original comment by [email protected] on 19 May 2013 at 7:01

from thumbnailator.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 21, 2024
But of course if you do it the way I just commented (read it in yourself) you 
lose the EXIF rotation which is why I started in the first place.

Doh.

Original comment by [email protected] on 19 May 2013 at 7:14

from thumbnailator.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 21, 2024
I think I fixed it. Won't pretend to know exactly why. I knew something was not 
being disposed of properly, so I tried adding:
reader.dispose();

directly after:
iis.close();

Around line 155 of FileImageSource.java

Heap growth is now under control.

I feel like my morning was now spent productively. Hope to see this (or 
similar) patch soon :)

Original comment by [email protected] on 19 May 2013 at 7:38

from thumbnailator.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 21, 2024
[deleted comment]

from thumbnailator.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 21, 2024
Hi,

Thank you for taking the time and effort to report this issue.

There appears to be numerous cases of Thumbnailator encountering 
`OutOfMemoryError`s when using Java 7 Update 21.

I just want to get a verification of which version of Java was being used when 
you encountered this problem. (I'm going to guess it's Java 7 Update 21, also 
known as Java 1.7.0_21.) 

Thank you!

Original comment by [email protected] on 20 May 2013 at 1:56

from thumbnailator.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 21, 2024
No problem. So, I actually thought NetBeans bundled it's own JDK, but I may 
have been mistaken.  When I run the program and dump the appropriate system 
properties or just throw -version into the VM options, the answer is the same 
as from my OS X terminal window:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06-451-11M4406)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01-451, mixed mode)

Original comment by [email protected] on 20 May 2013 at 2:12

from thumbnailator.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 21, 2024
Thank you for the prompt reply.

It's interesting to note that the problem occurred on Java 6 Update 45.

However, that is the most recent version of Java 6 (and apparently the last 
update for 6), and the `OutOfMemoryError`s on Java 7 was also the most recent 
release, so it seems like something in the most recent release of Java is 
causing the memory leak to be more apparent.

Issue 42 seems to be the same issue, so I will be merging this issue into that 
one.

Once again, I really appreciate all the information and the prompt reply! :)

P.S. I'll try to credit the people who have reported and contributed to this 
issue in the "Changes", so if you'd like to be acknowledged, please leave your 
name or nickname you'd like to acknowledged by in this issue.

Original comment by [email protected] on 20 May 2013 at 2:22

  • Changed state: Duplicate

from thumbnailator.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 21, 2024
Please add Will Tran <[email protected]> to the acknowledgement list, 
thanks!

Original comment by [email protected] on 21 May 2013 at 5:51

from thumbnailator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.