It is currently 01 Nov 2025, 14:29
   
Text Size

Big commit, no dice / SVN hugely broken on r10194

Post MTG Forge Related Programming Questions Here

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

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Doublestrike » 16 Sep 2011, 10:49

@Max, mostly - thanks for the fast turnaround on the Deck issue. Unfortunately it looks like another bug popped up as a result - can you confirm a problem with questData.getDeck()? I've got a working build but my tests are breaking in QuestMainPanel, when the human deck is "summoned" from questData. I'm guessing this has to do with the new deck handling stuff? Not a compile error, but a null pointer exception:

| Open
java.lang.NullPointerException
at forge.GameAction.newGame(GameAction.java:1161)
at forge.GameAction.newGame(GameAction.java:1080)
at forge.quest.gui.QuestMainPanel.setupDuel(QuestMainPanel.java:705)
at forge.quest.gui.QuestMainPanel.launchGame(QuestMainPanel.java:686)
at forge.quest.gui.QuestMainPanel.access$2(QuestMainPanel.java:651)
at forge.quest.gui.QuestMainPanel$5.actionPerformed(QuestMainPanel.java:214)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6288)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6053)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4651)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616)
at java.awt.EventQueue$2.run(EventQueue.java:614)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


This is caused by
Code: Select all
Deck humanDeck = questData.getDeck(humanDeckName);
.

Human deck is then used by "setupDuel()" to start a "newGame()" instance and crashes since humanDeck is null.

I tried a fresh build, fully reverted with none of my changes in place, and this still happened (at "setupBattle()"). So, I'm not sure what to do next.

Otherwise, I've got a BIG clean commit ready to go, once it gets past play testing.
---
A joke is a very serious thing.
User avatar
Doublestrike
UI Programmer
 
Posts: 715
Joined: 08 Aug 2011, 09:07
Location: Bali
Has thanked: 183 times
Been thanked: 161 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Max mtg » 16 Sep 2011, 17:37

Sorry, I cannot reproduce the exception you've mentioned.

maybe you didn't select a deck to start duel with?


@Rob, I'm kinda sick right now (got flu or something like that), so didn't answer soon. The idea I would like to implement (can do it myself) is to remove cubes from deckmanager, put them together with settings and improve deckeditor to open that specific cardpools and edit the special options they have (num boosters, qty of cards of each rarity)
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: Big commit, no dice / SVN hugely broken on r10194

Postby Doublestrike » 17 Sep 2011, 09:22

OK thanks for the check Max, it was a hellish search but I found the problem - a single variable named incorrectly. :roll:

Anyway, I'm pleased to report r10491 is complete, and this thread discussion has come full circle. I really hope nothing's wrong.

| Open
Finally, all quest and duel decks fully encapsulated with acceptable format.

Helper files completely removed (easy.txt, quests.txt, etc.) and hard-coded quest properties are a thing of the past.

Model and view fully separated for main panel in quest GUI.

Critical file: QuestEventManager can handle instantiation of all decks, once (ideally).


There's still a few things to be done, but the bulk is knocked out.
---
A joke is a very serious thing.
User avatar
Doublestrike
UI Programmer
 
Posts: 715
Joined: 08 Aug 2011, 09:07
Location: Bali
Has thanked: 183 times
Been thanked: 161 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Max mtg » 17 Sep 2011, 09:37

http://svn.slightlymagic.net/websvn/dif ... &peg=10491
Why? by assigning false to haveMythics you won't give player any mythics at the beginning of a quest

There is more:
Code: Select all
java.io.FileNotFoundException: res\quest\decks\.svn (Отказано в доступе) // translation: access denied
   at java.io.FileInputStream.open(Native Method)
   at java.io.FileInputStream.<init>(Unknown Source)
   at java.io.FileReader.<init>(Unknown Source)
   at forge.FileUtil.readFile(FileUtil.java:112)
   at forge.quest.gui.main.QuestEventManager.assembleAllEvents(QuestEventManager.java:52)
   at forge.quest.gui.QuestFrame.<init>(QuestFrame.java:48)
   at forge.quest.gui.QuestOptions.continueQuestButton_actionPerformed(QuestOptions.java:226)
   at forge.quest.gui.QuestOptions$2.actionPerformed(QuestOptions.java:132)
Each battle is named mystery event, though description is shown correctly
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: Big commit, no dice / SVN hugely broken on r10194

Postby Doublestrike » 17 Sep 2011, 13:20

Whoops sorry, both were in my search for the last problem.

Fixing.

Update 1

Mythics line restored.

Re: "Mystery Battle" - not getting that on my version. But, for some reason, Eclipse is not letting me update quest event deck files. Fixing, again.

Update 2

Apparently quest event files hadn't been committed - but are, now. Cheers on the support, @Max. Not sure why these hiccups in SVN, all the time, very confusing, and people seem strangely quiet about why this is happening. My connection is slow, but SVN should be built to deal with that? I suppose the reason will show itself in time.

Anyway, problem should be solved r10496. (?)
---
A joke is a very serious thing.
User avatar
Doublestrike
UI Programmer
 
Posts: 715
Joined: 08 Aug 2011, 09:07
Location: Bali
Has thanked: 183 times
Been thanked: 161 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Sloth » 17 Sep 2011, 14:14

Doublestrike wrote:Apparently quest event files hadn't been committed - but are, now. Cheers on the support, @Max. Not sure why these hiccups in SVN, all the time, very confusing, and people seem strangely quiet about why this is happening. My connection is slow, but SVN should be built to deal with that? I suppose the reason will show itself in time.
I don't use eclipse plug-ins for the SVN correspondence. I use TortoiseSVN which adds the needed functions to the explorer. It shows very clearly what I'm going to submit.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby friarsol » 17 Sep 2011, 14:20

