Page 2 of 5

Re: java heap size error

PostPosted: 26 Jan 2010, 04:01
by atar
I'm uploading the LQ pics for the MTG Forge for anyone who faces performance issues:
http://rapidshare.com/files/339292099/pics.rar
I will upload it to mediafire in the near future..
p.s.The morph image is not included

Re: java heap size error

PostPosted: 26 Jan 2010, 11:37
by Chris H.
atar wrote:I'm uploading the LQ pics for the MTG Forge for anyone who faces performance issues:
http://rapidshare.com/files/339292099/pics.rar
I will upload it to mediafire in the near future..
p.s.The morph image is not included
`
Thank you. I think that Huggybaby had mentioned that he had put together an archive with many of the HQ pics. I think that it was a three piece rar file.

If a moderator made the this topic a sticky,

Helper Files - tokens, cards pictures, set editor

Atar and Huggybaby could then place a link to these two archives in this topic. It would be a good place for people to acquire many of the pics. Even if the archives went out of date at some point, it would help people to get started.

Re: java heap size error

PostPosted: 26 Jan 2010, 13:07
by atar
Where do you propose i should place my link in order to be more helpful?I didn't understand...Please excuse my bad english...

Re: java heap size error

PostPosted: 26 Jan 2010, 14:34
by Chris H.
Where do you propose i should place my link in order to be more helpful? I didn't understand
`
You placed your link in the right place. :D Thank you.

Please excuse my bad english
`
I can understand your english. 8)

Re: java heap size error

PostPosted: 26 Jan 2010, 17:39
by Huggybaby
I stickied it and I'll ad the HQ pics links later. Thanks for the heads up Chris.

Re: java heap size error

PostPosted: 30 Jan 2010, 00:10
by LutherBlissett
sorry - probably should have put this here:
I got the "Java Heap Space" error in version 0126 after only 5 turns in my booster draft.
OS 10.5.7 Macbook Pro 4gb Ram 2.5 core2duo
:'(

Interestingly doesn't seem to happen in the easy game (not sure about medium)
Eventually I get the message below and can't continue through phases/turns.
It says 0117 in the error message though I know this is 0126 i've downloaded.

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


Index: 0, Size: 0


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

Detailed error trace:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.remove(ArrayList.java:389)
at forge.MagicStack.pop(MagicStack.java:43)
at forge.Input_StackNotEmpty.selectButtonOK(Input_StackNotEmpty.java:19)
at forge.GuiInput.selectButtonOK(GuiInput.java:32)
at forge.GuiDisplay3.okButtonActionPerformed(GuiDisplay3.java:1280)
at forge.GuiDisplay3.access$3(GuiDisplay3.java:1279)
at forge.GuiDisplay3$27.actionPerformed(GuiDisplay3.java:1012)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:5602)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
at java.awt.Component.processEvent(Component.java:5367)
at java.awt.Container.processEvent(Container.java:2010)
at java.awt.Component.dispatchEventImpl(Component.java:4068)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3936)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
at java.awt.Container.dispatchEventImpl(Container.java:2054)
at java.awt.Window.dispatchEventImpl(Window.java:1801)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Re: java heap size error

PostPosted: 10 Feb 2010, 12:20
by LutherBlissett
Chris, you suggested I use the Terminal before the post got wiped.
I'm not sure if you got my reply.
Typing Java -Xmx512m results in a printout of command line options - it doesn't recognise it.
:/

Re: java heap size error

PostPosted: 10 Feb 2010, 12:47
by Chris H.
LutherBlissett wrote:Chris, you suggested I use the Terminal before the post got wiped.
I'm not sure if you got my reply.
Typing Java -Xmx512m results in a printout of command line options - it doesn't recognise it.
:/
`
Yes, I seem to remember trying one day to enter the command in the terminal and not getting the result that we wanted.

Dennis mentioned that

