It is currently 11 Sep 2025, 22:52
   
Text Size

Big commit, no dice / SVN hugely broken on r10194

Post MTG Forge Related Programming Questions Here

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

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

Postby Max mtg » 18 Sep 2011, 19:00

Jaedayr wrote:
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.
Yes, due to this: http://svn.slightlymagic.net/websvn/dif ... &peg=10521

I hope Doublestrike will fix this problem.
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 » 19 Sep 2011, 00:04

Max mtg wrote:@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)
At work now but will fix when I get home. Could you explain a bit better how to reproduce this bug? Didn't come up in my testing.

Those files (questEasy.txt etc.) are obsolete, and the contents now generated automatically - it hopefully shouldn't have an effect on old saves. I'll test a few of mine too.
---
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 » 19 Sep 2011, 01:37

Doublestrike wrote:
Max mtg wrote:@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)
Could you explain a bit better how to reproduce this bug? Didn't come up in my testing.

Those files (questEasy.txt etc.) are obsolete, and the contents now generated automatically - it hopefully shouldn't have an effect on old saves. I'll test a few of mine too.
Max mtg wrote: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.
This is not about the difficulty.txt files

Read all the new messages in thread, please.
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 » 19 Sep 2011, 03:15

Max, the link you posted indicates missing lines at the beginning of the document:
which reads the files "questDecks-easy", "questDecks-medium","questDecks-hard"
which is what I was referring to.

I understand you're frustrated dealing with a Java "newb", but these snide little remarks are uncalled for.

I may make mistakes but I fix them. Testing brings out bugs. Experience prevents less of those bugs.

Ironically, if you had read my post, I was requesting a better explanation of reproducing the bug since it hadn't come up in my 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 Jaedayr » 19 Sep 2011, 03:21

I got the null error today when I clicked Continue Quest. I saved the quest data, started a new quest and everything seems to work fine.
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

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

Postby Doublestrike » 19 Sep 2011, 03:26

OK thanks for that. I'll test some of my quest saves from before.
---
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 friarsol » 19 Sep 2011, 03:52

Here's a zipped questdata.dat where I'm getting the same problem if you need it
Attachments
questData.zip
(2.6 KiB) Downloaded 306 times
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 » 19 Sep 2011, 03:53

Doublestrike wrote:Max, the link you posted indicates missing lines at the beginning of the document:
which reads the files "questDecks-easy", "questDecks-medium","questDecks-hard"
which is what I was referring to.

I understand you're frustrated dealing with a Java "newb", but these snide little remarks are uncalled for.

I may make mistakes but I fix them. Testing brings out bugs. Experience prevents less of those bugs.

Ironically, if you had read my post, I was requesting a better explanation of reproducing the bug since it hadn't come up in my testing.
Does it really indicate the missing files?
Those filenames were commented anyway and didn't have any influence on code while present

I meant to point at the following error:
Code: Select all
            for(QuestChallenge qc : allChallenges) {
                if (qc.getWinsReqd() <= questData.getWin() &&
                         !questData.getCompletedChallenges().contains(qc.getId())) {
                    unlockedChallengeIds.add(qc.getId());
                }
            }         
questData.getCompletedChallenges() is null because when the QuestData is saved, the xml-tags inside the save file are named after fields present in QuestData class. When you read the old save into a new codebase, serializer tries to restore recently renamed fields, does not locate them in old saves (searching by new names) and assigns nulls.

It's a pity you didn't want to figure that out by yourself :(
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 » 19 Sep 2011, 04:47

friarsol wrote:Here's a zipped questdata.dat where I'm getting the same problem if you need it
Great, thanks - I'll make sure this and others work, if any others are posted.

Doublestrike wrote:At work now but will fix when I get home.
And thanks for the tip to go with the last hint, Max, will fix soon.
---
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 Doublestrike » 19 Sep 2011, 10:59

OK folks, thanks for your patience, got some time free and nailed this bug in r10549.

Bad news first: those brave souls who tested have broken quest.dat files.

Good news next: I can fix them pretty easily. I just need to know the number of challenges you've won, so if you can post the file and give me an estimate of that number (or what you want it to be :) ) then I'll fix the file ASAP. I can start with yours, friarsol - how many challenge wins do you have?

More good news: People who haven't run a quest can now do so without breaking the old file. The fields should update automatically, and later on the confusing naming system can be phased out easily.
Last edited by Doublestrike on 19 Sep 2011, 13:07, edited 2 times in total.
---
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 friarsol » 19 Sep 2011, 11:59

Doublestrike wrote:Good news next: I can fix them pretty easily. I just need to know the number of challenges you've won, so if you can post the file and give me an estimate of that number (or what you want it to be :) ) then I'll fix the file ASAP. I can start with yours, friarsol - how many challenge wins do you have?
Maybe 1? I think I just played against the White guy and noticed the Reward bug and hadn't played another after that.
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 Doublestrike » 19 Sep 2011, 13:35

@friarsol - OK you should be all set. Reward bug was fixed a bit back. Cheers for the test support.
Attachments
friarsol fixed questData.zip
(2.64 KiB) Downloaded 370 times
---
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

Previous

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 14 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 14 users online :: 0 registered, 0 hidden and 14 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 14 guests

Login Form