It is currently 20 May 2025, 21:25
   
Text Size

Bug Reports (snapshot builds)

Post MTG Forge Related Programming Questions Here

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

Re: Bug Reports (snapshot builds)

Postby Max mtg » 16 Sep 2013, 06:42

I hope 23221 solves the problem for you.
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)

Postby swordshine » 16 Sep 2013, 06:55

Max mtg wrote:I hope 23221 solves the problem for you.
Thanks, but if we don't have a edition file during the spoiler season, we still cannot script such cards.
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Bug Reports (snapshot builds)

Postby Max mtg » 16 Sep 2013, 22:40

swordshine, test the same scenario with r23239 to make sure this would work in future without edition definition file.
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)

Postby RumbleBBU » 17 Sep 2013, 13:53

Still trying to get back into Forge after a long break...
most of the stuff works just great, and it's nice to see nifty improvements here and there. And of course even more classic old cards...

However, playtesting the current SVN with an old Quest save, I couldn't help noticing that the edition unlocking code is a total mess now. More specifically, I'm referring to getUnlockableEditions() in QuestUtilUnlockSets.java. In my old Quest game, with stone age sets, I'm given the choice to unlock Unlimited or Ice Age...or M14 or Modern Masters? Uhh, M14 and Modern Masters are a bit distant from the era I'm playing.

It seems that CardEdition hasn't got the 'index' parameter any longer? Sadly, sorting by date seems almost completely useless, as shown in the example above.
I could try and see if I can come up with a better sorting algorithm but I've been out of the loop so long that perhaps I better not...at least not until I've caught up and got a better grasp on how the current Forge works. But this really needs to be fixed. It pretty much ruins the whole unlocking idea if the offered sets are completely disjointed.
User avatar
RumbleBBU
 
Posts: 394
Joined: 18 Aug 2012, 04:24
Has thanked: 29 times
Been thanked: 66 times

Re: Bug Reports (snapshot builds)

Postby RumbleBBU » 18 Sep 2013, 09:17

RumbleBBU wrote:But this really needs to be fixed. It pretty much ruins the whole unlocking idea if the offered sets are completely disjointed.
I think I've isolated at least a part of the problem.
When the distance in Time is greater than Integer.MAX_VALUE (2147483647), Integer.MAX_VALUE is used instead. The problem is that, except for very nearby sets, the distance will always be 2147483647, which makes comparisons pointless.

Since we do not need second-level precision here, a division by, say, 10000 could help? Trying that now.


...lo and behold, that solved the problem nicely! The unlockable sets list makes sense again.
Now, let's see if I still have my commit privs....
User avatar
RumbleBBU
 
Posts: 394
Joined: 18 Aug 2012, 04:24
Has thanked: 29 times
Been thanked: 66 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 18 Sep 2013, 12:23

RumbleBBU wrote:nearby sets, the distance will always be 2147483647, which makes comparisons pointless.

Since we do not need second-level precision here, a division by, say, 10000 could help? Trying that now.


...lo and behold, that solved the problem nicely! The unlockable sets list makes sense again.
Now, let's see if I still have my commit privs....
What is distance being calculated by? Seconds? Wouldn't days make more sense? 60*60*24=86400
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Bug Reports (snapshot builds)

Postby Marek14 » 18 Sep 2013, 12:45

That's not even seconds - 2147483647 seconds would be about 68 years. It must be some smaller unit.
Marek14
Tester
 
Posts: 2771
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 302 times

Re: Bug Reports (snapshot builds)

Postby RumbleBBU » 18 Sep 2013, 13:20

It's milliseconds, actually. Way too much granularity IMO for this purpose. :D

Heck, getYear() would have been enough granularity for me, but the method seems deprecated.
User avatar
RumbleBBU
 
Posts: 394
Joined: 18 Aug 2012, 04:24
Has thanked: 29 times
Been thanked: 66 times

Re: Bug Reports (snapshot builds)

Postby Max mtg » 18 Sep 2013, 13:42