Sloth wrote:I don't use eclipse plug-ins for the SVN correspondence. I use TortoiseSVN which adds the needed functions to the explorer. It shows very clearly what I'm going to submit.
I use Tortoise too. I've never been a big fan of Eclipse and can't imagine the plugin support being all that great either.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Max mtg » 17 Sep 2011, 17:21

Yes, I think to commit with tortoise is more reliable.

Found an exception after finishing a quest-quest battle
Code: Select all
java.lang.NullPointerException
   at forge.quest.gui.main.QuestSelectablePanel.<init>(QuestSelectablePanel.java:43)
   at forge.quest.gui.main.QuestQuestPanel.<init>(QuestQuestPanel.java:23)
   at forge.quest.gui.QuestMainPanel.createQuestPanel(QuestMainPanel.java:434)
   at forge.quest.gui.QuestMainPanel.refreshNextMatchPanel(QuestMainPanel.java:558)
   at forge.quest.gui.QuestMainPanel.refresh(QuestMainPanel.java:547)
   at forge.quest.gui.QuestMainPanel.initUI(QuestMainPanel.java:104)
   at forge.quest.gui.QuestMainPanel.<init>(QuestMainPanel.java:97)
   at forge.quest.gui.QuestFrame.<init>(QuestFrame.java:56)
   at forge.Gui_WinLose.quitButton_actionPerformed(Gui_WinLose.java:370)
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: Big commit, no dice / SVN hugely broken on r10194

Postby friarsol » 17 Sep 2011, 18:18

Yea I get this when trying to get into quest mode. It looks like there needs to be a null check somewhere. Probably here:

QuestMainPanel line 431
Code: Select all
        List<QuestQuest> quests = TEST.qem.generateQuests();
       
        for (QuestQuest qq : quests) {
// Add Null check here
            selpan = new QuestQuestPanel(qq);
            QuestPanel.add(selpan);
            selpan.addMouseListener(new SelectionAdapter(selpan));

            GuiUtils.addGap(QuestPanel, 3);
        }
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby friarsol » 18 Sep 2011, 02:43

I just played my first Quest and noticed a few things.

Firstly, I just hit Win 20, but was offered 6 Quests (all of the Basic Color decks, and White twice).

I choose to play one of the White decks and squeezed out a victor. But my White Rares were three random (non-white, non-rare) cards.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Rob Cashwalker » 18 Sep 2011, 04:51

max_mtg wrote:@Rob, I'm kinda sick right now (got flu or something like that), so didn't answer soon. The idea I would like to implement (can do it myself) is to remove cubes from deckmanager, put them together with settings and improve deckeditor to open that specific cardpools and edit the special options they have (num boosters, qty of cards of each rarity)
Sounds about right... though I don't want the cardlist portion to be in the same file as the custom draft format options.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Doublestrike » 18 Sep 2011, 08:45

@friarsol and Max - OK thanks for the heads up will fix ASAP.

=====

I'll have a look at Tortoise, then. Regarding Eclipse, apparently NetBeans is a better IDE anyway, say many reviews I read from people who have tried both. Later on perhaps we can discuss official recommendations and I'll update the documentation to match.

=====

Update Fixed the null bug and the wins vs. quest bug in r10508.

Update Booster pack bug fixed in r10511.
---
A joke is a very serious thing.
User avatar
Doublestrike
UI Programmer
 
Posts: 715
Joined: 08 Aug 2011, 09:07
Location: Bali
Has thanked: 183 times
Been thanked: 161 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Max mtg » 18 Sep 2011, 18:20

@Doublestrike, your changes have caused this exception:

java.lang.NullPointerException
at forge.quest.gui.main.QuestEventManager.generateChallenges(QuestEventManager.java:393)
at forge.quest.gui.QuestMainPanel.createChallengePanel(QuestMainPanel.java:431)
at forge.quest.gui.QuestMainPanel.refreshNextMatchPanel(QuestMainPanel.java:558)
at forge.quest.gui.QuestMainPanel.refresh(QuestMainPanel.java:547)
at forge.quest.gui.QuestMainPanel.initUI(QuestMainPanel.java:104)
at forge.quest.gui.QuestMainPanel.<init>(QuestMainPanel.java:97)
at forge.quest.gui.QuestFrame.<init>(QuestFrame.java:56)
at forge.quest.gui.QuestOptions.continueQuestButton_actionPerformed(QuestOptions.java:226)
at forge.quest.gui.QuestOptions$2.actionPerformed(QuestOptions.java:132)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
Last edited by Max mtg on 18 Sep 2011, 18:56, edited 1 time in total.
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: Big commit, no dice / SVN hugely broken on r10194

Postby Max mtg » 18 Sep 2011, 18:25

WTR: http://www.mediafire.com/?64pdutatiloaqb8 - use this save and continue quest.

Hint: learn the way quest data is saved and loaded. You cannot rename fields in QuestData unless you support saves from previous version.
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: Big commit, no dice / SVN hugely broken on r10194

Postby Jaedayr » 18 Sep 2011, 18:47

Max mtg wrote:Hint: learn the way quest data is saved and loaded. You cannot rename fields in QuestData unless you support saves from previous version.
Does this mean my quest is broken and unusable now? I still get the null error on R10529.
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 9 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 9 users online :: 0 registered, 0 hidden and 9 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 9 guests

Login Form