Javafx exception in thread javafx application thread java lang nullpointerexception

JavaFX: Exception in thread «JavaFX Application Thread» java.lang.NullPointerException: Cannot invoke «com.sun.prism.GraphicsPipeline.is3DSupported()»

I am programming a JavaFX Application which shows an undecorated stage. To close my application, I use a button, which calls the method System.exit(0); The problem is that I get sometimes this exception without links to my code when I use it:

Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "com.sun.prism.GraphicsPipeline.is3DSupported()" because the return value of "com.sun.prism.GraphicsPipeline.getPipeline()" is null at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.isSupported(QuantumToolkit.java:1208) at javafx.graphics/com.sun.javafx.application.PlatformImpl.isSupportedImpl(PlatformImpl.java:960) at javafx.graphics/com.sun.javafx.application.PlatformImpl.isSupported(PlatformImpl.java:627) at javafx.graphics/javafx.application.Platform.isSupported(Platform.java:252) at javafx.graphics/com.sun.javafx.scene.input.PickResultChooser.processOffer(PickResultChooser.java:182) at javafx.graphics/com.sun.javafx.scene.input.PickResultChooser.offer(PickResultChooser.java:143) at javafx.graphics/javafx.scene.Node.intersects(Node.java:5226) at javafx.graphics/javafx.scene.Node$1.intersects(Node.java:544) at javafx.graphics/com.sun.javafx.scene.NodeHelper.intersects(NodeHelper.java:258) at javafx.graphics/javafx.scene.layout.Region.doPickNodeLocal(Region.java:3161) at javafx.graphics/javafx.scene.layout.Region$1.doPickNodeLocal(Region.java:184) at javafx.graphics/com.sun.javafx.scene.layout.RegionHelper.pickNodeLocalImpl(RegionHelper.java:104) at javafx.graphics/com.sun.javafx.scene.NodeHelper.pickNodeLocal(NodeHelper.java:128) at javafx.graphics/javafx.scene.Node.pickNode(Node.java:5199) at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:806) at javafx.graphics/javafx.scene.Parent$1.pickChildrenNode(Parent.java:136) at javafx.graphics/com.sun.javafx.scene.ParentHelper.pickChildrenNode(ParentHelper.java:113) at javafx.graphics/javafx.scene.layout.Region.doPickNodeLocal(Region.java:3160) at javafx.graphics/javafx.scene.layout.Region$1.doPickNodeLocal(Region.java:184) at javafx.graphics/com.sun.javafx.scene.layout.RegionHelper.pickNodeLocalImpl(RegionHelper.java:104) at javafx.graphics/com.sun.javafx.scene.NodeHelper.pickNodeLocal(NodeHelper.java:128) at javafx.graphics/javafx.scene.Node.pickNode(Node.java:5199) at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:806) at javafx.graphics/javafx.scene.Parent$1.pickChildrenNode(Parent.java:136) at javafx.graphics/com.sun.javafx.scene.ParentHelper.pickChildrenNode(ParentHelper.java:113) at javafx.graphics/javafx.scene.layout.Region.doPickNodeLocal(Region.java:3160) at javafx.graphics/javafx.scene.layout.Region$1.doPickNodeLocal(Region.java:184) at javafx.graphics/com.sun.javafx.scene.layout.RegionHelper.pickNodeLocalImpl(RegionHelper.java:104) at javafx.graphics/com.sun.javafx.scene.NodeHelper.pickNodeLocal(NodeHelper.java:128) at javafx.graphics/javafx.scene.Node.pickNode(Node.java:5199) at javafx.graphics/javafx.scene.Scene$MouseHandler.pickNode(Scene.java:3999) at javafx.graphics/javafx.scene.Scene.pick(Scene.java:2031) at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Scene.java:3809) at javafx.graphics/javafx.scene.Scene.processMouseEvent(Scene.java:1851) at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2584) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:409) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:299) at java.base/java.security.AccessController.doPrivileged(AccessController.java:391) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:447) at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:412) at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:446) at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(View.java:556) at javafx.graphics/com.sun.glass.ui.View.notifyMouse(View.java:942) at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174) at java.base/java.lang.Thread.run(Thread.java:832) 

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Читайте также:  Python capitalize each word

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in thread «JavaFX Application Thread» java.lang.NullPointerException #789

Exception in thread «JavaFX Application Thread» java.lang.NullPointerException #789

Comments

I run this Project, I’m getting NullPointerException

Exception in thread "JavaFX Application Thread" java.lang.NullPointerException at com.javabootstar.grofers.model.NGrofersApplicationFxController$1.run(NGrofersApplicationFxController.java:169) at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177) at java.lang.Thread.run(Unknown Source) 

The text was updated successfully, but these errors were encountered:

Источник

NullPointerException in JavaFX initialize method

I have controller and there I trying get INBOX folder from e-mail server. With downloading everything is ok. I can put this data(email subject,from,date) into TableView but. only when I am waiting for thread responsible for set this data in TableView. Code:

