Khaleesi Posted August 10, 2016 Share Posted August 10, 2016 Mirror client version: mirror 2.1 with osbot 2.4.83 Console output / terminal output: Code used: RS2Object object = script.getObjects().closest("Altar"); Error: [ERROR][Bot #1][08/05 09:30:04 PM]: Error in script executor! java.lang.NullPointerException at org.osbot.rs07.api.Objects.getAll(ki:126) at org.osbot.rs07.api.EntityAPI.closest(fp:32) at org.osbot.rs07.api.EntityAPI.closest(fp:156) at org.osbot.rs07.api.EntityAPI.closest(fp:117) at org.khal.runecrafterv2.a.NuL.D(n:90) at org.khal.runecrafterv2.e.a.nUL.k(w:42) at org.khal.runecrafterv2.e.a.nUL.G(w:202) at org.khal.runecrafterv2.KhalRunecrafter.onLoop(db:210) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(vi:149) at java.lang.Thread.run(Unknown Source) Crash report if a crash occurred: / Script that you ran: Khal AIO Runecrafter Hooks that failed: None JVM/Browser bit version (32 / 64): java version "1.8.0_91" Java(TM) SE Runtime Environment (build 1.8.0_91-b15) Java HotSpot(TM) 64-Bit Server VM (build 25.91-b15, mixed mode) Link to comment Share on other sites More sharing options...
Abuse Posted August 10, 2016 Share Posted August 10, 2016 I can confrim this issue, also happens with getPlayers().closest(name); Link to comment Share on other sites More sharing options...
Khaleesi Posted August 18, 2016 Author Share Posted August 18, 2016 any on this? I'm having multiple people who have this issue. Link to comment Share on other sites More sharing options...
satyr Posted August 19, 2016 Share Posted August 19, 2016 I can confirm this issue similarly as well. In order to consistently NOT get NPE I null check the name, and definition using stream. So something like: objects.getAll().stream().filter(w -> w.getDefinition() != null && w.getDefinition().getName() != null) Then you can obviously add something to the effect of w.getDefinition.getName().equalsIgnoreCase("your filter") From there you can use .sorted() and a good lamda expression to sort by distance however you may like. Hope that helps. Link to comment Share on other sites More sharing options...
Winnie Posted August 22, 2016 Share Posted August 22, 2016 I can confirm this issue aswell. Link to comment Share on other sites More sharing options...
Khaleesi Posted August 29, 2016 Author Share Posted August 29, 2016 I can confirm this issue similarly as well. In order to consistently NOT get NPE I null check the name, and definition using stream. So something like: objects.getAll().stream().filter(w -> w.getDefinition() != null && w.getDefinition().getName() != null) Then you can obviously add something to the effect of w.getDefinition.getName().equalsIgnoreCase("your filter") From there you can use .sorted() and a good lamda expression to sort by distance however you may like. Hope that helps. I tried that but didn't work. Throws an error while trying to get all object. (org.osbot.rs07.api.Objects.getAll()) I'm guessing the mirror returns a null Objects object. Will be investigating this. Link to comment Share on other sites More sharing options...
satyr Posted August 30, 2016 Share Posted August 30, 2016 (edited) I tried that but didn't work. Throws an error while trying to get all object. (org.osbot.rs07.api.Objects.getAll()) I'm guessing the mirror returns a null Objects object. Will be investigating this. Hm, I will look into it as well. Where are you when it happens for you? Edited August 30, 2016 by satyr Link to comment Share on other sites More sharing options...
Khaleesi Posted August 30, 2016 Author Share Posted August 30, 2016 Hm, I will look into it as well. Where are you when it happens for you? When you enter a runecrafting altar, happends like every 2-3 runs. Link to comment Share on other sites More sharing options...
satyr Posted August 30, 2016 Share Posted August 30, 2016 When you enter a runecrafting altar, happends like every 2-3 runs. Any runecrafting alter? If so I will whip up a quick air rune crafter and see if I have an issue. Link to comment Share on other sites More sharing options...
Epicknight Posted August 30, 2016 Share Posted August 30, 2016 Do you have any delay when entering the alter before getting objects? Maybe it's trying to get objects before they have loaded into the client. Link to comment Share on other sites More sharing options...
satyr Posted August 30, 2016 Share Posted August 30, 2016 Do you have any delay when entering the alter before getting objects? Maybe it's trying to get objects before they have loaded into the client. I would imagine that part of the validate statement saying whether or not we are ready to execute involves making sure the character is within a certain area which means the area and objects should have loaded. 1 Link to comment Share on other sites More sharing options...
Khaleesi Posted September 8, 2016 Author Share Posted September 8, 2016 Do you have any delay when entering the alter before getting objects? Maybe it's trying to get objects before they have loaded into the client. I would imagine that part of the validate statement saying whether or not we are ready to execute involves making sure the character is within a certain area which means the area and objects should have loaded. Ya it doesn't matter unfortunately ... Tried get all the way to the root of the problem, but will still get the same thing over and over. Nobody can tell me the exact issue unfortunately Link to comment Share on other sites More sharing options...
Khaleesi Posted September 28, 2016 Author Share Posted September 28, 2016 Still having a lot of members report this issue... Link to comment Share on other sites More sharing options...
Madallday Posted September 28, 2016 Share Posted September 28, 2016 Still having a lot of members report this issue... no fix yet? still having problems at the nature altar:/ Link to comment Share on other sites More sharing options...
Khaleesi Posted October 17, 2016 Author Share Posted October 17, 2016 Can we please get an update on this, still getting multiple reports a day of this issue. 1 Link to comment Share on other sites More sharing options...