Resolved Exception thrown on bot load

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

  1. When loading bot (my own one which does not use JavaFX or Swing, pNatureThiever if you need to view source @Cloud ), an exception is thrown.

    Bot continues to "run" (Spectre UI still shows Pause/Stop) but is idle.

    Code (Text):
    1. Caused by: java.lang.UnsupportedOperationException: Calling methods that must query the session for information is no longer allowed within non-bot threads.
    2. java.lang.NullPointerException
    3.     at Source)
    4.     at nul.IiiiiiiiII.special_uids(Unknown Source)
    5.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    6.     at sun.reflect.NativeMethodAccessorImpl.invoke(
    7.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    8.     at java.lang.reflect.Method.invoke(
    9.     at sun.rmi.server.UnicastServerRef.dispatch(
    10.     at sun.rmi.transport.Transport$
    11.     at sun.rmi.transport.Transport$
    12.     at Method)
    13.     at sun.rmi.transport.Transport.serviceCall(
    14.     at sun.rmi.transport.tcp.TCPTransport.handleMessages(
    15.     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(
    16.     at sun.rmi.transport.tcp.TCPTransport$
    17.     at java.util.concurrent.ThreadPoolExecutor.runWorker(
    18.     at java.util.concurrent.ThreadPoolExecutor$
    19.     at
    20.     at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(
    21.     at sun.rmi.transport.StreamRemoteCall.executeCall(
    22.     at sun.rmi.server.UnicastRef.invoke(
    23.     at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(
    24.     at java.rmi.server.RemoteObjectInvocationHandler.invoke(
    25.     at com.sun.proxy.$Proxy8.special_uids(Unknown Source)
    26.     at
    27.     at
    28.     at
    29.     at
    30.     at
    31.     at
    32.     at rm.aUX.validate(x:105)
    33.     at
    34.     at
    35.     at
    36.     at

  2. Best Answer:
    Post #7 by Cloud, Apr 11, 2016
  3. You're calling a method that needs to query the game session. This needs to be done on the client thread by using script bot.getPlatform and calling it in a callable or runnable. By the looks of it you were trying to get the game objects from within some other thread that you've created.
  4. I thought so too, but nothing in his code leaves the bot thread i.e. no JavaFX/Swing Platform.
  5. I was using OSRS, yeah.
  6. Similar problem, OSRS aswell. RS3 works but super slow.
  7. Fixed for the next release.

Share This Page