Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

NPE before starting script

Featured Replies

Ever since 2.5.19 I'm having problems with my custom login handler, before this version everything was fine.

error.png

  • Author
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

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.

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;
    }
}

 

  • Author
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().

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.

  • Alek locked this topic
Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.