Page 1 of 5

java heap size error

PostPosted: 19 Jan 2010, 06:31
by sandwich
After reading the info available on this problem on these forums and elsewhere, I set my heap size to 2 gigabytes before playing.

I can't play even one full match before encountering a heap size error.

Do I need to set the cache even higher? I only have 4 GB total memory, and W7 uses a significant fraction of that already. Also, would that solve the problem or just prolong it?

Would it be better to get rid of the HQ pics and download low quality ones? (Assuming that this is what's causing the problem.) I'd rather find an actual solution, but I'll do that if there's no other way to play; this is an excellent program.

Apologies in advance if this has been brought up elsewhere.

Re: java heap size error

PostPosted: 19 Jan 2010, 11:24
by Chris H.
You should use the recent 01-17 release found at:

Forge0117.rar

This should prevent the error exception while playing the game.

The Deck Editors can still cause an error exception if you hover your mouse pointer over the card jpg picture panel for more than several dozen different cards.

Re: java heap size error

PostPosted: 19 Jan 2010, 16:17
by DennisBergkamp
If you're still getting the error when using the 01-17 version, (by the way, you should never need 2 gigs) it probably means the max mem size hasn't been set correctly for some reason.
Not sure, but you might also have to set the max memory in your control panel ( check http://www.duckware.com/pmvr/howtoincre ... emory.html ).
I'm running Forge all the time using 512 megs as the max, and I haven't run out of heap space yet...

So, I'm wondering, if you check the task manager, how much memory is forge using ? The process name should be javaw.exe.
If all of that stuff doesn't work, then yes, I would just revert back to LQ images.

Re: java heap size error

PostPosted: 19 Jan 2010, 17:31
by sandwich
Thanks for the replies. As it happens I've actually set it to 1 gig as for whatever reason setting it higher isn't supported (resets it to 60 megs). Funny that you mention that site, it's the same one I went to to figure out how to change it in the first place.

Clarification: the crashes were occuring before I had correctly set the memory. Once I set it to 1 gig, instead of crashing, the app just runs slower and slower the longer a game goes on.

My current game has been going for a few dozen turns, and each action is taking at least 6 seconds to resolve. Task manager reports 105,000 K usage. I'm assuming when I start the game for the first time it probably isn't that high (haven't checked before now).

This is probably my fault, as I mostly run thallid spam decks.

Also I'm running 01-01, I'll install the update and see if it helps the slowdown. Thanks dudes.

Update: On startup, when in the menus, usage is around 65,000 K. On starting an actual match this jumps to 78,000 K. I'll keep an eye on it as I play, also I'll experiment with mouse-over images (still HQ) and see if the mem skyrockets under any specific conditions.

Another update: Got the downloader to work, using LQ pics now.

Re: java heap size error

PostPosted: 19 Jan 2010, 18:32
by Chris H.
sandwich wrote:I'll see if I can find the thread / link for the LQ images, the auto-downloader doesn't work for me.
`
Move the HQ jpg images out of the pics and tokens folders and place them somewhere else. Then try downloading the LQ pics. LQ and HQ pics are downloaded into the same folder. As such, you have a choice of which ones you want to download and use.

I actually keep two copies of the game on my desktop. One with LQ pics and the other with the HQ pics.

Re: java heap size error

PostPosted: 19 Jan 2010, 18:44
by sandwich
Chris H. wrote:Move the HQ jpg images out of the pics and tokens folders and place them somewhere else. Then try downloading the LQ pics. LQ and HQ pics are downloaded into the same folder. As such, you have a choice of which ones you want to download and use.

I actually keep two copies of the game on my desktop. One with LQ pics and the other with the HQ pics.
Looks like I figured this out just as you posted. Thanks though!

Re: java heap size error

PostPosted: 19 Jan 2010, 19:04
by sandwich
An error has occured. You can copy/paste this message or save it to a file.
Please report this, plus what you tried to do, to:
viewforum.php?f=26
If you don't want to register an account, you can mail it directly to
mtgerror@yahoo.com


You must be connected to the Internet. Error downloading card:
Card name: [T]w_n_n_avatar.jpg
URL: http://www.magickartenmarkt.de/img/card ... ite_xx.jpg


Version:
Forge -- official beta: 10/01/01, SVN revision: 275

Detailed error trace:
java.io.FileNotFoundException: res\pics\tokens\w_n_n_avatar.jpg (The system cannot find the path specified)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at forge.Gui_DownloadPictures_LQ.run(Gui_DownloadPictures_LQ.java:207)
at java.lang.Thread.run(Unknown Source)

That's weird, even after installing the new version, it says I'm still using 01-01.

Edit: Never mind, I restarted Forge a third time and the download proceeded with no problems. No idea what caused that in the first place.

Re: java heap size error

PostPosted: 19 Jan 2010, 20:01
by DennisBergkamp
Ah, yeah magickartenmarkt.de is down sometimes, I think that's the problem.

It still says 01/01 because I forgot to update the property file. But you're definitely running the latest version (it says SVN 275, which is only a few days old).

Re: java heap size error

PostPosted: 22 Jan 2010, 01:17
by LutherBlissett
Ahh dammit now I have THIS problem.
I'm in OS 10.5.7 - have 4gb Ram 17" laptop.
Guess i'm going to have to wait for next build or put the LQ images back. :(
01/17 doesn't show the card images for me and the LQ card text on my ridiculous 1920 x 1080 screen is too small to read!
Tried upping the Heap size but it doesn't seem to be doing anything (possibly I don't know what i'm doing!)
Was in the middle of a huge, excellent battle - "That Which Was Taken" making an indestructable army of blockers against the CPU's 7/7 monsters

Re: java heap size error

PostPosted: 22 Jan 2010, 02:59
by Chris H.
I also have a Mac, although I'm using Mac OS X 10.6.2 Snow Leopard. :D

During the development for the 01-17 release I discovered the same problem that you are now seeing. We found the source of the problem in the source code and have now updated the SVN. A new Forge update will be released in the near future.

Re: java heap size error

PostPosted: 22 Jan 2010, 04:06
by LutherBlissett
Awesome. I can play it on the XP laptop while I wait. Haven't had heap issues there yet.
It's a lovely program BTW - just fulfilled a long held goal of making pigs fly (well Dirkwood Boars to be precise!)

Re: java heap size error

PostPosted: 22 Jan 2010, 07:14
by Mr.Chaos
LutherBlissett wrote:It's a lovely program BTW - just fulfilled a long held goal of making pigs fly (well Dirkwood Boars to be precise!)
:lol: Flying pigs! Good one. (Zodiac Pig would have been an even better choice for that though) Now all that is left to do is to make it freeze in hell.
(I'm sure Dennis, or one of the other coders, will manage that at some point in the future. :lol: )

Re: java heap size error

PostPosted: 23 Jan 2010, 10:14
by zerker2000
Make Furnace of Rath a Snow permanent when it's added? :)

Re: java heap size error

PostPosted: 23 Jan 2010, 20:12
by Mr.Chaos
zerker2000 wrote:Make Furnace of Rath a Snow permanent when it's added? :)
:lol: Works for me!

Re: java heap size error

PostPosted: 23 Jan 2010, 22:39
by zerker2000
Actually, don't we already have Rimefeather Owl for the Snow part?