However, Chris you probably run Forge through Eclipse, which has separate memory settings (which can be changed by editing eclipse.ini).
`
and this could be a solution for some people, but others would rather avoid learning eclipse and would rather launch the jar file instead.

Currently, I only get the java heap error in the deck editor and not while playing the game. I am using the HQ pics and I only use decks that do not have an extreme number of different cards.

Re: java heap size error

PostPosted: 10 Feb 2010, 13:17
by LutherBlissett
I get it if my easy game runs for longer than about 20 turns.
It also happens right at the start of any draft or sealed game so I've never been able to finish one.
I read somewhere online that you could load a jar file through the terminal and include the heap size message as an argument but I got the same result as mentioned above.
Does the message have to happen as the app is loaded?
Is there a way of adding it as a triggered option somehow?
Failing all that - which Eclipse would you recommend?
I take it that is a compiler?
I haven't touched Java for about Ten years so i'm rusty to the point of neglect but I have used Processing within that time which is somewhat similar.

Re: java heap size error

PostPosted: 10 Feb 2010, 14:48
by Chris H.
I get it if my easy game runs for longer than about 20 turns.
It also happens right at the start of any draft or sealed game so I've never been able to finish one.
`
I have not yet had a chance to play quest/draft/sealed games in the last several months. I have been playing constructed deck.

I read somewhere online that you could load a jar file through the terminal and include the heap size message as an argument but I got the same result as mentioned above.
Does the message have to happen as the app is loaded?
Is there a way of adding it as a triggered option somehow?
`
I have read similar messages and have not been able to find anything that would work and be easy enough for most people to use. :(

Failing all that - which Eclipse would you recommend?
I take it that is a compiler?
I haven't touched Java for about Ten years so i'm rusty to the point of neglect but I have used Processing within that time which is somewhat similar.
`
I use Eclipse v3.5.0 which can be found on the Sun web site. You would also need a way to access the SVN source code. This would allow you to build the source code and to run the forge game from within Eclipse. I looked through the preference settings but could not find anything memory related.

Re: java heap size error

PostPosted: 10 Feb 2010, 16:27
by silly freak
you would likely download "Eclipse for Java developers" from eclipse.org

note that eclipse requires a JDK, a JRE is not enough. SVN support is not built in, but you can google for Subclipse (a Eclipse plugin) or Tortoise SVN (a windows client with great integration into the file browser - what i have heard) and follow the install instructions

Re: java heap size error

PostPosted: 11 Feb 2010, 08:17
by LutherBlissett
Ok, well that is on my list of fun things to do when i'm not writing up my research ;)

In the mean time I ran a Photoshop batch to reduce the quality of the HQ whilst maintaining a reasonable size and haven't had a Java Heap Error yet - fingers crossed.

Re: java heap size error

PostPosted: 11 Feb 2010, 10:03
by nantuko84
Typing Java -Xmx512m results in a printout of command line options - it doesn't recognise it.
probably that's because of using .exe
try the same with jar file, just type this in command line

Code: Select all
java -jar run-forge.jar -Xmx512m Gui_NewGame

Re: java heap size error

PostPosted: 11 Feb 2010, 23:36
by LutherBlissett
Closer, but here's what I get when I use that command in Terminal:

skonMAC:~ skon$ java -jar /Applications/mtgforge0209/run-forge.jar -Xmx512m Gui_NewGame
java.io.FileNotFoundException: forge.properties (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at treeProperties.TreeProperties.<init>(TreeProperties.java:158)
at treeProperties.TreeProperties.<init>(TreeProperties.java:132)
at forge.properties.ForgeProps.<clinit>(ForgeProps.java:28)
at forge.Gui_NewGame.<clinit>(Gui_NewGame.java:88)
Exception in thread "main" java.lang.ExceptionInInitializerError
at forge.Gui_NewGame.<clinit>(Gui_NewGame.java:88)
Caused by: java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1127)
at java.util.regex.Matcher.reset(Matcher.java:284)
at java.util.regex.Matcher.<init>(Matcher.java:205)
at java.util.regex.Pattern.matcher(Pattern.java:879)
at java.util.Formatter.parse(Formatter.java:2455)
at java.util.Formatter.format(Formatter.java:2411)
at java.io.PrintWriter.format(PrintWriter.java:832)
at java.io.PrintWriter.printf(PrintWriter.java:731)
at forge.error.ErrorViewer.printError(ErrorViewer.java:128)
at forge.error.ErrorViewer.showError(ErrorViewer.java:66)
at forge.error.ErrorViewer.showError(ErrorViewer.java:47)
at forge.properties.ForgeProps.<clinit>(ForgeProps.java:31)
... 1 more

Re: java heap size error

PostPosted: 12 Feb 2010, 00:57
by Chris H.
Yes, you are getting closer. I tried and got the same response. I used the help system and found a "pwd" command which will return your working directory name. In our case it displays the user's home directory.

When we start run-forge.jar with this method, the jar file is looking for the data files in our home directory. We must first set the working directory to the correct path. You may want to try the help system and see if you can find the right command to change the working directory name path. :roll: