It is currently 15 Aug 2025, 04:28
   
Text Size

SVN Bug Reports

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: SVN Bug Reports

Postby Fnoed » 06 Feb 2011, 04:25

I've committed the hack to clean the image cache. It is triggered in quest mode when a new game is started. With this hack I see that the heap usage is stable at 150M whereas without it the usage would increase ~20M after a game. If other people can confirm that this eliminates the slowdown in quest mode, I'll put in a better fix that will also apply to the normal game mode.

I don't notice a slowdown due to the increased image loading, even using the hires images; this could change if forge is ran on a slower system, though.
Fnoed
 
Posts: 84
Joined: 20 Dec 2010, 01:03
Has thanked: 0 time
Been thanked: 3 times

Re: SVN Bug Reports

Postby lazylockie » 06 Feb 2011, 05:06

Fnoed wrote:I've committed the hack to clean the image cache. It is triggered in quest mode when a new game is started. With this hack I see that the heap usage is stable at 150M whereas without it the usage would increase ~20M after a game. If other people can confirm that this eliminates the slowdown in quest mode, I'll put in a better fix that will also apply to the normal game mode.

I don't notice a slowdown due to the increased image loading, even using the hires images; this could change if forge is ran on a slower system, though.
You did this fix for the new or old gui?
lazylockie
 
Posts: 508
Joined: 13 Jul 2010, 22:44
Has thanked: 74 times
Been thanked: 15 times

Re: SVN Bug Reports

Postby Fnoed » 06 Feb 2011, 05:11

The new one. You can apply it to the old one by adding the line
Code: Select all
ImageCache.clear();
into the method forge.Gui_Quest#playGameButton_actionPerformed
Fnoed
 
Posts: 84
Joined: 20 Dec 2010, 01:03
Has thanked: 0 time
Been thanked: 3 times

Re: SVN Bug Reports

Postby lazylockie » 06 Feb 2011, 05:13

Fnoed wrote:The new one. You can apply it to the old one by adding the line
Code: Select all
ImageCache.clear();
into the method forge.Gui_Quest#playGameButton_actionPerformed
Thanks, I'm gonna test them both and tell the results.
lazylockie
 
Posts: 508
Joined: 13 Jul 2010, 22:44
Has thanked: 74 times
Been thanked: 15 times

Re: SVN Bug Reports

Postby Fnoed » 06 Feb 2011, 05:20

Let me quickly remind you of the VisualVM tool that is bundled with all recent JDKs. This can be used to attach to a running process and see the heap usage.
Fnoed
 
Posts: 84
Joined: 20 Dec 2010, 01:03
Has thanked: 0 time
Been thanked: 3 times

Re: SVN Bug Reports

Postby lazylockie » 06 Feb 2011, 13:41

