Я создал панель вкладок с четырьмя дочерними вкладками.Пользователь может добавлять и удалять вкладки, используя контекстное меню.Иногда, по-видимому, в непредсказуемые моменты, при добавлении и удалении вкладок, я получаю исключение NullPointerException, которое никогда не проходит через мой код.Соответственно, у меня проблемы с диагностикой.Любая идея, где я могу начать помимо медленного удаления кода в тестовом проекте, пока ошибка не исчезнет?
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at javafx.graphics/com.sun.javafx.scene.input.PickResultChooser.processOffer(PickResultChooser.java:185)
at javafx.graphics/com.sun.javafx.scene.input.PickResultChooser.offer(PickResultChooser.java:143)
at javafx.graphics/javafx.scene.Node.intersects(Node.java:5219)
at javafx.graphics/javafx.scene.Node$1.intersects(Node.java:543)
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.access$600(Region.java:147)
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:5192)
at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:803)
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.access$600(Region.java:147)
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:5192)
at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:803)
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.access$600(Region.java:147)
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:5192)
at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:803)
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.access$600(Region.java:147)
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:5192)
at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:803)
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.access$600(Region.java:147)
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:5192)
at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:803)
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.access$600(Region.java:147)
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:5192)
at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:803)
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.access$600(Region.java:147)
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:5192)
at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:803)
at javafx.graphics/javafx.scene.Parent.doPickNodeLocal(Parent.java:817)
at javafx.graphics/javafx.scene.Parent.access$500(Parent.java:79)
at javafx.graphics/javafx.scene.Parent$1.doPickNodeLocal(Parent.java:131)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.pickNodeLocalImpl(ParentHelper.java:108)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.pickNodeLocal(NodeHelper.java:128)
at javafx.graphics/javafx.scene.Node.pickNode(Node.java:5192)
at javafx.graphics/javafx.scene.Scene$MouseHandler.pickNode(Scene.java:3993)
at javafx.graphics/javafx.scene.Scene$MouseHandler.access$1300(Scene.java:3579)
at javafx.graphics/javafx.scene.Scene.pick(Scene.java:2029)
at javafx.graphics/javafx.scene.Scene.access$6800(Scene.java:172)
at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Scene.java:3805)
at javafx.graphics/javafx.scene.Scene$MouseHandler.access$1200(Scene.java:3579)
at javafx.graphics/javafx.scene.Scene.processMouseEvent(Scene.java:1849)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2588)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:397)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:434)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:390)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:433)
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:834)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at javafx.graphics/com.sun.javafx.scene.input.PickResultChooser.processOffer(PickResultChooser.java:185)
at javafx.graphics/com.sun.javafx.scene.input.PickResultChooser.offer(PickResultChooser.java:143)
at javafx.graphics/javafx.scene.Node.intersects(Node.java:5219)
at javafx.graphics/javafx.scene.Node$1.intersects(Node.java:543)
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.access$600(Region.java:147)
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:5192)
at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:803)
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.access$600(Region.java:147)
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:5192)
at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:803)
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.access$600(Region.java:147)
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:5192)
at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:803)
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.access$600(Region.java:147)
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:5192)
at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:803)
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.access$600(Region.java:147)
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:5192)
at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:803)
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.access$600(Region.java:147)
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:5192)
at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:803)
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.access$600(Region.java:147)
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:5192)
at javafx.graphics/javafx.scene.Parent.pickChildrenNode(Parent.java:803)
at javafx.graphics/javafx.scene.Parent.doPickNodeLocal(Parent.java:817)
at javafx.graphics/javafx.scene.Parent.access$500(Parent.java:79)
at javafx.graphics/javafx.scene.Parent$1.doPickNodeLocal(Parent.java:131)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.pickNodeLocalImpl(ParentHelper.java:108)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.pickNodeLocal(NodeHelper.java:128)
at javafx.graphics/javafx.scene.Node.pickNode(Node.java:5192)
at javafx.graphics/javafx.scene.Scene$MouseHandler.pickNode(Scene.java:3993)
at javafx.graphics/javafx.scene.Scene$MouseHandler.access$1300(Scene.java:3579)
at javafx.graphics/javafx.scene.Scene.pick(Scene.java:2029)
at javafx.graphics/javafx.scene.Scene.access$6800(Scene.java:172)
at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Scene.java:3805)
at javafx.graphics/javafx.scene.Scene$MouseHandler.access$1200(Scene.java:3579)
at javafx.graphics/javafx.scene.Scene.processMouseEvent(Scene.java:1849)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2588)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:397)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:434)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:390)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:433)
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:834)