Next beta, 2011 third release
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
33 posts
• Page 2 of 3 • 1, 2, 3
Re: Next beta, 2011 third release
by Jaedayr » 10 Feb 2011, 19:55
I have 1G of RAM so when I set the heap size to 1G it must be using the swapfile. I am not really in favor of requiring 2G of RAM to run Forge.Fnoed wrote:The new quest UI does use more heap space, mainly because all images for the quest frame are kept in memory while that panel is active, whereas in the old UI the image resources were GC'd on dialog close.
What are our target system specs? Is it reasonable to expect that Forge will run on systems with 2G+ RAM, so that heap size can be set to 1G?
Re: Next beta, 2011 third release
by Fnoed » 10 Feb 2011, 20:02
When you do an SVN update, so you update the "res" folder? The first stack trace shows that you seem to be missing xpp_min-1.1.4c.jar in res/lib. The second one shows that you seem to be missing Life.png in res/pics/icons. If you do have both files, then something weird is going on.Chris H. wrote:I found an old questData file with over 300+ wins. I can play this in quest mode using the old Quest UI. Feels snappy with the heap space increased.
When I attempt to Continue Quest with Use new Quest UI I get this error exception:
- error 1 | Open
- 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
Error loading Quest Data
Version:
Forge -- official beta: $Date: 2011-01-06 11:34:48 -0500 (Thu, 06 Jan 2011) $, SVN revision: $Revision: 4891 $
OS: Mac OS X Version: 10.6.6 Architecture: x86_64
Java Version: 1.6.0_22 Vendor: Apple Inc.
Detailed error trace:
java.lang.IllegalArgumentException: XPP3 pull parser library not present. Specify another driver. For example: new XStream(new DomDriver())
at com.thoughtworks.xstream.io.xml.XppDriver.loadLibrary(XppDriver.java:62)
at com.thoughtworks.xstream.io.xml.XppDriver.createReader(XppDriver.java:43)
at com.thoughtworks.xstream.io.xml.XppDriver.createReader(XppDriver.java:49)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:861)
at forge.quest.data.QuestData.loadData(QuestData.java:225)
at forge.Gui_QuestOptions.continueQuestButton_actionPerformed(Gui_QuestOptions.java:198)
at forge.Gui_QuestOptions$2.actionPerformed(Gui_QuestOptions.java:112)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6352)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6117)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4714)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
at java.awt.Container.dispatchEventImpl(Container.java:2129)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
When I attempt to start a new quest with Use new Quest UI I get this error exception:
- error 2 | Open
- 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
null
Version:
Forge -- official beta: $Date: 2011-01-06 11:34:48 -0500 (Thu, 06 Jan 2011) $, SVN revision: $Revision: 4891 $
OS: Mac OS X Version: 10.6.6 Architecture: x86_64
Java Version: 1.6.0_22 Vendor: Apple Inc.
Detailed error trace:
java.lang.NullPointerException
at forge.gui.GuiUtils.getResizedIcon(GuiUtils.java:90)
at forge.quest.gui.main.QuestMainPanel.createSidePanel(QuestMainPanel.java:195)
at forge.quest.gui.main.QuestMainPanel.initUI(QuestMainPanel.java:73)
at forge.quest.gui.main.QuestMainPanel.<init>(QuestMainPanel.java:60)
at forge.quest.gui.QuestFrame.<init>(QuestFrame.java:37)
at forge.Gui_QuestOptions.newQuestButton_actionPerformed(Gui_QuestOptions.java:253)
at forge.Gui_QuestOptions$3.actionPerformed(Gui_QuestOptions.java:141)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6352)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6117)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4714)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
at java.awt.Container.dispatchEventImpl(Container.java:2129)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Re: Next beta, 2011 third release
by Chris H. » 10 Feb 2011, 21:28
Thank you Fnoed and Sol. I figured out how to use chmod from the terminal. My command file when double clicked will now launch the terminal app and terminal will launch forge.
My two line script still needs some work. I would like to place the command file in the same directory as the forge JAR file. The script should set the "CD" to the path of the command file. Then launch forge with the heap increased in size.
This statement
appears not to be increasing the heap space. I think that it is close to what is needed but is not there yet. The script is running the run-forge.jar file but the argument is ignored for some reason?
My two line script still needs some work. I would like to place the command file in the same directory as the forge JAR file. The script should set the "CD" to the path of the command file. Then launch forge with the heap increased in size.
This statement
- Code: Select all
java -jar run-forge.jar -Xmx1024m Gui_NewGame
appears not to be increasing the heap space. I think that it is close to what is needed but is not there yet. The script is running the run-forge.jar file but the argument is ignored for some reason?
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Next beta, 2011 third release
by Fnoed » 10 Feb 2011, 21:40
Try:Chris H. wrote:My two line script still needs some work. I would like to place the command file in the same directory as the forge JAR file. The script should set the "CD" to the path of the command file.
- Code: Select all
#!/bin/sh
cd `dirname $0`
This is to be expected, the JAR contains the information on what class to invoke on startup. If you want to invoke a particular class, you have to not use "-jar" but add the JAR to the classpath and call the class with it's full name:Chris H. wrote:This statement`
- Code: Select all
java -jar run-forge.jar -Xmx1024m Gui_NewGame
appears not to be increasing the heap space. I think that it is close to what is needed but is not there yet. The script is running the run-forge.jar file but the argument is ignored for some reason?
- Code: Select all
java -cp<jarname>:<thirdparty jar folder>/*:<whatever> forge.Gui_NewGame
Re: Next beta, 2011 third release
by Chris H. » 10 Feb 2011, 23:41
`Fnoed wrote:When you do an SVN update, so you update the "res" folder? The first stack trace shows that you seem to be missing xpp_min-1.1.4c.jar in res/lib. The second one shows that you seem to be missing Life.png in res/pics/icons. If you do have both files, then something weird is going on.
I sync from the Synchronize view as the Synchronize SVN (Workspace) button should sync the entire project to the head version.
I figured out my two problems. The missing xxp_min-1.1.4c.jar needed to be added to the build path. In the past a missing jar in the build path would create an error in Eclipse when I build the project.
And the new icon. I and some other people tend to move over our /pics/ folder from the old version to the next version. This overwrites the new icon.

I can now check out your improvements to quest mode. I like what I see.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Next beta, 2011 third release
by Chris H. » 11 Feb 2011, 00:42
`Fnoed wrote:Try:This is to be expected, the JAR contains the information on what class to invoke on startup. If you want to invoke a particular class, you have to not use "-jar" but add the JAR to the classpath and call the class with it's full name:
- Code: Select all
#!/bin/sh
cd `dirname $0`
- Code: Select all
java -cp<jarname>:<thirdparty jar folder>/*:<whatever> forge.Gui_NewGame
I think that I may be getting closer to having a working command. My command now looks like this:
- Code: Select all
#!/bin/sh
cd `dirname $0`
java -jar run-forge.jar -Xmx1024m
There are two issues. If the path returned by dirname contains spaces, no go. So the command is now named "MacRunForge.command". Having spaces is a problem. Not sure what else can be done about that.
For some reason, the forge jar is run without the heap space increase. In my test I find that I get a java heap space error fairly soon. Notice that I deleted the class name after the command for the heap space.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Next beta, 2011 third release
by Fnoed » 11 Feb 2011, 00:56
useChris H. wrote:There are two issues. If the path returned by dirname contains spaces, no go. So the command is now named "MacRunForge.command". Having spaces is a problem. Not sure what else can be done about that.
- Code: Select all
cd `dirname "$0"`
The -Xmx parameter must be before the -jar parameter. Quoth the Oracle:Chris H. wrote:For some reason, the forge jar is run without the heap space increase. In my test I find that I get a java heap space error fairly soon. Notice that I deleted the class name after the command for the heap space.
So the -Xmx parameter is passed to Forge, instead of the JVM.Non-option arguments after the class name or JAR file name are passed to the main function.
Re: Next beta, 2011 third release
by Chris H. » 11 Feb 2011, 02:47
`
Is there a similar way to handle the path located in dirname? I would like to be able to handle spaces in the path to the command and in the command's file name. And thank you for all of your help.

-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Next beta, 2011 third release
by Fnoed » 11 Feb 2011, 02:57
Try
- Code: Select all
cd "`dirname \"$0\"`"
Re: Next beta, 2011 third release
by Chris H. » 11 Feb 2011, 03:33
Ah, thank you indeed. It works great!
I now feel confidant in releasing a new beta this weekend.
I now feel confidant in releasing a new beta this weekend.

-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Next beta, 2011 third release
by Fnoed » 11 Feb 2011, 03:45
If you do, package that script and a .bat file for windows users. Of course, it would be better if we could update the windows launcher.
Re: Next beta, 2011 third release
by Chris H. » 11 Feb 2011, 13:03
`Fnoed wrote:If you do, package that script and a .bat file for windows users. Of course, it would be better if we could update the windows launcher.
Yes, I agree. It would be a good idea to include a script for Windows, Mac OS X and for the various *nixes.
It would help if someone could throw together a .bat file for windows users.
What about the various *nixes? Would it be enough to rename a copy of my Mac version (command file) "Unix Run Forge.sh"?
I will include my Mac command file for anyone who may be interested at this time.
`
- Attachments
-
Mac Run Forge.command.zip
- (653 Bytes) Downloaded 244 times
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Next beta, 2011 third release
by timmermac » 11 Feb 2011, 16:35
Anybody who uses Windows, try this:
add a shortcut to the "runForge.jar" or "Forge.jar" file to your desktop. in the properties for the shortcut, make it look like the attached screenshot. I don't know how well it works, but my bing searches say it should. The memory amounts can be played with as well. I just use that because of my system configuration.
add a shortcut to the "runForge.jar" or "Forge.jar" file to your desktop. in the properties for the shortcut, make it look like the attached screenshot. I don't know how well it works, but my bing searches say it should. The memory amounts can be played with as well. I just use that because of my system configuration.
"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
Re: Next beta, 2011 third release
by Fnoed » 11 Feb 2011, 17:11
Renaming should work.Chris H. wrote:What about the various *nixes? Would it be enough to rename a copy of my Mac version (command file) "Unix Run Forge.sh"?
I will include my Mac command file for anyone who may be interested at this time.
I'm pretty sure that this passes the parameters to Forge, not the JVM. AFAIK the only way to do this is to either include a batch file or use a launcher. This looks like a good candidate.timmermac wrote:Anybody who uses Windows, try this:
add a shortcut to the "runForge.jar" or "Forge.jar" file to your desktop. in the properties for the shortcut, make it look like the attached screenshot. I don't know how well it works, but my bing searches say it should. The memory amounts can be played with as well. I just use that because of my system configuration.
Re: Next beta, 2011 third release
by Chris H. » 12 Feb 2011, 02:51
Just for the heck of it I tried launching the forge jar today without using the new command to increase the heap space and got an error exception on start up.
I loaded the background image in my graphics editor and reduced the height and width. I also saved the image with the quality slider slid down to the point where the jpg image is no longer 665KB and is now just 62KB.
The picture still looks good and Forge can now be launched via the jar, but we will still need the launcher scripts for all three OS's. I plan to merge this reduced jpg into the SVN.
It looks like we still need a windows bat file or to use the launcher that Fnoed found. Do we have anyone who would like to put together a windows launcher before we release the next beta?
`
I loaded the background image in my graphics editor and reduced the height and width. I also saved the image with the quality slider slid down to the point where the jpg image is no longer 665KB and is now just 62KB.
The picture still looks good and Forge can now be launched via the jar, but we will still need the launcher scripts for all three OS's. I plan to merge this reduced jpg into the SVN.
It looks like we still need a windows bat file or to use the launcher that Fnoed found. Do we have anyone who would like to put together a windows launcher before we release the next beta?
`
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
33 posts
• Page 2 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 19 guests