Page 191 of 487

Re: Bug Reports (snapshot builds)

PostPosted: 28 Apr 2014, 04:18
by swordshine
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]
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)
[/spoiler]

Re: Bug Reports (snapshot builds)

PostPosted: 28 Apr 2014, 05:22
by swordshine
1)The archenemy cards cannot be shown in command zone.
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)

Re: Bug Reports (snapshot builds)

PostPosted: 28 Apr 2014, 08:59
by Agetian
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

Re: Bug Reports (snapshot builds)

PostPosted: 28 Apr 2014, 18:43
by drdev
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.
Fixed in r25666.

Re: Bug Reports (snapshot builds)

PostPosted: 29 Apr 2014, 12:06
by swordshine
Another UI bug: in a hot seat game, the inactive player cannot play spells because all the cards in his hand are faced down.

Re: Bug Reports (snapshot builds)

PostPosted: 29 Apr 2014, 18:27
by KrazyTheFox
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.

Re: Bug Reports (snapshot builds)

PostPosted: 29 Apr 2014, 18:54
by Fizanko
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.

Re: Bug Reports (snapshot builds)

PostPosted: 29 Apr 2014, 19:28
by KrazyTheFox
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.
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.

Re: Bug Reports (snapshot builds)

PostPosted: 29 Apr 2014, 19:59
by friarsol
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.
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?

Re: Bug Reports (snapshot builds)

PostPosted: 29 Apr 2014, 20:18
by KrazyTheFox
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?
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.

Re: Bug Reports (snapshot builds)

PostPosted: 29 Apr 2014, 21:12
by Sloth
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. :?:

Re: Bug Reports (snapshot builds)

PostPosted: 30 Apr 2014, 04:18
by KrazyTheFox
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:

AI failed to play Sky Hussar (74)
Couldn't find a valid card to tap for: Sky Hussar
This is just printed continuously to the console in an infinite loop.

Re: Bug Reports (snapshot builds)

PostPosted: 30 Apr 2014, 15:29
by friarsol
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:

AI failed to play Sky Hussar (74)
Couldn't find a valid card to tap for: Sky Hussar
This is just printed continuously to the console in an infinite loop.
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?

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?

Re: Bug Reports (snapshot builds)

PostPosted: 30 Apr 2014, 16:18
by KrazyTheFox
friarsol wrote:This would definitely cause the canPay() to succeed, but the attempted AI payment to fail. Could someone test this out and commit?
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.

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.

Re: Bug Reports (snapshot builds)

PostPosted: 30 Apr 2014, 18:19
by KrazyTheFox
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.