Results 1 to 8 of 8

Thread: Error during session initialization

  1. #1
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    843

    Default Error during session initialization

    Started getting this error today with r18954. Appears to be a division by 0 error in HermitRequest.java?

    Code:
    Done checking allowed items.
    Session data refreshed.
    6 days until     Feast of Boris, Moxie bonus today and yesterday.
    Error during session     initialization
    It appears to occur at login at the point that (normally) the price-sharing update happens (which doesn't seem to actually occur and/or complete). But the error also seemed to be re-occuring at various points while my normal login script(s) ran. Wasn't clear to me that any particular ASH command was triggering it or if several different ones were.
    Attached Files
    Last edited by AlbinoRhino; 10-24-2018 at 05:57 AM.

  2. #2
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,182

    Default

    I did not get this. My prices are updating normally, as expected. I have nothing in my environment that would automatically/explicitly visit the hermit except to get clovers and those are out today for me.

  3. #3
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    843

    Default

    I logged in with my other account and everything worked perfectly fine. I then tried my alternate account again and still got the error. Not sure what is going on but it appears it may be specific to one account. Puzzled...

  4. #4
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    843

    Default

    In SewerRequest.java if I add the bolded line:

    Code:
        public static int currentWorthlessItemCost()
        {
            int x = SewerRequest.currentStarterItemCount();
            int gumPrice = SewerRequest.CHEWING_GUM.getPrice();
            RequestLogger.printLine( "gumPrice = "+gumPrice+" | x = "+x );
            return (int) Math.ceil( ( gumPrice / 4.0 ) * ( 17 - x ) );
        }
    I will get the result...

    gumPrice = 50 | x = 17

    So..if x = 17 ...this will return 0.

    If I add the bolded...

    Code:
        private static int currentItemCount( final AdventureResult[] items, final List<AdventureResult> list )
        {
            int count = 0;
            for ( AdventureResult item : items )
            {
                RequestLogger.printLine( "currentItemCount: count = "+count+" | item = "+item+" | item.getCount = "+item.getCount( list ) );
                count += item.getCount( list );
                if ( list == KoLConstants.inventory && KoLCharacter.hasEquipped( item ) )
                {
                    count += 1;
                }
            }
            return count;
        }
    I will get...

    currentItemCount: count = 0 | item = seal-skull helmet | item.getCount = 1
    currentItemCount: count = 1 | item = seal-clubbing club | item.getCount = 2
    currentItemCount: count = 3 | item = helmet turtle | item.getCount = 1
    currentItemCount: count = 4 | item = turtle totem | item.getCount = 2
    currentItemCount: count = 6 | item = ravioli hat | item.getCount = 1
    currentItemCount: count = 7 | item = pasta spoon | item.getCount = 2
    currentItemCount: count = 9 | item = Hollandaise helmet | item.getCount = 1
    currentItemCount: count = 10 | item = saucepan | item.getCount = 1
    currentItemCount: count = 11 | item = disco mask | item.getCount = 1
    currentItemCount: count = 12 | item = disco ball | item.getCount = 2
    currentItemCount: count = 14 | item = mariachi hat | item.getCount = 1
    currentItemCount: count = 15 | item = stolen accordion | item.getCount = 1
    currentItemCount: count = 16 | item = old sweatpants | item.getCount = 1
    gumPrice = 50 | x = 17


    Not sure why this is only happening with one character...it seems my other character must have multiples of some of these items too...everything worked just fine on one other test multi as well. Anyone have any ideas? I am kind of getting lost with the code beyond this point. I'm not clear what should be happening but it seems none of these items should be counted more than once?
    Last edited by AlbinoRhino; 10-25-2018 at 11:10 PM.

  5. #5
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    843

    Default

    I autosold the pasta spoons and seal-clubbing clubs (-4 to the count) and was finally able to login without the error.

  6. #6
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,447

    Default

    Well, pooh. StarterItemCount is supposed to return the number of unique items. Will fix.

  7. #7
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,447

    Default

    Revision 18959

  8. #8
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    843

    Default

    Cool! Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •