Bug Reports (snapshot builds)
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Bug Reports (snapshot builds)
by friarsol » 25 Jan 2014, 01:09
Fmartel, it looks like your using an old version: 1.5.8. Pleease update to the latest version. Additionally, please post bug reports in the thread announcement of the thread you are using.fmartel wrote:Hello again. I got this error message at the bigining of my 2nd inrow game of commander...
Description: [describe what you were doing when the crash occurred]
- IndexOutOfBoundsException | Open
- Code: Select all
Forge Version: 1.5.8-r${forge.revision}${forge.specialStatus} (mixed revisions detected; please update from the root directory)
Operating System: Windows 7 6.1 x86
Java Version: 1.7.0_51 Oracle Corporation
java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at forge.ai.ComputerUtil.getPartialParisCandidates(ComputerUtil.java:1508)
at forge.game.player.PlayerControllerAi.getCardsToMulligan(PlayerControllerAi.java:375)
at forge.game.GameAction.performMulligans(GameAction.java:1570)
at forge.game.GameAction.startGame(GameAction.java:1477)
at forge.game.Match$1.run(Match.java:140)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Bug Reports (snapshot builds)
by Agetian » 25 Jan 2014, 07:09
r24473: It looks like the sizes of columns in deck editor and deck list are not saved/loaded correctly across sessions. Might be related to Sol's earlier report of column positioning not being saved as well.
- Agetian
- Agetian
- Agetian
- Programmer
- Posts: 3486
- Joined: 14 Mar 2011, 05:58
- Has thanked: 683 times
- Been thanked: 569 times
Re: Bug Reports (snapshot builds)
by Agetian » 25 Jan 2014, 10:44
r24485: Got this crash when starting a standard Constructed match (no variants chosen):
- IllegalArgumentException | Open
- Code: Select all
Forge Version: 1.5.11-SNAPSHOT-r${forge.revision}${forge.specialStatus} (mixed revisions detected; please update from the root directory)
Operating System: Linux 3.8.0-26-generic amd64
Java Version: 1.7.0_51 Oracle Corporation
java.lang.IllegalArgumentException: Collection is empty
at java.util.EnumSet.copyOf(EnumSet.java:166)
at forge.game.GameRules.setAppliedVariants(GameRules.java:70)
at forge.control.FControl.startMatch(FControl.java:581)
at forge.gui.home.sanctioned.CSubmenuConstructed.startGame(CSubmenuConstructed.java:219)
at forge.gui.home.sanctioned.CSubmenuConstructed.access$100(CSubmenuConstructed.java:41)
at forge.gui.home.sanctioned.CSubmenuConstructed$2.actionPerformed(CSubmenuConstructed.java:108)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3311)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
- Agetian
- Programmer
- Posts: 3486
- Joined: 14 Mar 2011, 05:58
- Has thanked: 683 times
- Been thanked: 569 times
Re: Bug Reports (snapshot builds)
by Max mtg » 25 Jan 2014, 11:20
fixed with r24486Agetian wrote:r24485: Got this crash when starting a standard Constructed match (no variants chosen):
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Bug Reports (snapshot builds)
by drdev » 25 Jan 2014, 14:40
Both of those are known issues I plan to fix shortly.Agetian wrote:r24473: It looks like the sizes of columns in deck editor and deck list are not saved/loaded correctly across sessions. Might be related to Sol's earlier report of column positioning not being saved as well.
- Agetian
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Bug Reports (snapshot builds)
by jasmines » 25 Jan 2014, 14:45
Description: [describe what you were doing when the crash occurred]
- ExceptionInInitializerError | Open
- Code: Select all
Forge Version: 1.5.10-r${forge.revision}${forge.specialStatus} (mixed revisions detected; please update from the root directory)
Operating System: Linux 3.11.0-15-generic amd64
Java Version: 1.7.0_51 Oracle Corporation
java.lang.ExceptionInInitializerError
at forge.gui.framework.DragTab.<init>(DragTab.java:36)
at forge.gui.home.sanctioned.VSubmenuConstructed.<init>(VSubmenuConstructed.java:43)
at forge.gui.home.sanctioned.VSubmenuConstructed.<clinit>(VSubmenuConstructed.java:39)
at forge.gui.home.VHomeUI.<init>(VHomeUI.java:134)
at forge.gui.home.VHomeUI.<clinit>(VHomeUI.java:81)
at forge.gui.framework.FScreen.<clinit>(FScreen.java:27)
at forge.gui.menus.LayoutMenu.getMenu(LayoutMenu.java:46)
at forge.gui.menus.ForgeMenu.refresh(ForgeMenu.java:73)
at forge.gui.menus.ForgeMenu.<init>(ForgeMenu.java:27)
at forge.control.FControl.getForgeMenu(FControl.java:259)
at forge.view.FNavigationBar.<clinit>(FNavigationBar.java:42)
at forge.view.FView.initialize(FView.java:101)
at forge.control.FControl$3.run(FControl.java:247)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.lang.IllegalArgumentException: Width (0) and height (0) must be non-zero
at java.awt.image.ReplicateScaleFilter.<init>(ReplicateScaleFilter.java:102)
at java.awt.Image.getScaledInstance(Image.java:173)
at sun.awt.CustomCursor.<init>(CustomCursor.java:69)
at sun.awt.X11CustomCursor.<init>(X11CustomCursor.java:43)
at sun.awt.X11.XCustomCursor.<init>(XCustomCursor.java:42)
at sun.awt.X11.XToolkit.createCustomCursor(XToolkit.java:1133)
at forge.gui.toolbox.FSkin$SkinCursor.updateCursor(FSkin.java:713)
at forge.gui.toolbox.FSkin$SkinCursor.access$1600(FSkin.java:700)
at forge.gui.toolbox.FSkin$SkinImage.toCursor(FSkin.java:653)
at forge.gui.toolbox.FSkin$SkinImage.access$1700(FSkin.java:492)
at forge.gui.toolbox.FSkin.getCursor(FSkin.java:697)
at forge.gui.framework.SRearrangingUtil.<clinit>(SRearrangingUtil.java:54)
... 27 more
- jasmines
- Posts: 6
- Joined: 25 Jan 2014, 14:35
- Has thanked: 0 time
- Been thanked: 0 time
Re: Bug Reports (snapshot builds)
by swordshine » 26 Jan 2014, 07:03
Booster Draft -> New Booster Draft Game -> Custom
- NullPointerException | Open
- Code: Select all
EDT > java.lang.NullPointerException
at forge.gui.GuiChoose.one(GuiChoose.java:93)
at forge.limited.BoosterDraft.<init>(BoosterDraft.java:144)
at forge.gui.home.sanctioned.CSubmenuDraft.setupDraft(CSubmenuDraft.java:154)
at forge.gui.home.sanctioned.CSubmenuDraft.access$2(CSubmenuDraft.java:148)
at forge.gui.home.sanctioned.CSubmenuDraft$2.run(CSubmenuDraft.java:61)
at forge.gui.toolbox.FLabel._doMouseAction(FLabel.java:307)
at forge.gui.toolbox.FLabel.access$3(FLabel.java:304)
at forge.gui.toolbox.FLabel$4.onLeftClick(FLabel.java:345)
at forge.gui.toolbox.FMouseAdapter.mouseReleased(FMouseAdapter.java:184)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Bug Reports (snapshot builds)
by Agetian » 27 Jan 2014, 05:46
Fixed in r24519. I removed a small bit of offending code that seemed to do nothing beneficial in addition to the code right above it. Not sure if this code was/is necessary for something I don't quite understand though, please report or re-fix differently if anything was broken "thanks" to this change.swordshine wrote:Booster Draft -> New Booster Draft Game -> Custom
- NullPointerException | Open
- Code: Select all
EDT > java.lang.NullPointerException
at forge.gui.GuiChoose.one(GuiChoose.java:93)
at forge.limited.BoosterDraft.<init>(BoosterDraft.java:144)
at forge.gui.home.sanctioned.CSubmenuDraft.setupDraft(CSubmenuDraft.java:154)
at forge.gui.home.sanctioned.CSubmenuDraft.access$2(CSubmenuDraft.java:148)
at forge.gui.home.sanctioned.CSubmenuDraft$2.run(CSubmenuDraft.java:61)
at forge.gui.toolbox.FLabel._doMouseAction(FLabel.java:307)
at forge.gui.toolbox.FLabel.access$3(FLabel.java:304)
at forge.gui.toolbox.FLabel$4.onLeftClick(FLabel.java:345)
at forge.gui.toolbox.FMouseAdapter.mouseReleased(FMouseAdapter.java:184)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
- Agetian
- Agetian
- Programmer
- Posts: 3486
- Joined: 14 Mar 2011, 05:58
- Has thanked: 683 times
- Been thanked: 569 times
Re: Bug Reports (snapshot builds)
by Max mtg » 27 Jan 2014, 06:14
Ok, now you start a game, then go to devmode -> add card to hand (or play), scroll through the list and find out that you no longer see the card under selection.Agetian wrote:code that seemed to do nothing beneficial in addition to the code right above it
I expected you would have looked through with SVN "blame" feature to discover the purpose that code was added for.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Bug Reports (snapshot builds)
by Agetian » 27 Jan 2014, 06:21
Oh, I was unaware of what the "blame" feature was for, thanks for the tip!
I'll try to recorrect in another way then. Do you have a suggestion for a better fix, by the way? The original code was broken because it worked out of match (and thus took all the various InventoryItems, including e.g. custom drafts, into that part of the algorithm where it tried to display them as a card via CMatchUI).
- Agetian

