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

Bug PathBuilder always builds null path

Discussion in 'Developer Support' started by Gper, Apr 29, 2020.

  1. Gper

    Joined:
    Mar 27, 2019
    Messages:
    6
    Likes Received:
    0
    I've been having issues getting pathing to work. Building a path using the default web to any coordinate always returns a null value.

    What I've tried:
    • Reinstalling RuneMate, Java, OSRS, also clearing caches
    • Running this on different computer on a different network
    • Pathing to a coordinate in different areas (Varrock, Falador, Lumbridge)
    • Pathing at different lengths (10 tiles away to a whole town away)
    • Running an old bot which used to work years ago, however now cannot find a path.

    This is what I reproduce my problem with:

    Code (Text):
    1. public class ExampleBot extends LoopingBot {
    2.     @Override
    3.     public void onLoop() {
    4.         Coordinate coordinate = new Coordinate(3235, 3218, 0); // Any reachable coordinate doesn't work
    5.         Path path = Traversal.getDefaultWeb().getPathBuilder().buildTo(coordinate);
    6.         if (path == null) {
    7.             Environment.getLogger().println(BotLogger.Level.DEBUG, "This is always logged.");
    8.         } else {
    9.             Environment.getLogger().println(BotLogger.Level.DEBUG, "This is never logged.");
    10.         }
    11.     }
    12. }
    Does anyone have any ideas as to why it's not working for me?
     
  2. Snufalufugus

    Joined:
    Aug 23, 2015
    Messages:
    1,961
    Likes Received:
    757
    Web is being depreciated soon last I heard. I wouldn't recommend using it.
     
  3. Gper

    Joined:
    Mar 27, 2019
    Messages:
    6
    Likes Received:
    0
    Oh right. Is there an alternative or something replacing it? I feel like it would be really tedious predefining my own paths for long distances.
     
  4. Snufalufugus

    Joined:
    Aug 23, 2015
    Messages:
    1,961
    Likes Received:
    757
    IDK all the details, I'd read through the #dev channel history in Slack and you might find more.
     
  5. Gper

    Joined:
    Mar 27, 2019
    Messages:
    6
    Likes Received:
    0
    Cheers, thanks for letting me know!

    I'd still like to somehow figure out this null pathing issue in the meantime if anyone's got any ideas at all.
     
  6. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,938
    Likes Received:
    1,266
    There are no plans to "deprecate web" without a clear migration plan to a comparably featured alternative. As such, using the default web is both supported and encouraged. Please retry the same test case as I suspect the issue was related to some unplanned maintenance we were doing around the time you posted. Let us know if the problem persists.

    @Gper
     
  7. Gper

    Joined:
    Mar 27, 2019
    Messages:
    6
    Likes Received:
    0
    Thanks for the info!

    I just reran the script bot and it still returns null for paths. It seems like the bots I run from the store fail to path to locations as well. They all either stand still forever or fall back to another pathing technique which tries to walk across water/inaccessible areas.

    I've had this problem ongoing for 4 days so I'm tearing my hair out trying to fix it haha.
     
  8. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,938
    Likes Received:
    1,266
    Can you please provide test cases, e.g. start and destination pairs, that fail after validating that they are indeed traversable?
     
  9. CuppaJava

    CuppaJava cuppa.drink(java);

    Joined:
    Mar 13, 2018
    Messages:
    6,113
    Likes Received:
    1,371
    Web traversal wasn't working for me either when I tried to use it about a week ago, also returning null, which also happened the last time I tried to use it (in a different location) a few months ago. And I also heard on slack that web was being deprecated/generally not working properly right now, but I haven't been keeping up with slack much so that's anecdotal.

    I'm not on my main computer right now so I don't have the actual code, but it was between two close points that were easily walkable, even by the other simple traversal methods (eg bresenham).
     
  10. Gper

    Joined:
    Mar 27, 2019
    Messages:
    6
    Likes Received:
    0
    I've actually found some coordinates which successfully generate a path.
    I tried to webpath between each pair of these coordinates:

    Code (Text):
    1. Coordinate(3235, 3218, 0) // Outside lumbridge castle
    2. Coordinate(3269, 3331, 0) // Y path from lumbridge to varrock
    3. Coordinate(3227, 3337, 0) // Path just south of varrock dark wizards
    4. Coordinate(3210, 3382, 0) // Varrock south gate
    5. Coordinate(3212, 3423, 0) // Varrock square
    6. Coordinate(3183, 3436, 0) // Varrock west bank
    7. Coordinate(3127, 3414, 0) // Path from Varrock to Barbarian village
    8. Coordinate(3083, 3418, 0) // Barbarian village
    9. Coordinate(3022, 3424, 0) // Path northeast of Falador, between Falador and Barbarian Village
    10. Coordinate(2965, 3382, 0) // Falador square
    11. Coordinate(2997, 3381, 0) // Falador park
    The only ones which could find a path were from/to:
    • Varrock south gate and Varrock square
    • Path northeast of Falador and Falador square

    It seems like some part of the pathfinding is currently broken a bit.
     
    #10 Gper, May 1, 2020
    Last edited: May 1, 2020
  11. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,938
    Likes Received:
    1,266
    Thanks @Gper. We will add these to our test suite. @Cloud
     

Share This Page

Loading...