Bug Reports (snapshot builds)
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
Re: Bug Reports (snapshot builds)
by swordshine » 28 Apr 2014, 04:18
r25664, I got a serious UI bug (r25655?).
@drdev
Description: When I clicked Force of Will or a planeswalker which has more than one ability to choose.
[spoiler]
@drdev
Description: When I clicked Force of Will or a planeswalker which has more than one ability to choose.
[spoiler]
- Code: Select all
java.lang.ClassCastException: forge.toolbox.MouseTriggerEvent cannot be cast to java.awt.event.MouseEvent
at forge.GuiDesktop.getAbilityToPlay(GuiDesktop.java:286)
at forge.player.PlayerControllerHuman.getAbilityToPlay(PlayerControllerHuman.java:81)
at forge.match.input.InputPassPriority.onCardSelected(InputPassPriority.java:71)
at forge.match.input.InputBase.selectCard(InputBase.java:76)
at forge.match.input.InputProxy.selectCard(InputProxy.java:142)
at forge.view.arcane.HandArea.mouseLeftClicked(HandArea.java:65)
at forge.view.arcane.CardPanelContainer$2.mouseReleased(CardPanelContainer.java:161)
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 swordshine » 28 Apr 2014, 05:22
1)The archenemy cards cannot be shown in command zone.
2) Open Scheme Deck Editor and get an NPE:
2) Open Scheme Deck Editor and get an NPE:
- Code: Select all
EDT > java.lang.NullPointerException
at forge.screens.deckeditor.VDeckEditorUI$1.run(VDeckEditorUI.java:39)
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)
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Bug Reports (snapshot builds)
by Agetian » 28 Apr 2014, 08:59
Another UI bug (still valid as of r25665): morphed cards still don't show their P/T on the battlefield (it's not really major but it's been an issue for a while).
- Agetian
- Agetian
- Agetian
- Programmer
- Posts: 3490
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: Bug Reports (snapshot builds)
by drdev » 28 Apr 2014, 18:43
Fixed in r25666.swordshine wrote:r25664, I got a serious UI bug (r25655?).
@drdev
Description: When I clicked Force of Will or a planeswalker which has more than one ability to choose.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Bug Reports (snapshot builds)
by swordshine » 29 Apr 2014, 12:06
Another UI bug: in a hot seat game, the inactive player cannot play spells because all the cards in his hand are faced down.
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Bug Reports (snapshot builds)
by KrazyTheFox » 29 Apr 2014, 18:27
I haven't figured out what's causing this particular bug yet and it's been a few days of trying to reproduce it reliably. Every few matches or so when I lose a game (and an ante), the ante is not removed from my deck. It's not a super serious bug, but it is an odd one.
-

