It is currently 16 Apr 2024, 06:45
   
Text Size

Bug - n must be possible

Moderators: Malban, CCGHQ Admins

Bug - n must be possible

Postby justme » 28 Jan 2011, 21:14

What happended:
When starting the quest game 'Twice?!', and no deck is selected, a dialog is returned: 'Game could not be initialized'. A java.lang.IllegalArgumentException: n must be positive is written to the log file.

Before the match, the game suggest you build a deck, but it's not listed as an prerequisite.
This error can possibly be caught in the GUI before game start, by checking the 'Name player' > 'Deck' box for a null value, and either return a warning message or disbale the button
Code: Select all
b.setEnabled ( false );
Steps to reproduce:
1) Apply quest 'twice?!'
2) make sure deck inputbox is empty (under Player name)
3) Click 'start game' button

Log:
http://www.filedropper.com/28012011215019

(couldn't attach with .log or .txt extension)
User avatar
justme
 
Posts: 38
Joined: 22 Jan 2011, 00:45
Has thanked: 0 time
Been thanked: 0 time

Re: Bug - n must be possible

Postby Malban » 30 Jan 2011, 10:15

Hi,

I am not able to reproduce this behaviour. Perhaps I fixed it in my codebase already. Here is a snipped of the corresponding code:

Code: Select all
    private void jButtonStarQuestModeActionPerformed(java.awt.event.ActionEvent evt)                                                     
    {                                                         
        mParent.preStartMatch();
        if (jComboBoxDeckComputerQuest.getSelectedIndex()==-1) return;
        if (jComboBoxComputerQuest.getSelectedIndex()==-1) return;
        if (jComboBoxDeckPlayer.getSelectedIndex()==-1) return;
As you see amongst the first things I do when the start game button is pressed is to look if all decks are selected.

I can´t image how you got this bug, if I didn´t change the coding.
Will have a look in svn what I did last...

Malban
Homepage of JPortal: http://jportalgame.de/
Malban
DEVELOPER
 
Posts: 84
Joined: 26 Apr 2010, 14:11
Has thanked: 0 time
Been thanked: 12 times

Re: Bug - n must be possible

Postby justme » 30 Jan 2011, 14:09

I have no clue why, but as you can see from the log I attached, I did get this error yesterday. Today, I can't reproduce it either.

With my default persisent player, the game automatically chose the first deck in the list, if I hadn't selected one.
So I created a new testplayer, did the same with him, but this time no error message was given, and the game wouldn't start (since there were no decks for the game to auto select).

the conclusion must be, that my JRE (Sun's 1.6_16) got unstable last night
User avatar
justme
 
Posts: 38
Joined: 22 Jan 2011, 00:45
Has thanked: 0 time
Been thanked: 0 time


Return to JPortal

Who is online

Users browsing this forum: No registered users and 16 guests


Who is online

In total there are 16 users online :: 0 registered, 0 hidden and 16 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 16 guests

Login Form