CardDb exception
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
41 posts
• Page 1 of 3 • 1, 2, 3
CardDb exception
by slapshot5 » 31 Aug 2011, 03:17
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
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
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: CardDb exception
by Hellfish » 31 Aug 2011, 05:42
Try adding at least one SetInfo line. That worked for me when adding some private Innistrad card experiments.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: CardDb exception
by slapshot5 » 31 Aug 2011, 06:12
Thanks Hellfish. That worked.
Hopefully this can be fixed soon. That's kind of annoying when trying out a few new cards.
-slapshot5
Hopefully this can be fixed soon. That's kind of annoying when trying out a few new cards.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: CardDb exception
by Sloth » 31 Aug 2011, 07:29
By the way Slapshot: Mystic Compass is supposed to remove abilities from non-basic lands, when changing them to a basic land type.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: CardDb exception
by friarsol » 31 Aug 2011, 12:05
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.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
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: CardDb exception
by ArsenalNut » 31 Aug 2011, 14:34
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.Hellfish wrote:Try adding at least one SetInfo line. That worked for me when adding some private Innistrad card experiments.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: CardDb exception
by Hellfish » 31 Aug 2011, 15:41
Max mtg's CardDB commit, part of the effort to separate printed card from card with rules objects. r10094, I believe.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: CardDb exception
by Max mtg » 31 Aug 2011, 16:20
Yes, it's mine.ArsenalNut wrote: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.Hellfish wrote:Try adding at least one SetInfo line. That worked for me when adding some private Innistrad card experiments.
These cards are loaded by preloadingcardfactory
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: CardDb exception
by slapshot5 » 31 Aug 2011, 16:46
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.
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: CardDb exception
by Hellfish » 31 Aug 2011, 17:54
... Blistering Firecat got your tongue? 

So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: CardDb exception
by slapshot5 » 31 Aug 2011, 21:48
So much for forum posting from my phone...
I'll fix it tonight.
-slapshot5
I'll fix it tonight.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: CardDb exception
by Max mtg » 01 Sep 2011, 18:11
The deckeditor update commited.
This is a good place for crash/bug-reports.
This is a good place for crash/bug-reports.
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: CardDb exception
by Sloth » 01 Sep 2011, 19:11
Wow. The deckeditor is fast. I almost couldn't believe it.Max mtg wrote:The deckeditor update commited.
This is a good place for crash/bug-reports.

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?
Last edited by Sloth on 01 Sep 2011, 19:18, edited 1 time in total.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: CardDb exception
by Sloth » 01 Sep 2011, 19:18
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.
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.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: CardDb exception
by Max mtg » 01 Sep 2011, 20:19
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?
Sorting resets when a card is taken away from the cardpool in top table, right?
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
41 posts
• Page 1 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 75 guests