Resolved Exceptions thrown when starting bots.

Discussion in 'Developer Support' started by Party, Apr 9, 2016.

  1. Similar to thread by @qverkk.

    Very basic script bot to steal nature runes from a chest in OSRS, no JavaFX or Swing used.

    Exception:
    Code (Text):
    1. java.lang.NullPointerException
    2.     at nul.IiiiiiiiII.do(Unknown Source)
    3.     at nul.IiiiiiiiII.special_uids(Unknown Source)
    4.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    5.     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    6.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    7.     at java.lang.reflect.Method.invoke(Method.java:601)
    8.     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
    9.     at sun.rmi.transport.Transport$1.run(Transport.java:177)
    10.     at sun.rmi.transport.Transport$1.run(Transport.java:174)
    11.     at java.security.AccessController.doPrivileged(Native Method)
    12.     at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
    13.     at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
    14.     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
    15.     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
    16.     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    17.     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    18.     at java.lang.Thread.run(Thread.java:722)
    19.     at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
    20.     at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
    21.     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
    22.     at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
    23.     at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
    24.     at com.sun.proxy.$Proxy8.special_uids(Unknown Source)
    25.     at nul.IiiiIIiIIIii.new(epb:12)
    26.     at nul.IiiiIIiIIIii.new(epb:15)
    27.     at com.runemate.game.api.hybrid.region.GameObjects.getLoaded(obc:4)
    28.     at com.runemate.game.api.hybrid.region.GameObjects.getLoaded(obc:198)
    29.     at com.runemate.game.api.hybrid.queries.GameObjectQueryBuilder.initialDataSet(ryb:237)
    30.     at com.runemate.game.api.hybrid.queries.QueryBuilder.results(bob:248)
    31.     at com.pBots.bots.Nature.tasks.TaskSteal.validate(TaskSteal.java:42)
    32.     at com.runemate.game.api.script.framework.task.TaskScript.onLoop(lrb:147)
    33.     at com.runemate.game.api.script.framework.LoopingScript.run(brb:234)
    34.     at com.runemate.game.api.script.framework.AbstractScript.start(exb:174)
    35.     at nul.iIiiiIiiIiiI.run(aic:232)
    From above exception:
    at com.pBots.bots.Nature.tasks.TaskSteal.validate(TaskSteal.java:42)

    Line 42 of that class and called like so:

    LocatableEntityQueryResults<GameObject> chest = GameObjects.newQuery().actions("Search for traps").results();

    Code (Text):
    1.     @Override
    2.     public boolean validate() {
    3.         Player player = Players.getLocal();
    4.         LocatableEntityQueryResults<GameObject> chest = GameObjects.newQuery().actions("Search for traps").results();
    5.         return player != null
    6.                 && chest != null
    7.                 && !chest.isEmpty()
    8.                 && !Inventory.isFull()
    9.                 && chest.nearest().distanceTo(player.getPosition()) < 5
    10.                 && player.getAnimationId() == -1;
    11.     }
    @Cloud

     
  2. Best Answer:
    Post #3 by Cloud, Apr 11, 2016
  3. I'm having the same issue.

    Line:
    Code (Text):
    1. LocatableEntityQueryResults<GameObject> banks = GameObjects.newQuery().actions("Bank").results();
    Exception:
    Code (Text):
    1. java.lang.NullPointerException
    2.     at nul.IiiiiiiiII.do(Unknown Source)
    3.     at nul.IiiiiiiiII.special_uids(Unknown Source)
    4.     at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
    5.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    6.     at java.lang.reflect.Method.invoke(Method.java:601)
    7.     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
    8.     at sun.rmi.transport.Transport$1.run(Transport.java:177)
    9.     at sun.rmi.transport.Transport$1.run(Transport.java:174)
    10.     at java.security.AccessController.doPrivileged(Native Method)
    11.     at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
    12.     at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
    13.     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
    14.     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
    15.     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    16.     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    17.     at java.lang.Thread.run(Thread.java:722)
    18.     at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
    19.     at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
    20.     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
    21.     at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
    22.     at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
    23.     at com.sun.proxy.$Proxy8.special_uids(Unknown Source)
    24.     at nul.IiiiIIiIIIii.new(epb:12)
    25.     at nul.IiiiIIiIIIii.new(epb:15)
    26.     at com.runemate.game.api.hybrid.region.GameObjects.getLoaded(obc:4)
    27.     at com.runemate.game.api.hybrid.region.GameObjects.getLoaded(obc:198)
    28.     at com.runemate.game.api.hybrid.queries.GameObjectQueryBuilder.initialDataSet(ryb:237)
    29.     at com.runemate.game.api.hybrid.queries.QueryBuilder.results(bob:248)
    30.     at com.TheVTM.bots.ClayWetanabe.Tasks.BankTask.validate(BankTask.java:37)
    31.     at com.runemate.game.api.script.framework.task.TaskScript.onLoop(lrb:147)
    32.     at com.runemate.game.api.script.framework.LoopingScript.run(brb:234)
    33.     at com.runemate.game.api.script.framework.AbstractScript.start(exb:174)
    34.     at nul.iIiiiIiiIiiI.run(aic:232)
     

Share This Page

Loading...