archienz / universal-media-server

Automatically exported from code.google.com/p/universal-media-server
GNU General Public License v2.0
0 stars 0 forks source link

OutOfMemoryException when a client opens a folder containing images #62

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add a folder with a number of subfolders all containing pictures (about 5M 
per picture) to Universal-media-server
2. At that moment about 75 mb of memory is in use by ums.
3. Connect with a UPnP client (I used a Sony Bravia TV) and select one of the 
sub folders. 
4. A subfolder containing 30 pictures will cause ums to consume about 1.4 Gib 
of memory. (I enlarged the allowed memory by changing the "-Xmx768" option to 
"-Xmx1768M")

What is the expected output? What do you see instead?

I don't expect such memory usage.. ;-) This memory is never released. Even 
after disconnecting the client the memory usage stays the same.
Selecting a folder with about 50 pictures causes the following error messages 
on the console:
INFO  2013-05-10 23:31:34.147 [pool-14-thread-1] Exception in thread 
"pool-14-thread-1" java.lang.OutOfMemoryError: Java heap space
INFO  2013-05-10 23:31:34.151 [pool-14-thread-1]        at 
java.awt.image.DataBufferByte.<init>(Unknown Source)
INFO  2013-05-10 23:31:34.153 [pool-14-thread-1]        at 
java.awt.image.Raster.createInterleavedRaster(Unknown Source)
INFO  2013-05-10 23:31:34.168 [pool-14-thread-1]        at 
java.awt.image.BufferedImage.<init>(Unknown Source)
INFO  2013-05-10 23:31:34.172 [pool-14-thread-1]        at 
net.coobird.thumbnailator.resizers.ProgressiveBilinearResizer.resize(Unknown 
Source)
INFO  2013-05-10 23:31:34.172 [pool-14-thread-1]        at 
net.coobird.thumbnailator.resizers.Resizers.resize(Unknown Source)
INFO  2013-05-10 23:31:34.173 [pool-14-thread-1]        at 
net.coobird.thumbnailator.makers.ThumbnailMaker.makeThumbnail(Unknown Source)
INFO  2013-05-10 23:31:34.174 [pool-14-thread-1]        at 
net.coobird.thumbnailator.makers.FixedSizeThumbnailMaker.make(Unknown Source)
INFO  2013-05-10 23:31:34.176 [pool-14-thread-1]        at 
net.coobird.thumbnailator.Thumbnailator.createThumbnail(Unknown Source)
INFO  2013-05-10 23:31:34.184 [pool-14-thread-1]        at 
net.coobird.thumbnailator.Thumbnails$Builder.toFile(Unknown Source)
INFO  2013-05-10 23:31:34.192 [pool-14-thread-1]        at 
net.pms.dlna.DLNAMediaInfo.parse(DLNAMediaInfo.java:683)
INFO  2013-05-10 23:31:34.193 [pool-14-thread-1]        at 
net.pms.formats.Format.parse(Format.java:231)
INFO  2013-05-10 23:31:34.194 [pool-14-thread-1]        at 
net.pms.dlna.RealFile.resolve(RealFile.java:188)
INFO  2013-05-10 23:31:34.204 [pool-14-thread-1]        at 
net.pms.dlna.DLNAResource.run(DLNAResource.java:845)
INFO  2013-05-10 23:31:34.212 [pool-14-thread-1]        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO  2013-05-10 23:31:34.228 [pool-14-thread-1]        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO  2013-05-10 23:31:34.229 [pool-14-thread-1]        at 
java.lang.Thread.run(Unknown Source)

This complete message is given about three times. After that the following 
messages are given:

INFO  2013-05-10 23:31:40.486 [pool-14-thread-7] Exception in thread 
"pool-14-thread-7" java.lang.OutOfMemoryError: Java heap space
INFO  2013-05-10 23:31:42.556 [pool-14-thread-8] Exception in thread 
"pool-14-thread-8" java.lang.OutOfMemoryError: Java heap space
INFO  2013-05-10 23:31:43.605 [pool-14-thread-9] Exception in thread 
"pool-14-thread-9" java.lang.OutOfMemoryError: Java heap space
INFO  2013-05-10 23:31:44.335 [pool-14-thread-2] Exception in thread 
"pool-14-thread-2" java.lang.OutOfMemoryError: Java heap space
INFO  2013-05-10 23:31:46.402 [pool-14-thread-10] Exception in thread 
"pool-14-thread-10" java.lang.OutOfMemoryError: Java heap space
INFO  2013-05-10 23:31:48.685 [pool-14-thread-12] Exception in thread 
"pool-14-thread-12" java.lang.OutOfMemoryError: Java heap space
INFO  2013-05-10 23:31:49.152 [pool-14-thread-11] Exception in thread 
"pool-14-thread-11" java.lang.OutOfMemoryError: Java heap space
INFO  2013-05-10 23:31:49.710 [pool-14-thread-13] Exception in thread 
"pool-14-thread-13" java.lang.OutOfMemoryError: Java heap space
INFO  2013-05-10 23:31:50.188 [pool-14-thread-14] Exception in thread 
"pool-14-thread-14" java.lang.OutOfMemoryError: Java heap space
INFO  2013-05-10 23:31:51.138 [pool-14-thread-16] Exception in thread 
"pool-14-thread-16" java.lang.OutOfMemoryError: Java heap space
INFO  2013-05-10 23:31:53.486 [pool-14-thread-15] Exception in thread 
"pool-14-thread-15" java.lang.OutOfMemoryError: Java heap space
INFO  2013-05-10 23:31:54.131 [pool-14-thread-17] Exception in thread 
"pool-14-thread-17" java.lang.OutOfMemoryError: Java heap space

What version of the product are you using? On what operating system?

I am using the latest 2.6.4. version of ums on a Linux kubuntu 13.04 machine

Please provide any additional information below.

uname -a gives:
Linux coen-A7Sv 3.8.0-19-generic #30-Ubuntu SMP Wed May 1 16:36:13 UTC 2013 
i686 i686 i686 GNU/Linux

java -version gives:
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) Server VM (build 23.21-b01, mixed mode)

Original issue reported on code.google.com by c.blijke...@gmail.com on 10 May 2013 at 10:06

GoogleCodeExporter commented 8 years ago
If you need more information, please let me know.
Regards,
Coen Blijker
(From the Netherlands)

Original comment by c.blijke...@gmail.com on 10 May 2013 at 10:09

GoogleCodeExporter commented 8 years ago
Hi Coen, this is a bug with Java 7u21. To fix it you can go back to 7u17. We 
announced it here: 
http://www.universalmediaserver.com/forum/viewtopic.php?f=8&t=853

Original comment by subjunk on 12 May 2013 at 10:59