That is milliseconds.
The really bugged line about the former code revision was
Code: Select all
long distance = Integer.MAX_VALUE;
the variable has to be asigned something like Long.MAX_VALUE - no division by 10000 will be needed then
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)

Postby Tets » 19 Sep 2013, 01:33

Description: When you attack with High Priest of Penance (alone or with other creatures), and the enemy has creatures to block, the game crashes most times before blockers are declared. Happend with java 1.7.0_25 and 1.7.0_40

NullPointerException | Open
Code: Select all
Forge Version:    1.4.7-r23046M
Operating System: Windows 7 6.1 x86
Java Version:     1.7.0_40 Oracle Corporation

java.lang.NullPointerException
   at forge.game.ai.AiBlockController.makeGoodBlocks(AiBlockController.java:236)
   at forge.game.ai.AiBlockController.assignBlockers(AiBlockController.java:657)
   at forge.game.ai.AiController.declareBlockersFor(AiController.java:755)
   at forge.game.player.PlayerControllerAi.declareBlockers(PlayerControllerAi.java:348)
   at forge.game.phase.PhaseHandler.declareBlockersTurnBasedAction(PhaseHandler.java:550)
   at forge.game.phase.PhaseHandler.onPhaseBegin(PhaseHandler.java:320)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:985)
   at forge.game.GameAction.startGame(GameAction.java:1491)
   at forge.game.Match$1.run(Match.java:103)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Tets
 
Posts: 5
Joined: 19 Sep 2013, 01:24
Has thanked: 0 time
Been thanked: 0 time

Re: Bug Reports (snapshot builds)

Postby xbon » 19 Sep 2013, 22:33

Description: Played Cystbearer

ConcurrentModificationException | Open
Code: Select all
Forge Version:    r23261
Operating System: Windows 8 6.2 x86
Java Version:     1.7.0_25 Oracle Corporation

java.util.ConcurrentModificationException
   at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
   at java.util.ArrayList$Itr.next(Unknown Source)
   at forge.Card.getLatestPT(Card.java:3914)
   at forge.Card.getSetPower(Card.java:3883)
   at forge.Card.getCurrentPower(Card.java:3963)
   at forge.Card.getUnswitchedPower(Card.java:3979)
   at forge.Card.getNetAttack(Card.java:4005)
   at forge.view.arcane.CardPanel.setText(CardPanel.java:625)
   at forge.view.arcane.CardPanel.setCard(CardPanel.java:665)
   at forge.view.arcane.PlayArea.updateCard(PlayArea.java:641)
   at forge.view.arcane.PlayArea.updateSingleCard(PlayArea.java:301)
   at forge.gui.match.CMatchUI.updateSingleCard(CMatchUI.java:372)
   at forge.gui.match.CMatchUI.updateCards(CMatchUI.java:364)
   at forge.control.FControlGameEventHandler$4.run(FControlGameEventHandler.java:256)
   at java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.awt.EventQueue.access$200(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(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)
xbon
 
Posts: 124
Joined: 04 Jun 2013, 22:52
Has thanked: 18 times
Been thanked: 2 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 20 Sep 2013, 03:53

r23269
Playing Theros Sealed duel. AI cast Minotaur Skullcleaver and with it's ETB on the stack, I get this error.

Looks like the only Enchantment in AIs hand is Purphoros's Emissary

NullPointerException | Open
Code: Select all
Forge Version:    SVN
Operating System: Windows 7 6.1 x86
Java Version:     1.7.0_21 Oracle Corporation

java.lang.NullPointerException
   at java.lang.String.contains(String.java:2076)
   at forge.card.ability.ai.AttachAi.attachAIPumpPreference(AttachAi.java:804)
   at forge.card.ability.ai.AttachAi.attachGeneralAI(AttachAi.java:1017)
   at forge.card.ability.ai.AttachAi.attachToCardAIPreferences(AttachAi.java:962)
   at forge.card.ability.ai.AttachAi.attachPreference(AttachAi.java:708)
   at forge.card.ability.ai.AttachAi.canPlayAI(AttachAi.java:66)
   at forge.card.ability.SpellAbilityAi.canPlayAIWithSubs(SpellAbilityAi.java:23)
   at forge.card.ability.SpellApiBased.canPlayAI(SpellApiBased.java:49)
   at forge.game.ai.AiController.canPlayAndPayFor(AiController.java:478)
   at forge.game.ai.AiController.chooseSpellAbilyToPlay(AiController.java:462)
   at forge.game.ai.AiController.getSpellAbilityToPlay(AiController.java:826)
   at forge.game.ai.AiController.playSpellAbilities(AiController.java:800)
   at forge.game.ai.AiController.onPriorityRecieved(AiController.java:746)
   at forge.game.player.PlayerControllerAi.takePriority(PlayerControllerAi.java:354)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:960)
   at forge.game.GameAction.startGame(GameAction.java:1542)
   at forge.game.Match$1.run(Match.java:103)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:722)
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Bug Reports (snapshot builds)

