Trying to work on a project and a popup keeps appearing saying:
Cannot invoke “javafx.scene.control.TreeItem.getValue()” because the return value of “javafx.scene.control.TreeTableRow.getTreeItem()” is null
Please share the log file. Help > View log.
I have the same problem, my View log says this:
C:\Users\carme\ganttproject.log
GanttProject 3.3.3311
Settings file:
location: C:\Users\carme.ganttproject
size:4995
is readable: true
java.class.path: eclipsito.jar;C:\Program Files (x86)\GanttProject-3.3;C:\Program Files (x86)\GanttProject-3.3\eclipsito.jar;C:\Program Files (x86)\GanttProject-3.3\lib\slf4j-api-2.0.4.jar;C:\Program Files (x86)\GanttProject-3.3\lib\slf4j-jdk14-2.0.4.jar
java.home: C:\Program Files (x86)\GanttProject-3.3\runtime
java.ext.dirs: null
java.io.tmpdir: C:\Users\carme\AppData\Local\Temp
java.runtime.version: 17.0.11+12-LTS
java.vendor: BellSoft
java.vm.name: OpenJDK 64-Bit Server VM
java.vm.vendor: BellSoft
java.vm.version: 17.0.11+12-LTS
os.arch: amd64
os.name: Windows 10
os.version: 10.0
sun.java.command: com.bardsoftware.eclipsito.Launch --verbosity 1 --version-dirs plugins;~/.ganttproject.d/updates --app net.sourceforge.ganttproject.GanttProject
user.country: GB
user.dir: C:\Program Files (x86)\GanttProject-3.3
user.home: C:\Users\carme
user.language: en
user.timezone: Europe/Amsterdam
[2024-11-04 15:44:04] [INFO][org.jooq.Constants]
jOOQ tip of the day: You can nest collections directly in SQL using jOOQ’s SQL/XML or SQL/JSON support: Nesting Collections With jOOQ 3.14’s SQL/XML or SQL/JSON support – Java, SQL and jOOQ.
[2024-11-04 15:45:11] [WARN][net.sourceforge.ganttproject] Cannot invoke “javafx.scene.control.TreeItem.getValue()” because the return value of “javafx.scene.control.TreeTableRow.getTreeItem()” is null
java.lang.NullPointerException: Cannot invoke “javafx.scene.control.TreeItem.getValue()” because the return value of “javafx.scene.control.TreeTableRow.getTreeItem()” is null
at biz.ganttproject.ganttview.DragAndDropSupport.dragDetected(TaskTable.kt:1101)
at biz.ganttproject.ganttview.DragAndDropSupport.access$dragDetected(TaskTable.kt:1086)
at biz.ganttproject.ganttview.DragAndDropSupport$install$1.handle(TaskTable.kt:1092)
at biz.ganttproject.ganttview.DragAndDropSupport$install$1.handle(TaskTable.kt:1091)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.base/javafx.event.Event.fireEvent(Unknown Source)
at javafx.graphics/javafx.scene.Scene$DnDGesture.fireEvent(Unknown Source)
at javafx.graphics/javafx.scene.Scene$DnDGesture.process(Unknown Source)
at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Unknown Source)
at javafx.graphics/javafx.scene.Scene.processMouseEvent(Unknown Source)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.EmbeddedScene.lambda$mouseEvent$4(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.EmbeddedScene.lambda$mouseEvent$5(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
[2024-11-04 15:47:25] [WARN][net.sourceforge.ganttproject] Cannot invoke “javafx.scene.control.TreeItem.getValue()” because the return value of “javafx.scene.control.TreeTableRow.getTreeItem()” is null
java.lang.NullPointerException: Cannot invoke “javafx.scene.control.TreeItem.getValue()” because the return value of “javafx.scene.control.TreeTableRow.getTreeItem()” is null
at biz.ganttproject.ganttview.DragAndDropSupport.dragDetected(TaskTable.kt:1101)
at biz.ganttproject.ganttview.DragAndDropSupport.access$dragDetected(TaskTable.kt:1086)
at biz.ganttproject.ganttview.DragAndDropSupport$install$1.handle(TaskTable.kt:1092)
at biz.ganttproject.ganttview.DragAndDropSupport$install$1.handle(TaskTable.kt:1091)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.base/javafx.event.Event.fireEvent(Unknown Source)
at javafx.graphics/javafx.scene.Scene$DnDGesture.fireEvent(Unknown Source)
at javafx.graphics/javafx.scene.Scene$DnDGesture.process(Unknown Source)
at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Unknown Source)
at javafx.graphics/javafx.scene.Scene.processMouseEvent(Unknown Source)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.EmbeddedScene.lambda$mouseEvent$4(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.EmbeddedScene.lambda$mouseEvent$5(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Thanks for the log. It seems to be related to drag and drop in the task table. I don’t know how to reproduce the issue (please share a reproducible scenario if there is one), but it seems to be trivial to fix even without reproducing.
Some “drag” references for some of the fixes, in Java v17.0.13 release notes
https://docs.bell-sw.com/liberica-jdk/17.0.13b12/general/release-notes/