- Joined
- Dec 18, 2014
- Messages
- 398
- Thread Author
- #1
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:
Here's my code. I don't think there's potential for an error anywhere except for at my comment near the end.
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)
...
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;
}
};





