我在我的一個屏幕上出現了一個奇怪的問題,我真的不知道該在哪裏看。 我在數據庫中查找項目,並在單獨的屏幕(不是實際屏幕,容器)中顯示它們的詳細信息。JavaFX ComboBox API中的NullPointerException
奇怪的部分是,該程序與大多數項目工作得很好,但在某些情況下,它從來沒有工作。堆棧跟蹤對我沒有任何幫助,因爲它們都不屬於我的源代碼。
親愛的同伴們,你對這個問題有什麼想法或暗示?
java.lang.NullPointerException
at com.sun.javafx.scene.control.skin.ComboBoxListViewSkin.getIndexOfComboBoxValueInItemsList(ComboBoxListViewSkin.java:444)
at com.sun.javafx.scene.control.skin.ComboBoxListViewSkin.updateDisplayNode(ComboBoxListViewSkin.java:392)
at com.sun.javafx.scene.control.skin.ComboBoxListViewSkin.getDisplayNode(ComboBoxListViewSkin.java:229)
at com.sun.javafx.scene.control.skin.ComboBoxBaseSkin.updateDisplayArea(ComboBoxBaseSkin.java:125)
at com.sun.javafx.scene.control.skin.ComboBoxBaseSkin.computePrefHeight(ComboBoxBaseSkin.java:180)
at javafx.scene.Parent.prefHeight(Parent.java:879)
at javafx.scene.layout.Region.prefHeight(Region.java:1384)
at javafx.scene.control.Control.computePrefHeight(Control.java:804)
at javafx.scene.Parent.prefHeight(Parent.java:879)
at javafx.scene.control.Control.prefHeight(Control.java:686)
at javafx.scene.layout.Region.computeChildPrefAreaHeight(Region.java:1599)
at javafx.scene.layout.Region.getMaxAreaHeight(Region.java:1721)
at javafx.scene.layout.Region.computeMaxPrefAreaHeight(Region.java:1689)
at javafx.scene.layout.HBox.computePrefHeight(HBox.java:394)
at javafx.scene.Parent.prefHeight(Parent.java:879)
at javafx.scene.layout.Region.prefHeight(Region.java:1384)
at javafx.scene.layout.Region.computeChildPrefAreaHeight(Region.java:1599)
at javafx.scene.layout.VBox.getAreaHeights(VBox.java:394)
at javafx.scene.layout.VBox.computePrefHeight(VBox.java:373)
at javafx.scene.Parent.prefHeight(Parent.java:879)
at javafx.scene.layout.Region.prefHeight(Region.java:1384)
at javafx.scene.layout.Region.computeChildPrefAreaHeight(Region.java:1599)
at javafx.scene.layout.Region.getMaxAreaHeight(Region.java:1721)
at javafx.scene.layout.Region.computeMaxPrefAreaHeight(Region.java:1689)
at javafx.scene.layout.HBox.computePrefHeight(HBox.java:394)
at javafx.scene.Parent.prefHeight(Parent.java:879)
at javafx.scene.layout.Region.prefHeight(Region.java:1384)
at javafx.scene.layout.Region.computeChildPrefAreaHeight(Region.java:1599)
at javafx.scene.layout.Region.getMaxAreaHeight(Region.java:1721)
at javafx.scene.layout.Region.computeMaxPrefAreaHeight(Region.java:1693)
at javafx.scene.layout.StackPane.computePrefHeight(StackPane.java:320)
at javafx.scene.Parent.prefHeight(Parent.java:879)
at javafx.scene.layout.Region.prefHeight(Region.java:1384)
at com.sun.javafx.scene.control.skin.ScrollPaneSkin.computeScrollNodeSize(ScrollPaneSkin.java:874)
at com.sun.javafx.scene.control.skin.ScrollPaneSkin.layoutChildren(ScrollPaneSkin.java:753)
at javafx.scene.Parent.layout(Parent.java:1018)
at javafx.scene.Parent.layout(Parent.java:1028)
at javafx.scene.Parent.layout(Parent.java:1028)
at javafx.scene.Parent.layout(Parent.java:1028)
at javafx.scene.Parent.layout(Parent.java:1028)
at javafx.scene.Parent.layout(Parent.java:1028)
at javafx.scene.Parent.layout(Parent.java:1028)
at javafx.scene.Parent.layout(Parent.java:1028)
at javafx.scene.Parent.layout(Parent.java:1028)
at javafx.scene.Parent.layout(Parent.java:1028)
at javafx.scene.Scene.layoutDirtyRoots(Scene.java:513)
at javafx.scene.Scene.doLayoutPass(Scene.java:484)
at javafx.scene.Scene.access$3900(Scene.java:169)
at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2199)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:363)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460)
at com.sun.javafx.tk.quantum.QuantumToolkit$9.run(QuantumToolkit.java:329)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73)
at java.lang.Thread.run(Thread.java:662)
當您從數據庫中獲取它們以查看它崩潰的項目時,是否嘗試過記錄項目? – Jias 2013-04-29 14:57:13
是的,我做了,我看不到任何項目之間的相關性...... – Fabinout 2013-04-29 14:58:58