1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

StackOverFlow - possibly a client bug?

Discussion in 'Developer Support' started by Philosobyte, Dec 24, 2014.

  1. Philosobyte

    Joined:
    Dec 18, 2014
    Messages:
    398
    Likes Received:
    79
    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 (Text):
    1.  
    2. // the error
    3. Exception in thread "Bot-Ray's Miscellaneous" (03:49:25) java.lang.StackOverflowError
    4. (03:49:25)     at a.VG.short(yx:1233)
    5. (03:49:25)     at a.AC.byte(ar:39)
    6. (03:49:25)     at a.VG.byte(yx:619)
    7. (03:49:25)     at a.zl.byte(iwb:1223)
    8. (03:49:25)     at a.zl.byte(iwb:691)
    9. (03:49:25)     at a.zl.byte(iwb:1382)
    10. (03:49:25)     at a.OL.byte(eob:87)
    11. (03:49:25)     at a.an.byte(job:177)
    12. (03:49:25)     at a.vl.byte(sqb:228)
    13. (03:49:25)     at a.vl.byte(sqb:28)
    14. (03:49:25)     at a.vl.byte(sqb:28)
    15. // a million of those with the 28^^^^, then
    16. (03:49:25)     at a.vl.byte(sqb:152)
    17. (03:49:25)     at a.vl.byte(sqb:52)
    18. (03:49:25)     at a.vl.byte(sqb:28)
    19. (03:49:25)     at a.vl.byte(sqb:28)
    20. // and then a million more of the same thing, with the 28
    21. (03:49:25)     at a.vl.byte(sqb:28)
    22. (03:49:25)     at a.vl.byte(sqb:28)
    23. ...
    24.  
    Here's my code. I don't think there's potential for an error anywhere except for at my comment near the end.
    Code (Text):
    1.  
    2. //all relevant methods
    3.  
    4. public boolean openBank()
    5.     {
    6.         if(!Bank.isOpen())
    7.         {
    8.             Execution.delayUntil(() ->
    9.             {    Bank.open();
    10.                 return Bank.isOpen();
    11.             });
    12.         }
    13.         return true;
    14.     }
    15.  
    16.     public boolean closeBank()
    17.     {
    18.         if(Bank.isOpen())
    19.         {
    20.             Execution.delayUntil(() ->
    21.             {
    22.                 Bank.close();
    23.                 return !Bank.isOpen();
    24.             });
    25.         }
    26.         return true;
    27.     }
    28.  
    29. public boolean checkFamiliar()
    30.     {
    31.         if(Players.getLocal().getFamiliar() == null)
    32.         {
    33.             Execution.delayUntil(() ->
    34.             {
    35.                 Bank.withdraw(Data.FAMILIAR_ID, 1);
    36.                 return Inventory.contains(Data.FAMILIAR_ID);
    37.             });
    38.             closeBank();
    39.  
    40. //Getting stuck right here, in either the closeBank() immediately above or the delayUntil() immediately below.
    41.  
    42.             Execution.delayUntil(() -> Inventory.newQuery().filter(Data.FAMILIAR_FILTER).results().first().interact("Summon"));
    43.             openBank();
    44.         }
    45.         return true;
    46.     }
    47.  
    48. // in Data.java
    49.  
    50.     static final Filter<SpriteItem>FAMILIAR_FILTER = new Filter<SpriteItem>()
    51.             {
    52.                 @Override
    53.                 public boolean accepts(SpriteItem spriteItem)
    54.                 {
    55.                     return spriteItem.getId() == FAMILIAR_ID;
    56.                 }
    57.             };
    58.  
     
  2. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,938
    Likes Received:
    1,266
    Looks like a client issue caused by recursion. @Cloud thoughts?
     
  3. Philosobyte

    Joined:
    Dec 18, 2014
    Messages:
    398
    Likes Received:
    79
    I got another one with a different task.
    Code (Text):
    1.  
    2. Exception in thread "Bot-Ray's Nat Crafter" (09:32:03) java.lang.StackOverflowError
    3. (09:32:03)     at sun.awt.Win32GraphicsConfig.getBounds(Native Method)
    4. (09:32:03)     at sun.awt.Win32GraphicsConfig.getBounds(Unknown Source)
    5. (09:32:03)     at com.runemate.game.api.hybrid.local.Screen.getPhysicalBounds(twb:27)
    6. (09:32:03)     at a.vl.byte(sqb:186)
    7. (09:32:03)     at a.vl.byte(sqb:274)
    8. (09:32:03)     at a.vl.byte(sqb:152)
    9. (09:32:03)     at a.vl.byte(sqb:274)
    10. (09:32:03)     at a.vl.byte(sqb:152)
    11. (09:32:03)     at a.vl.byte(sqb:274)
    12. (09:32:03)     at a.vl.byte(sqb:152)
    13. (09:32:03)     at a.vl.byte(sqb:274)
    14. (09:32:03)     at a.vl.byte(sqb:152)
    15. ...
    16.  
    I manually teleported with a Spirit Graahk to the Hunter area before starting the test script bot snippet, and tried using this to get to the Nature altar.
    Code (Text):
    1.  
    2. @Override
    3.     public void onLoop()
    4.     {
    5.         Execution.delayUntil(() -> Traversal.getDefaultWeb().getPathBuilder().buildTo(Data.RUINS).step(true));
    6.         stop();
    7.        
    8.     }
    9.  
    10. //in Data.java
    11.  
    12. static final Coordinate RUINS = new Coordinate(2869, 3019, 0);
    13.  
    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.
     

Share This Page

Loading...