Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

StackOverFlow - possibly a client bug?

Joined
Dec 18, 2014
Messages
398
Edit: This occurs consistently.
So... the mouse gets stuck immediately after closing the Bank, while it's supposed to be clicking on the familiar pouch. And after a few seconds, a StackOverFlow error occurs. I think this might be a client bug, unless you can find an error in my code.
Here's the error:
Code:
// the error
Exception in thread "Bot-Ray's Miscellaneous" (03:49:25) java.lang.StackOverflowError
(03:49:25)     at a.VG.short(yx:1233)
(03:49:25)     at a.AC.byte(ar:39)
(03:49:25)     at a.VG.byte(yx:619)
(03:49:25)     at a.zl.byte(iwb:1223)
(03:49:25)     at a.zl.byte(iwb:691)
(03:49:25)     at a.zl.byte(iwb:1382)
(03:49:25)     at a.OL.byte(eob:87)
(03:49:25)     at a.an.byte(job:177)
(03:49:25)     at a.vl.byte(sqb:228)
(03:49:25)     at a.vl.byte(sqb:28)
(03:49:25)     at a.vl.byte(sqb:28)
// a million of those with the 28^^^^, then
(03:49:25)     at a.vl.byte(sqb:152)
(03:49:25)     at a.vl.byte(sqb:52)
(03:49:25)     at a.vl.byte(sqb:28)
(03:49:25)     at a.vl.byte(sqb:28)
// and then a million more of the same thing, with the 28
(03:49:25)     at a.vl.byte(sqb:28)
(03:49:25)     at a.vl.byte(sqb:28)
...
Here's my code. I don't think there's potential for an error anywhere except for at my comment near the end.
Code:
//all relevant methods

public boolean openBank()
    {
        if(!Bank.isOpen())
        {
            Execution.delayUntil(() ->
            {    Bank.open();
                return Bank.isOpen();
            });
        }
        return true;
    }
  
    public boolean closeBank()
    {
        if(Bank.isOpen())
        {
            Execution.delayUntil(() ->
            {
                Bank.close();
                return !Bank.isOpen();
            });
        }
        return true;
    }

public boolean checkFamiliar()
    {
        if(Players.getLocal().getFamiliar() == null)
        {
            Execution.delayUntil(() ->
            {
                Bank.withdraw(Data.FAMILIAR_ID, 1);
                return Inventory.contains(Data.FAMILIAR_ID);
            });
            closeBank();

//Getting stuck right here, in either the closeBank() immediately above or the delayUntil() immediately below.

            Execution.delayUntil(() -> Inventory.newQuery().filter(Data.FAMILIAR_FILTER).results().first().interact("Summon"));
            openBank();
        }
        return true;
    }

// in Data.java

    static final Filter<SpriteItem>FAMILIAR_FILTER = new Filter<SpriteItem>()
            {
                @Override
                public boolean accepts(SpriteItem spriteItem)
                {
                    return spriteItem.getId() == FAMILIAR_ID;
                }
            };
 
Joined
Dec 18, 2014
Messages
398
I got another one with a different task.
Code:
Exception in thread "Bot-Ray's Nat Crafter" (09:32:03) java.lang.StackOverflowError
(09:32:03)     at sun.awt.Win32GraphicsConfig.getBounds(Native Method)
(09:32:03)     at sun.awt.Win32GraphicsConfig.getBounds(Unknown Source)
(09:32:03)     at com.runemate.game.api.hybrid.local.Screen.getPhysicalBounds(twb:27)
(09:32:03)     at a.vl.byte(sqb:186)
(09:32:03)     at a.vl.byte(sqb:274)
(09:32:03)     at a.vl.byte(sqb:152)
(09:32:03)     at a.vl.byte(sqb:274)
(09:32:03)     at a.vl.byte(sqb:152)
(09:32:03)     at a.vl.byte(sqb:274)
(09:32:03)     at a.vl.byte(sqb:152)
(09:32:03)     at a.vl.byte(sqb:274)
(09:32:03)     at a.vl.byte(sqb:152)
...

I manually teleported with a Spirit Graahk to the Hunter area before starting the test script snippet, and tried using this to get to the Nature altar.
Code:
@Override
    public void onLoop() 
    {
        Execution.delayUntil(() -> Traversal.getDefaultWeb().getPathBuilder().buildTo(Data.RUINS).step(true));
        stop();
       
    }

//in Data.java

static final Coordinate RUINS = new Coordinate(2869, 3019, 0);
The bot would walk in the completely opposite direction, towards the sea instead of the altar, and click at the same spot for a 10+ seconds before generating the above error.
 
Top