Page 1 of 3

CardDb exception

PostPosted: 31 Aug 2011, 03:17
by slapshot5
I'm having problems adding new cards. I'm trying to add Mystic Compass, but when I add the txt file, then start Forge, I get the following exception:

java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at forge.card.CardDb.addNewCard(CardDb.java:91)
at forge.card.CardDb.<init>(CardDb.java:58)
at forge.card.CardDb.setup(CardDb.java:36)
at forge.card.cardFactory.PreloadingCardFactory.readCards(PreloadingCardFactory.java:82)
at forge.card.cardFactory.PreloadingCardFactory.<init>(PreloadingCardFactory.java:53)
at forge.AllZone.getCardFactory(AllZone.java:226)
at forge.view.swing.ApplicationView.setModel(ApplicationView.java:123)
at forge.view.swing.Main.main(Main.java:39)
at forge.Gui_NewGame.main(Gui_NewGame.java:27)

If I delete my new card file, Forge runs without exception.

-slapshot5

Re: CardDb exception

PostPosted: 31 Aug 2011, 05:42
by Hellfish
Try adding at least one SetInfo line. That worked for me when adding some private Innistrad card experiments.

Re: CardDb exception

PostPosted: 31 Aug 2011, 06:12
by slapshot5
Thanks Hellfish. That worked.

Hopefully this can be fixed soon. That's kind of annoying when trying out a few new cards.

-slapshot5

Re: CardDb exception

PostPosted: 31 Aug 2011, 07:29
by Sloth
By the way Slapshot: Mystic Compass is supposed to remove abilities from non-basic lands, when changing them to a basic land type.

Re: CardDb exception

PostPosted: 31 Aug 2011, 12:05
by friarsol
slapshot5 wrote:Thanks Hellfish. That worked.

Hopefully this can be fixed soon. That's kind of annoying when trying out a few new cards.

-slapshot5
Yea this is pretty counter intuitive to how Forge scripting works. New cards are created by several different people. Occasionally, an automated script is run (usually by Chris) to provide those new cards with particular information. The game shouldn't bail just because this information is missing.

Re: CardDb exception

PostPosted: 31 Aug 2011, 14:34
by ArsenalNut
Hellfish wrote:Try adding at least one SetInfo line. That worked for me when adding some private Innistrad card experiments.
Has a new mod changed the behavior? I almost always test new cards without SetInfo. I've been busy so I haven't updated my workspace in a day or so.

Re: CardDb exception

PostPosted: 31 Aug 2011, 15:41
by Hellfish
Max mtg's CardDB commit, part of the effort to separate printed card from card with rules objects. r10094, I believe.

Re: CardDb exception

PostPosted: 31 Aug 2011, 16:20
by Max mtg
ArsenalNut wrote:
Hellfish wrote:Try adding at least one SetInfo line. That worked for me when adding some private Innistrad card experiments.
Has a new mod changed the behavior? I almost always test new cards without SetInfo. I've been busy so I haven't updated my workspace in a day or so.
Yes, it's mine.
These cards are loaded by preloadingcardfactory

Re: CardDb exception

PostPosted: 31 Aug 2011, 16:46
by slapshot5
Sloth wrote:By the way Slapshot: Mystic Compass is supposed to remove abilities from non-basic lands, when changing them to a basic land type.

Re: CardDb exception

PostPosted: 31 Aug 2011, 17:54
by Hellfish
... Blistering Firecat got your tongue? ;)

Re: CardDb exception

PostPosted: 31 Aug 2011, 21:48
by slapshot5
So much for forum posting from my phone...

I'll fix it tonight.

-slapshot5

Re: CardDb exception

PostPosted: 01 Sep 2011, 18:11
by Max mtg
The deckeditor update commited.
This is a good place for crash/bug-reports.

Re: CardDb exception

PostPosted: 01 Sep 2011, 19:11
by Sloth
Max mtg wrote:The deckeditor update commited.
This is a good place for crash/bug-reports.
Wow. The deckeditor is fast. I almost couldn't believe it. =D>

When i continued a quest and clicked "edit deck" I got this error:
| Open
Detailed error trace:
java.lang.NullPointerException
at forge.card.CardPoolView.iterator(CardPoolView.java:49)
at forge.card.CardPool.addAll(CardPool.java:43)
at forge.gui.deckeditor.DeckEditorQuest.show(DeckEditorQuest.java:151)
at forge.quest.gui.main.QuestMainPanel.showDeckEditor(QuestMainPanel.java:595)
at forge.quest.gui.main.QuestMainPanel$7.actionPerformed(QuestMainPanel.java:302)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)


Could it be that something is not backward compatible?

EDIT: When I click "play", I get this error:
| Open
java.lang.NullPointerException
at forge.card.CardPool.clear(CardPool.java:64)
at forge.deck.Deck.clearSideboard(Deck.java:354)
at forge.quest.data.QuestData.getDeck(QuestData.java:319)
at forge.quest.gui.main.QuestMainPanel.launchGame(QuestMainPanel.java:644)
at forge.quest.gui.main.QuestMainPanel.access$2(QuestMainPanel.java:634)
at forge.quest.gui.main.QuestMainPanel$5.actionPerformed(QuestMainPanel.java:203)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

Maybe it's not an error in deck editor?

Re: CardDb exception

PostPosted: 01 Sep 2011, 19:18
by Sloth
When I start a sealed game and build my deck in the editor:
When I add a card, the ordering of cards in the card pool resets.

EDIT: It's the same when I build a deck from a draft pool.

Re: CardDb exception

PostPosted: 01 Sep 2011, 20:19
by Max mtg
that continue quest problem is probably related to serialization of quest data from an already outdated format. I will feed forge quest saves from 1.1.2 and make them work... or at least not to throw.

Sorting resets when a card is taken away from the cardpool in top table, right?