Jump to content

Anyone know what this error is about? Fries the client


Recommended Posts

yo dudes I got this going like 1000 times a second and my whole machine glitched out

I had a look at lines 240 and 210

210 is just a 300ms sleep

240 is this: if (myPlayer().isUnderAttack() && myPlayer().getInteracting() != null && myPlayer().getInteracting().getId() == 2005) {

Is it to do with external libraries the error or some multi threading something? I don't get it.

 

Spoiler

[ERROR][03/24 04:06:32 PM]: Uncaught exception!
java.lang.NullPointerException
    at org.osbot.rs07.input.mouse.ClientMouseEventHandler.generateBotMouseEvent(wl:240)
    at org.osbot.rs07.input.mouse.ClientMouseEventHandler.IiiIiiiIiii(wl:1)
    at org.osbot.rs07.input.mouse.ClientMouseEventHandler.mouseMoved(wl:210)
    at java.awt.Component.processMouseMotionEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(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.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.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)

 

 

Link to comment
Share on other sites

1 hour ago, TheCongregation said:

yo dudes I got this going like 1000 times a second and my whole machine glitched out

I had a look at lines 240 and 210

210 is just a 300ms sleep

240 is this: if (myPlayer().isUnderAttack() && myPlayer().getInteracting() != null && myPlayer().getInteracting().getId() == 2005) {

Is it to do with external libraries the error or some multi threading something? I don't get it.

 

  Hide contents

[ERROR][03/24 04:06:32 PM]: Uncaught exception!
java.lang.NullPointerException
    at org.osbot.rs07.input.mouse.ClientMouseEventHandler.generateBotMouseEvent(wl:240)
    at org.osbot.rs07.input.mouse.ClientMouseEventHandler.IiiIiiiIiii(wl:1)
    at org.osbot.rs07.input.mouse.ClientMouseEventHandler.mouseMoved(wl:210)
    at java.awt.Component.processMouseMotionEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(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.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.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)

 

 

Nullpointer on some code when trying to interact with it I beliieve, hard to tell with just 1 line of code 😉 
Show some more? :)

Edited by Khaleesi
Link to comment
Share on other sites

Posted (edited)
8 hours ago, Khaleesi said:

Nullpointer on some code when trying to interact with it I beliieve, hard to tell with just 1 line of code 😉 
Show some more? :)


Here in context is lines 206 to 246 which are in the onloop

I do semi-often get Osbot Error: "problem with finding Prayer Button ULTMATE STRENGTH"

but it never really harms or slows down things and so I usually ignore it
    

Spoiler

if (targetedPlayerName != null && !myPlayer().isUnderAttack()) {
        log("attack mode");
        if (getSkills().getDynamic(Skill.PRAYER) >= 1)
            {getPrayer().set(PrayerButton.ULTIMATE_STRENGTH, true);}
 210 -    sleep(random(200, 300));
        Player targetedPlayer = getPlayerByName(targetedPlayerName); // Get the Player object

        // Check if snare spell can be cast and it hasn't been casted yet
        if (!snareSpellCasted && canCastSnareSpell()) {
            castSnareSpell(targetedPlayer); 
            snareSpellCasted = true;
            snareCastTime = System.currentTimeMillis(); // Record the current time
            sleep(random(200, 300));
        }
        
        // Check if bind spell can be cast and it hasn't been casted yet
        if (!bindSpellCasted && canCastBindSpell()) {
            castBindSpell(targetedPlayer); 
            bindSpellCasted = true;
            bindCastTime = System.currentTimeMillis(); // Record the current time

            sleep(random(200, 300));
           
        }
        
        if (snareSpellCasted && System.currentTimeMillis() - snareCastTime >= SPELL_TIMEOUT) {
            snareSpellCasted = false;
        }
        if (bindSpellCasted && System.currentTimeMillis() - bindCastTime >= SPELL_TIMEOUT) {
            bindSpellCasted = false;
        }
    }
    
 // Check if the player is under attack and interacting with entity ID 2005
  240 -  if (myPlayer().isUnderAttack() && myPlayer().getInteracting() != null && myPlayer().getInteracting().getId() == 2005) {
        //log("Bloody demon");
        equipTank();
        checkAndEatApplePie();
        attackIfNotInteracting(targetedPlayerName);
    }
    

 

Edited by TheCongregation
Link to comment
Share on other sites

6 hours ago, TheCongregation said:


Here in context is lines 206 to 246 which are in the onloop

I do semi-often get Osbot Error: "problem with finding Prayer Button ULTMATE STRENGTH"

but it never really harms or slows down things and so I usually ignore it
    

  Hide contents

if (targetedPlayerName != null && !myPlayer().isUnderAttack()) {
        log("attack mode");
        if (getSkills().getDynamic(Skill.PRAYER) >= 1)
            {getPrayer().set(PrayerButton.ULTIMATE_STRENGTH, true);}
 210 -    sleep(random(200, 300));
        Player targetedPlayer = getPlayerByName(targetedPlayerName); // Get the Player object

        // Check if snare spell can be cast and it hasn't been casted yet
        if (!snareSpellCasted && canCastSnareSpell()) {
            castSnareSpell(targetedPlayer); 
            snareSpellCasted = true;
            snareCastTime = System.currentTimeMillis(); // Record the current time
            sleep(random(200, 300));
        }
        
        // Check if bind spell can be cast and it hasn't been casted yet
        if (!bindSpellCasted && canCastBindSpell()) {
            castBindSpell(targetedPlayer); 
            bindSpellCasted = true;
            bindCastTime = System.currentTimeMillis(); // Record the current time

            sleep(random(200, 300));
           
        }
        
        if (snareSpellCasted && System.currentTimeMillis() - snareCastTime >= SPELL_TIMEOUT) {
            snareSpellCasted = false;
        }
        if (bindSpellCasted && System.currentTimeMillis() - bindCastTime >= SPELL_TIMEOUT) {
            bindSpellCasted = false;
        }
    }
    
 // Check if the player is under attack and interacting with entity ID 2005
  240 -  if (myPlayer().isUnderAttack() && myPlayer().getInteracting() != null && myPlayer().getInteracting().getId() == 2005) {
        //log("Bloody demon");
        equipTank();
        checkAndEatApplePie();
        attackIfNotInteracting(targetedPlayerName);
    }
    

 

Can't do much with this as the actual interaction code isn't in these parts, I'm just assuming there are missing asome null checks before interacting with the targetedplayer or something, make sure to always null check an entity before interacting with it, same for items or whatever :)

Link to comment
Share on other sites

3 hours ago, Khaleesi said:

Can't do much with this as the actual interaction code isn't in these parts, I'm just assuming there are missing asome null checks before interacting with the targetedplayer or something, make sure to always null check an entity before interacting with it, same for items or whatever :)

its curious init... maybe unconciously I edited the script before tracking the lines, if I did I don't remember doing that and i'll post if it hits again and will attempt some more null checks. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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