- Agetian
- Agetian
- Programmer
- Posts: 3486
- Joined: 14 Mar 2011, 05:58
- Has thanked: 683 times
- Been thanked: 569 times
Re: Bug Reports (snapshot builds)
by Max mtg » 27 Jan 2014, 06:31
Which expression evaluated to null when the code used to throw an exception?
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Bug Reports (snapshot builds)
by Agetian » 27 Jan 2014, 06:42
The trace was showing a NPE in GuiChoose.java:93 called from BoosterDraft.java:144.Max mtg wrote:Which expression evaluated to null when the code used to throw an exception?
- Agetian
- Agetian
- Programmer
- Posts: 3486
- Joined: 14 Mar 2011, 05:58
- Has thanked: 683 times
- Been thanked: 569 times
Re: Bug Reports (snapshot builds)
by Max mtg » 27 Jan 2014, 06:56
I mean not the line, but the expression.Agetian wrote:The trace was showing a NPE in GuiChoose.java:93 called from BoosterDraft.java:144.Max mtg wrote:Which expression evaluated to null when the code used to throw an exception?
- Agetian
When you know what has evaluated to null, you (in the simplest case) add a check against null value and do not execute the code that supposes that such expression is not null.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Bug Reports (snapshot builds)
by Agetian » 27 Jan 2014, 07:05
OK, I think I got that fixed - there were a couple expressions evaluating to null that mattered, I got them fixed and will commit a different fix now. Hopefully that'll be a better and more appropriate solution.Max mtg wrote:I mean not the line, but the expression.
When you know what has evaluated to null, you (in the simplest case) add a check against null value and do not execute the code that supposes that such expression is not null.

- Agetian
- Agetian
- Programmer
- Posts: 3486
- Joined: 14 Mar 2011, 05:58
- Has thanked: 683 times
- Been thanked: 569 times
- jasmines
- Posts: 6
- Joined: 25 Jan 2014, 14:35
- Has thanked: 0 time
- Been thanked: 0 time
Who is online
Users browsing this forum: No registered users and 11 guests