KrazyTheFox - Programmer
- Posts: 725
- Joined: 18 Mar 2014, 23:51
- Has thanked: 66 times
- Been thanked: 226 times
Re: Bug Reports (snapshot builds)
by Fizanko » 29 Apr 2014, 18:54
I think it is related to having or not the "quest deck editor" tab present on the top header when you come out of a duel that had you losing one or two cards.
probably outdated by now so you should avoid : Innistrad world for Forge (updated 17/11/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
Re: Bug Reports (snapshot builds)
by KrazyTheFox » 29 Apr 2014, 19:28
Nope. I just completed another match in which I lost and the editor wasn't open. I lost only 1 card instead of the 2 I was supposed to.Fizanko wrote:I think it is related to having or not the "quest deck editor" tab present on the top header when you come out of a duel that had you losing one or two cards.
-

KrazyTheFox - Programmer
- Posts: 725
- Joined: 18 Mar 2014, 23:51
- Has thanked: 66 times
- Been thanked: 226 times
Re: Bug Reports (snapshot builds)
by friarsol » 29 Apr 2014, 19:59
What do you mean the 2 you were supposed to? Antes are lost after each game, not after the match. Maybe it has to do with the code you mentioned where it wasn't removing Antes until later that you have locally?KrazyTheFox wrote:Nope. I just completed another match in which I lost and the editor wasn't open. I lost only 1 card instead of the 2 I was supposed to.
- 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 KrazyTheFox » 29 Apr 2014, 20:18
If I lose 2 games in a match, occasionally after one of those games the ante is not removed from my deck. I'm running the game without any personal modifications at the moment so I don't introduce any of it accidentally to the official repo. I also took out the ante rarity matching code I added a little while ago to see if that was affecting anything and it doesn't appear to make a difference. I'll see if I can't fix this tonight.friarsol wrote:What do you mean the 2 you were supposed to? Antes are lost after each game, not after the match. Maybe it has to do with the code you mentioned where it wasn't removing Antes until later that you have locally?
-

KrazyTheFox - Programmer
- Posts: 725
- Joined: 18 Mar 2014, 23:51
- Has thanked: 66 times
- Been thanked: 226 times
Re: Bug Reports (snapshot builds)
by Sloth » 29 Apr 2014, 21:12
When i click on my or my opponents library nothing happens.
In DevMode it should show me the exact content of my library, without DevMode it should show me the decklist, but neither works.
EDIT: I started a new match and now it works (DevMode on). Strange.
EDIT2: I restarted the game and it does not work.
Edit3: Ok, i tested some more and it always doesn't work in the first match, but works in the second.
In DevMode it should show me the exact content of my library, without DevMode it should show me the decklist, but neither works.
EDIT: I started a new match and now it works (DevMode on). Strange.
EDIT2: I restarted the game and it does not work.
Edit3: Ok, i tested some more and it always doesn't work in the first match, but works in the second.
-

Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Bug Reports (snapshot builds)
by KrazyTheFox » 30 Apr 2014, 04:18
I've narrowed down the previous bug a bit but haven't found a solution for it just yet. I did, however, just run into the power/toughness-rapidly-switching-and-blocking-the-game bug (or one instance of it) and caught the output for it. It occurred at the start of the AI opponent's upkeep while the AI had two creatures on the field:
This is just printed continuously to the console in an infinite loop.AI failed to play Sky Hussar (74)
Couldn't find a valid card to tap for: Sky Hussar
-

KrazyTheFox - Programmer
- Posts: 725
- Joined: 18 Mar 2014, 23:51
- Has thanked: 66 times
- Been thanked: 226 times
Re: Bug Reports (snapshot builds)
by friarsol » 30 Apr 2014, 15:29
I'll try to take a look in the next day or two. Hopefully this is related to the person on the release thread who is experiencing the same thing. Without any reference to what card the AI is stuck trying to activate, it's kind of impossible to fix these types of things. Which two creatures did the AI have in play?KrazyTheFox wrote:I've narrowed down the previous bug a bit but haven't found a solution for it just yet. I did, however, just run into the power/toughness-rapidly-switching-and-blocking-the-game bug (or one instance of it) and caught the output for it. It occurred at the start of the AI opponent's upkeep while the AI had two creatures on the field:This is just printed continuously to the console in an infinite loop.AI failed to play Sky Hussar (74)
Couldn't find a valid card to tap for: Sky Hussar
Edit:
Actually, I don't have commit rights setup on this computer, but I think I found the issue in -
forge/forge-ai/src/main/java/forge/ai/ComputerUtil.java
- chooseTapType() | Open
- public static List<Card> chooseTapType(final Player ai, final String type, final Card activate, final boolean tap, final int amount) {
List<Card> typeList =
CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), type.split(","), activate.getController(), activate);
// is this needed?
typeList = CardLists.filter(typeList, Presets.UNTAPPED);
if (tap) {
typeList.remove(activate);
}
if (typeList.size() < amount) {
return null;
}
CardLists.sortByPowerAsc(typeList);
final List<Card> tapList = new ArrayList<Card>();
for (int i = 0; i < amount; i++) {
tapList.add(typeList.get(i));
}
return tapList;
}
This first line is incorrect:
List<Card> typeList =
CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), type.split(","), activate.getController(), activate);
should be
List<Card> typeList =
CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), type.split(";"), activate.getController(), activate);
It's also incorrect for chooseUntapType. It's probably worth going through this file and making sure the type of Cost payments are splitting on semicolon, not on comma. (We used semicolons, since certain costs use names of Cards like Baru, Fist of Krosa.) but most of the time we use commas when splitting other non-Cost things. I guess this was screwed when the modules were split up.
This would definitely cause the canPay() to succeed, but the attempted AI payment to fail. Could someone test this out and commit?
- 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 KrazyTheFox » 30 Apr 2014, 16:18
I'll be away from home for the next couple of hours, but if someone doesn't get around to it before I get back I'll do it.friarsol wrote:This would definitely cause the canPay() to succeed, but the attempted AI payment to fail. Could someone test this out and commit?
Edit: Plans changed and I'm staying in today. Implemented the above changes and it fixes the bug. I'll push the commit in just a second.
-

KrazyTheFox - Programmer
- Posts: 725
- Joined: 18 Mar 2014, 23:51
- Has thanked: 66 times
- Been thanked: 226 times
Re: Bug Reports (snapshot builds)
by KrazyTheFox » 30 Apr 2014, 18:19
I've located the cause of the antes not being removed from decks after games, however, the problem is my misunderstanding of the way the game handles removing the cards from the decks. Cards weren't being removed from my deck after games because I had more copies in my collection than were in my deck. The game doesn't remove the card from the deck because there's a "replacement" card available in my collection. Once the number of cards in the collection is equivalent to the number in the deck the card is removed as it should be.
No bug here, moving along to other things.
No bug here, moving along to other things.
-

KrazyTheFox - Programmer
- Posts: 725
- Joined: 18 Mar 2014, 23:51
- Has thanked: 66 times
- Been thanked: 226 times
Who is online
Users browsing this forum: No registered users and 15 guests