// The table and columns @FXML TableView itemTbl; @FXML TableColumn itemNameCol; @FXML TableColumn itemQtyCol; @FXML TableColumn itemTitleCol; // The table's data static ObservableList data; public void dataSet()< // Set up the table data itemNameCol.setCellValueFactory( new PropertyValueFactory("name") ); itemQtyCol.setCellValueFactory( new PropertyValueFactory("qty") ); itemTitleCol.setCellValueFactory( new PropertyValueFactory("title") ); data = FXCollections.observableArrayList(); itemTbl.setItems(data); > public void setEnemyEvent() < itemTbl.addEventFilter(MouseEvent.MOUSE_CLICKED, new EventHandler() < @Override public void handle(MouseEvent event) < if (event.getClickCount() == 2) < if(itemTbl.getSelectionModel().getSelectedItem()!=null)< System.out.println(itemTbl.getSelectionModel().getSelectedItem().name); >> > >); > @Override public void initialize(URL url, ResourceBundle rb) < setEnemyEvent(); dataSet(); Thread t = new Thread(new MessageLoop()); //HERE: t.start(); //of course normally here is try and catch t.join(); >//staric nested class "for loop" private static class MessageLoop implements Runnable < public void run() < try < EmailConnetion con = new EmailConnetion(); MainModel MainModel = new MainModel(); for(int i=0;icatch(AddressException e) < System.out.println("Error : " + "AddressException:"+i); >> > catch (NoSuchProviderException ex) < Logger.getLogger(SimpleController.class.getName()).log(Level.SEVERE, null, ex); >catch (MessagingException ex) < Logger.getLogger(SimpleController.class.getName()).log(Level.SEVERE, null, ex); >> > 
Exception in thread "Thread-3" java.lang.NullPointerException at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:291) at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:48) at com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList.callObservers(ReadOnlyUnbackedObservableList.java:74) at javafx.scene.control.TableView$TableViewArrayListSelectionModel$3.onChanged(TableView.java:1725) at com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(ListListenerHelper.java:134) at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:48) at com.sun.javafx.collections.ObservableListWrapper.callObservers(ObservableListWrapper.java:97) at com.sun.javafx.collections.ObservableListWrapper.clear(ObservableListWrapper.java:184) at javafx.scene.control.TableView$TableViewArrayListSelectionModel.quietClearSelection(TableView.java:2154) at javafx.scene.control.TableView$TableViewArrayListSelectionModel.updateSelection(TableView.java:1902) at javafx.scene.control.TableView$TableViewArrayListSelectionModel.access$2600(TableView.java:1681) at javafx.scene.control.TableView$TableViewArrayListSelectionModel$8.onChanged(TableView.java:1802) at com.sun.javafx.scene.control.WeakListChangeListener.onChanged(WeakListChangeListener.java:71) at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:291) at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:48) at com.sun.javafx.collections.ObservableListWrapper.callObservers(ObservableListWrapper.java:97) at com.sun.javafx.collections.ObservableListWrapper.add(ObservableListWrapper.java:154) at com.sun.javafx.collections.ObservableListWrapper.add(ObservableListWrapper.java:144) at javasplitpane.SimpleController$MessageLoop.run(SimpleController.java:95) at java.lang.Thread.run(Thread.java:722) 

This appear in different position, in fourteen email, thirty email. You have some ideas ? p.s I can’t wait for this downloading because it takes 20 sec. with 50 emails — I have to do it during initialize.

Читайте также:  Php date сегодняшняя дата

Источник

Java / JavaFX exception — how to determine fault

So I’m getting an exception and none of my code is listed in it. Is there a simple (quick, easy) way to tell whether the issue is in my code or if it’s (probably not) possibly a bug in Java, in this case, JavaFX? My code is a wrapper to a long-running script (a Lua script) that also itself (the Lua script) calls out to Bash scripts, in case that information is of any use. The exception seems to be fairly easy to reproduce, by clicking around the screen while a particular portion of the scripts are running—I think when it’s doubly shelled out to both Lua and Bash—as a matter of fact. (I have a thread, a Runnable, that reads the output stream from the Lua script and I generally have full control of my JavaFX GUI, logging results from the scripts, etc., except of course, once this exception occurs.) Here’s my exception:

Exception in thread "JavaFX Application Thread" java.lang.NullPointerException at javafx.scene.Scene$ClickCounter.access$7600(Scene.java:2985) at javafx.scene.Scene$ClickGenerator.preProcess(Scene.java:3081) at javafx.scene.Scene$ClickGenerator.access$8400(Scene.java:3051) at javafx.scene.Scene$MouseHandler.process(Scene.java:3302) at javafx.scene.Scene$MouseHandler.process(Scene.java:3164) at javafx.scene.Scene$MouseHandler.access$1900(Scene.java:3119) at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1559) at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2261) at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:228) at com.sun.glass.ui.View.handleMouseEvent(View.java:528) at com.sun.glass.ui.View.notifyMouse(View.java:922) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:82) at java.lang.Thread.run(Thread.java:722) 

Thanks for any pointers on how to do this in general (and in this case, specifically)! UPDATE: What I’d like to know is: Should I be debugging my code to determine the cause of this? Or is it clearly a JavaFX bug? If so, I’ll report it to the Oracle team responsible.

Источник

Оцените статью