Postby moomarc » 20 Sep 2013, 06:41

I got the same crash as Sol in the AI's main 1 when he had Heliod's Emissary in hand.

EDIT: Fixed!... but Sloth beat me to committing =D>
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Bug Reports (snapshot builds)

Postby twinfacer » 21 Sep 2013, 09:34

Description: At first main phase of AI. Both players uses custom decks.

NullPointerException | Open
Code: Select all
Forge Version:    1.4.8-SNAPSHOT-r23275
Operating System: Windows 7 6.1 amd64
Java Version:     1.7.0_25 Oracle Corporation

java.lang.NullPointerException
   at forge.game.combat.CombatUtil.canBlock(CombatUtil.java:523)
   at forge.card.ability.ai.PumpAiBase.isUsefulPumpKeyword(PumpAiBase.java:236)
   at forge.card.ability.ai.PumpAiBase.containsUsefulKeyword(PumpAiBase.java:32)
   at forge.card.ability.ai.PumpAllAi$3.apply(PumpAllAi.java:125)
   at forge.card.ability.ai.PumpAllAi$3.apply(PumpAllAi.java:122)
   at com.google.common.collect.Iterators$7.computeNext(Iterators.java:702)
   at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
   at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
   at com.google.common.collect.Lists.newArrayList(Lists.java:144)
   at com.google.common.collect.Lists.newArrayList(Lists.java:125)
   at forge.CardLists.filter(CardLists.java:232)
   at forge.card.ability.ai.PumpAllAi.canPlayAI(PumpAllAi.java:122)
   at forge.card.ability.SpellAbilityAi.canPlayAIWithSubs(SpellAbilityAi.java:23)
   at forge.card.ability.AbilityApiBased.canPlayAI(AbilityApiBased.java:67)
   at forge.game.ai.AiController.canPlayAndPayFor(AiController.java:478)
   at forge.game.ai.AiController.chooseSpellAbilyToPlay(AiController.java:462)
   at forge.game.ai.AiController.getSpellAbilityToPlay(AiController.java:826)
   at forge.game.ai.AiController.playSpellAbilities(AiController.java:800)
   at forge.game.ai.AiController.onPriorityRecieved(AiController.java:746)
   at forge.game.player.PlayerControllerAi.takePriority(PlayerControllerAi.java:354)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:960)
   at forge.game.GameAction.startGame(GameAction.java:1542)
   at forge.game.Match$1.run(Match.java:103)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
twinfacer
 
Posts: 3
Joined: 01 Jul 2012, 17:57
Has thanked: 2 times
Been thanked: 0 time

Re: Bug Reports (snapshot builds)

Postby friarsol » 21 Sep 2013, 13:02

twinfacer wrote:Description: At first main phase of AI. Both players uses custom decks.
You need to give more information than this. What cards were on the battlefield?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 40 guests


Who is online

In total there are 40 users online :: 0 registered, 0 hidden and 40 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 40 guests

Login Form