Page 5 of 5

Re: java heap size error

PostPosted: 13 Feb 2010, 18:14
by DennisBergkamp
Chris H. wrote:
Rob Cashwalker wrote:The variable-width picture panel then makes LQ pics suck because they get scaled up.
`
I also noticed that a LQ pic that is scaled up past 1x becomes unreadable. I wonder if the resize code could be limited to max of 1x?
Adding this to getScalingInfo() in ScaledImagePanel.java :

Code: Select all
if (targetWidth > 201 && srcWidth <= 201)
             targetWidth = 201;
          if (targetHeight > 285 && srcHeight <= 286)
             targetHeight = 285;
seems to do the trick. LQ Images shouldn't resize above 201x285.

Committed to SVN, maybe someone could test this with LQ images.

Re: java heap size error

PostPosted: 13 Feb 2010, 19:48
by Chris H.
DennisBergkamp wrote:seems to do the trick. LQ Images shouldn't resize above 201x285.

Committed to SVN, maybe someone could test this with LQ images.
`
I just tried out a game with LQ pics and it looks nice this way. :D I can still shrink the image by reducing the width of the panel.

Re: java heap size error

PostPosted: 13 Feb 2010, 20:05
by DennisBergkamp
Cool! Yeah it worked nicely for my Manapool (still using a LQ image for that one).

Re: java heap size error

PostPosted: 13 Feb 2010, 22:06
by Almost_Clever
silly freak wrote:those of you experiencing the memory problems, please use this option when running forge:
Code: Select all
-XX:+HeapDumpOnOutOfMemoryError
this will create a file containing java's memory usage when an OutOfMemoryError occurs. If you upload it, we can better analyse where the leak lies
Okay, here's a java heap error file... Whoops, first a 70 MB file takes forever to try to upload only to get the error message "The extension hprof is not allowed." If somebody is interested, I can try to get the file to them some other way.

Re: java heap size error

PostPosted: 13 Feb 2010, 22:20
by silly freak
just rename it to txt, it won't check the contents

Re: java heap size error

PostPosted: 13 Feb 2010, 23:33
by Huggybaby
You can't upload a 70MB file to slightlymagic AFAIK. Put it up at MediaFire etc.

Re: java heap size error

PostPosted: 14 Feb 2010, 07:54
by LutherBlissett
I'll just put this here:
https://fileshare.qut.edu.au/public/bar ... 1301.hprof
not sure how long it will last up there.

Re: java heap size error

PostPosted: 14 Feb 2010, 10:12
by silly freak
thanks, i'll see what i can do!

Re: java heap size error

PostPosted: 14 Feb 2010, 10:57
by Almost_Clever
Huggybaby wrote:You can't upload a 70MB file to slightlymagic AFAIK. Put it up at MediaFire etc.
Okay, I've got three of them now.
http://www.mediafire.com/file/mjndwntnn ... 4172.hprof
http://www.mediafire.com/file/wjzm2z0mw ... 4828.hprof
http://www.mediafire.com/file/wnzjjjnno ... 5580.hprof

Re: java heap size error

PostPosted: 14 Feb 2010, 18:05
by Huggybaby
Thanks, we have four now, and keep them coming. With enough data we can find a pattern.
Has anyone run jhat on these reports yet?

Re: java heap size error

PostPosted: 14 Feb 2010, 19:59
by DennisBergkamp
I think Silly Freak managed to uncover at least one memory leak. They have to do with the images, but the weird thing is, they're related to the small images.

Re: java heap size error

PostPosted: 14 Feb 2010, 22:18
by silly freak
it's actually both. if you look at http://localhost:7000/histo (with jhat running of course) you see what objects take the most space. it's the int-arrays, which are used to store the image data internally. when I browsed the instances, i first found the 27448-byte ones, which belong to small images. however, there are also 1305608-byte ones from the big images. i just overlooked them at first