Resolved Nullpointer in GameObjectQueryBuilder#names()

Discussion in 'Client & Site Support' started by Defeat3d, Apr 17, 2015.

  1. Code (Text):
    1. (05:17:50) java.lang.NullPointerException
    2. (05:17:50)     at com.runemate.game.api.hybrid.util.Regex.getPatternForExactString(xpb:169)
    3. (05:17:50)     at com.runemate.game.api.hybrid.util.Regex.getPatternsForExactStrings(xpb:239)
    4. (05:17:50)     at com.runemate.game.api.hybrid.queries.GameObjectQueryBuilder.names(xvb:179)
    5. (05:17:50)     at productions.celestial.citadel.tasks.TeleportToCurrent.validate(TeleportToCurrent.java:25)
    6. (05:17:50)     at com.runemate.game.api.script.framework.task.TaskScript.onLoop(qxb:232)
    7. (05:17:50)     at com.runemate.game.api.script.framework.LoopingScript.run(htb:239)
    8. (05:17:50)     at com.runemate.game.api.script.framework.AbstractScript.start(jnb:156)
    9. (05:17:50)     at app.bj.run(ukb:214)
    My code:
    Code (Text):
    1.             final GameObjectQueryBuilder builder = GameObjects.newQuery().names(resource.getName()).actions(resource.getAction());
    resource#getName() is "Root".
     
  2. Best Answer:
    Post #2 by Cloud, Apr 18, 2015
  3. I'm pretty sure you're passing in null.
     
  4. Code (Text):
    1. TIMBER(false, Tab.WOODCUTTER, "Root", "Chop", 3, Teleport.WOODCUTTER)
    Root and Chop..
     
  5. The enum instance could be null
     
  6. Then resource.getName() should throw a NPE though?

    Maybe debug resource.getName() just to be absolutely sure what it's returning.
     
  7. Code (Text):
    1.         if (resource != null) {
    --- Double Post Merged, Apr 18, 2015, Original Post Date: Apr 18, 2015 ---
    I'll do that. It seems to happen when logged out or when loading into a new world a lot btw (entering a clan citadel puts you in a different world).
    --- Double Post Merged, Apr 19, 2015 ---
    I was indeed passing null because I'm retarded.
     
    SlashnHax likes this.

Share This Page

Loading...