Page 7 of 7

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

PostPosted: 18 Sep 2011, 19:00
by Max mtg
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.

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

PostPosted: 19 Sep 2011, 00:04
by Doublestrike
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.

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

PostPosted: 19 Sep 2011, 01:37
by Max mtg
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.

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

PostPosted: 19 Sep 2011, 03:15
by Doublestrike
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.

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

PostPosted: 19 Sep 2011, 03:21
by Jaedayr
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.

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

PostPosted: 19 Sep 2011, 03:26
by Doublestrike
OK thanks for that. I'll test some of my quest saves from before.

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

PostPosted: 19 Sep 2011, 03:52
by friarsol
Here's a zipped questdata.dat where I'm getting the same problem if you need it

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

PostPosted: 19 Sep 2011, 03:53
by Max mtg
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 :(

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

PostPosted: 19 Sep 2011, 04:47
by Doublestrike
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.

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

PostPosted: 19 Sep 2011, 10:59
by Doublestrike
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.

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

PostPosted: 19 Sep 2011, 11:59
by friarsol
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.

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

PostPosted: 19 Sep 2011, 13:35
by Doublestrike
@friarsol - OK you should be all set. Reward bug was fixed a bit back. Cheers for the test support.