Jump to content

NPE before starting script


Zummy

Recommended Posts

37 minutes ago, Alek said:

Can you post this again but with the actual text and not a screenshot?

java.lang.NullPointerException
	at org.osbot.rs07.api.util.GraphicUtilities.getMainInterfaceId(ei:122)
	at org.osbot.rs07.api.util.GraphicUtilities.cache(ei:82)
	at org.osbot.rs07.event.ScriptExecutor.IIiiIiiIiiiI(cg:256)
	at org.osbot.rs07.event.ScriptExecutor.start(cg:116)
	at org.osbot.y.run(wx:186)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
[INFO][Bot #1][09/10 07:01:35 PM]: Terminating script Iron_Miner_Rimmington...
[INFO][Bot #1][09/10 07:01:35 PM]: Script Iron_Miner_Rimmington has exited!
[INFO][Bot #1][09/10 07:01:35 PM]: Started script : Iron_Miner_Rimmington
[ERROR][09/10 07:01:35 PM]: Uncaught exception!
java.lang.NullPointerException
	at org.osbot.rs07.event.ScriptExecutor$3.run(cg:23)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

Thank you for looking into this!

Edited by Zummy
Link to comment
Share on other sites

12 minutes ago, Zummy said:
  Hide contents

Code

Thank you for looking into this!

Something doesn't seem quite right with the error you are giving me, can you PM me your source code?

Either the bot instance or methodprovider are null for you to be getting this error. Also please let me know all the CLI commands you are using and if you are using mirror mode or not.

Edit: Just realized you are using a custom login handler. You're most likely in resizable mode.

Link to comment
Share on other sites

I have the same problem with my custom login handler.

I am not on mirror mode and I am also not on resizable mode (which I've checked by starting a client manually).

The weird part is that I think the code does not really matter from the custom login handler, as the following script does not show anything in the logger. It just pushes the error and exits.

 

I tested it with this empty script, and started it via -allow norandoms. It gives the same error and does not log anything:

 

Spoiler

import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "", name = "NRT", info = "", version = 0.1, logo = "")
public final class Main extends Script  {

    @Override
    public final void onStart() {
        log("-allow norandom test");
    }

    @Override
    public final int onLoop() throws InterruptedException {
        return 1000;
    }
}

 

Link to comment
Share on other sites

3 minutes ago, Elysiano said:

I have the same problem with my custom login handler.

I am not on mirror mode and I am also not on resizable mode (which I've checked by starting a client manually).

The weird part is that I think the code does not really matter from the custom login handler, as the following script does not show anything in the logger. It just pushes the error and exits.

 

I tested it with this empty script, and started it via -allow norandoms. It gives the same error and does not log anything:

 

  Reveal hidden contents


import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "", name = "NRT", info = "", version = 0.1, logo = "")
public final class Main extends Script  {

    @Override
    public final void onStart() {
        log("-allow norandom test");
    }

    @Override
    public final int onLoop() throws InterruptedException {
        return 1000;
    }
}

 

Weird shit, I also tried several things but to no avail. Even without an onStart method the NPE is pointed at onStart().

Link to comment
Share on other sites

15 minutes ago, Elysiano said:

I have the same problem with my custom login handler.

I am not on mirror mode and I am also not on resizable mode (which I've checked by starting a client manually).

The weird part is that I think the code does not really matter from the custom login handler, as the following script does not show anything in the logger. It just pushes the error and exits.

 

I tested it with this empty script, and started it via -allow norandoms. It gives the same error and does not log anything:

 

  Hide contents


import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

@ScriptManifest(author = "", name = "NRT", info = "", version = 0.1, logo = "")
public final class Main extends Script  {

    @Override
    public final void onStart() {
        log("-allow norandom test");
    }

    @Override
    public final int onLoop() throws InterruptedException {
        return 1000;
    }
}

 

 

This^ Seems like no matter what, using "-allow norandoms", it triggers it.

Link to comment
Share on other sites

  • Alek locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...