- Joined
- Jan 9, 2016
- Messages
- 33
- Thread Author
- #1
I've asked about this on the developers chat, but only got one response that didn't work. So I'll post it here.
I've implemented an embeddable ui and when I run my bot on my system through intellij it works fine, but when I run it from the bot store I receive the error because of a null pointer from the input stream. I assume it means it can't find the resource, but I honestly do not know why. Any and all help is greatly appreciated. Thanks in advance.
Null Pointer
AgilFXGui
Line 42 is : loader.load(stream.get());
I've implemented an embeddable ui and when I run my bot on my system through intellij it works fine, but when I run it from the bot store I receive the error because of a null pointer from the input stream. I assume it means it can't find the resource, but I honestly do not know why. Any and all help is greatly appreciated. Thanks in advance.
Null Pointer
Code:
java.util.concurrent.ExecutionException: java.lang.NullPointerException: inputStream is null.
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at nul.iiiIIIiiiiiI.initialize(jna:88)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
at nul.iiiiiiiiiIii.byte(xh:156)
at nul.iiiiiiiiiIii.byte(xh:209)
at nul.iiiIIIiiiiiI.(jna:137)
at nul.IIIiIIiiIiIi.byte(slb:1)
at nul.iIiIiIiIIIii.byte(zsa:22)
at nul.IiiIiIiiIIIi.byte(mqa:1046)
at nul.IiiIiIiiIIIi.call(mqa:2269)
at javafx.concurrent.Task$TaskCallable.call(Task.java:1423)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException: inputStream is null.
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2455)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2425)
at com.crash.bots.agil_titan.ui.AgilFXGui.(AgilFXGui.java:42)
at com.crash.bots.agil_titan.Agil_Titan.botInterfaceProperty(Agil_Titan.java:69)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
... 1 more
AgilFXGui
Code:
public class AgilFXGui extends GridPane implements Initializable {
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
setVisible(true);
}
public AgilFXGui(Agil_Titan bot) {
FXMLLoader loader = new FXMLLoader();
Future<InputStream> stream = bot.getPlatform().invokeLater(() -> Resources.getAsStream("com/crash/bots/agil_titan/ui/AgilGui.fxml"));
loader.setController(new AgilUIController(bot));
loader.setRoot(this);
try {
loader.load(stream.get());
} catch (IOException | InterruptedException | ExecutionException e) {
System.err.println("Error loading GUI");
e.printStackTrace();
}
}
}
Line 42 is : loader.load(stream.get());