Fnoed wrote:Let me quickly remind you of the VisualVM tool that is bundled with all recent JDKs. This can be used to attach to a running process and see the heap usage.
I was at revision 6145 yesterday and this fix seemed to work fine (my heap usage didn't go higher than 200mb). Although by nature the game becomes a bit unresponsive after some matches in a row. Still, after this fix it's much better (yay for playing more than 2 matches in a row!)

However, on revision 6155 (I've made a SVN checkout/update from scratch) I got this error when clicking Quest Mode:

Code: Select all
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:
   http://www.slightlymagic.net/forum/viewforum.php?f=26
If you don't want to register an account, you can mail it directly to
   mtgerror@yahoo.com


forge/quest/data/QuestData


Version:
Forge -- official beta: $Date: 2011-01-06 14:34:48 -0200 (qui, 06 jan 2011) $, SVN revision: $Revision: 4891 $

OS: Windows 7 Version: 6.1 Architecture: x86

Java Version: 1.6.0_23 Vendor: Sun Microsystems Inc.

Detailed error trace:
java.lang.NoClassDefFoundError: forge/quest/data/QuestData
   at java.lang.Class.getDeclaredMethods0(Native Method)
   at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
   at java.lang.Class.getDeclaredMethod(Unknown Source)
   at java.awt.Component.isCoalesceEventsOverriden(Unknown Source)
   at java.awt.Component.access$500(Unknown Source)
   at java.awt.Component$3.run(Unknown Source)
   at java.awt.Component$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.awt.Component.checkCoalescing(Unknown Source)
   at java.awt.Component.<init>(Unknown Source)
   at java.awt.Container.<init>(Unknown Source)
   at java.awt.Window.<init>(Unknown Source)
   at java.awt.Frame.<init>(Unknown Source)
   at java.awt.Frame.<init>(Unknown Source)
   at javax.swing.JFrame.<init>(Unknown Source)
   at forge.Gui_QuestOptions.<init>(Unknown Source)
   at forge.Gui_NewGame$5.actionPerformed(Unknown Source)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
   at org.jvnet.substance.utils.RolloverButtonListener.mouseReleased(RolloverButtonListener.java:111)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: forge.quest.data.QuestData
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 43 more
lazylockie
 
Posts: 508
Joined: 13 Jul 2010, 22:44
Has thanked: 74 times
Been thanked: 15 times

Re: SVN Bug Reports

Postby friarsol » 06 Feb 2011, 15:13

lazylockie wrote:However, on revision 6155 (I've made a SVN checkout/update from scratch) I got this error when clicking Quest Mode:
I just got the same thing. It looks like the converted Quest file is messed up.

I stopped the running process through Eclipse when I was in the middle of the match. Not sure if the new Quest data file has an issue closing this way or the original conversion is incorrect?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: SVN Bug Reports

Postby friarsol » 06 Feb 2011, 17:00

Lazy, see if my last check in solved your issue? It looks like it's solved it for me.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: SVN Bug Reports

Postby Fnoed » 06 Feb 2011, 17:17

Ah, the new library is causing issues. I thought that Eclipse would include the entire libs folder automatically. In any case you can force a reconversion by deleting the questData.dat file from the res/quest folder. That should force a reconversion.
Fnoed
 
Posts: 84
Joined: 20 Dec 2010, 01:03
Has thanked: 0 time
Been thanked: 3 times

Re: SVN Bug Reports

Postby lazylockie » 06 Feb 2011, 18:34

friarsol wrote:Lazy, see if my last check in solved your issue? It looks like it's solved it for me.
revision 6164:

I thought it was related to some of my quest files (because I keep some of them intact), but even on a fresh install I'm getting:

Code: Select all
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:
   http://www.slightlymagic.net/forum/viewforum.php?f=26
If you don't want to register an account, you can mail it directly to
   mtgerror@yahoo.com


forge/quest/data/QuestData


Version:
Forge -- official beta: $Date: 2011-01-06 14:34:48 -0200 (qui, 06 jan 2011) $, SVN revision: $Revision: 4891 $

OS: Windows 7 Version: 6.1 Architecture: x86

Java Version: 1.6.0_23 Vendor: Sun Microsystems Inc.

Detailed error trace:
java.lang.NoClassDefFoundError: forge/quest/data/QuestData
   at java.lang.Class.getDeclaredMethods0(Native Method)
   at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
   at java.lang.Class.getDeclaredMethod(Unknown Source)
   at java.awt.Component.isCoalesceEventsOverriden(Unknown Source)
   at java.awt.Component.access$500(Unknown Source)
   at java.awt.Component$3.run(Unknown Source)
   at java.awt.Component$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.awt.Component.checkCoalescing(Unknown Source)
   at java.awt.Component.<init>(Unknown Source)
   at java.awt.Container.<init>(Unknown Source)
   at java.awt.Window.<init>(Unknown Source)
   at java.awt.Frame.<init>(Unknown Source)
   at java.awt.Frame.<init>(Unknown Source)
   at javax.swing.JFrame.<init>(Unknown Source)
   at forge.Gui_QuestOptions.<init>(Unknown Source)
   at forge.Gui_NewGame$5.actionPerformed(Unknown Source)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: forge.quest.data.QuestData
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 42 more
lazylockie
 
Posts: 508
Joined: 13 Jul 2010, 22:44
Has thanked: 74 times
Been thanked: 15 times

Re: SVN Bug Reports

Postby Fnoed » 06 Feb 2011, 18:44

Hmm. It looks like the new deserializer cannot find the QuestData class. Can you confirm that the class forge.quest.data.QuestData exists in your sources?
Fnoed
 
Posts: 84
Joined: 20 Dec 2010, 01:03
Has thanked: 0 time
Been thanked: 3 times

Re: SVN Bug Reports

Postby lazylockie » 06 Feb 2011, 18:57

Fnoed wrote:Hmm. It looks like the new deserializer cannot find the QuestData class. Can you confirm that the class forge.quest.data.QuestData exists in your sources?
I do have QuestData.java, though I don't have QuestData.class
lazylockie
 
Posts: 508
Joined: 13 Jul 2010, 22:44
Has thanked: 74 times
Been thanked: 15 times

Re: SVN Bug Reports

Postby Fnoed » 06 Feb 2011, 19:10

Your eclipse project is not compiling all the sources then. I can't help you here I'm afraid; try looking in the your project's settings for a way to add the package forge.quest to the list of compiled sources.

Alternately, if you are willing to try a different IDE, I have created a set of instructions on how to get things set-up using IntelliJ here. That project should work out of the box.
Fnoed
 
Posts: 84
Joined: 20 Dec 2010, 01:03
Has thanked: 0 time
Been thanked: 3 times

Re: SVN Bug Reports

Postby friarsol » 06 Feb 2011, 20:07

Fnoed wrote:Your eclipse project is not compiling all the sources then. I can't help you here I'm afraid; try looking in the your project's settings for a way to add the package forge.quest to the list of compiled sources.

Alternately, if you are willing to try a different IDE, I have created a set of instructions on how to get things set-up using IntelliJ here. That project should work out of the box.
What a pusher you are.

Lazy, right-click on cardforge, select Properties. Then select Java Build Path. Make sure cardforge/src Inludes All. Mine does it by default so I'm not sure what's up with your build?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: SVN Bug Reports

Postby timmermac » 06 Feb 2011, 20:11

I'm using r6165 and am having the same problem. Is there something that can be done for people that use Snacko's scripts?
"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
User avatar
timmermac
Tester
 
Posts: 1512
Joined: 17 May 2010, 20:36
Has thanked: 18 times
Been thanked: 95 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 44 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 44 users online :: 0 registered, 0 hidden and 44 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 44 guests

Login Form