Skip to content
New issue

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 when closing a library with groups #9997

Closed
2 tasks done
Siedlerchr opened this issue Jun 9, 2023 · 2 comments · Fixed by #10005
Closed
2 tasks done

Exception when closing a library with groups #9997

Siedlerchr opened this issue Jun 9, 2023 · 2 comments · Fixed by #10005
Labels
bug Confirmed bugs or reports that are very likely to be bugs groups
Milestone

Comments

@Siedlerchr
Copy link
Member

JabRef version

Latest development branch build (please note build date below)

Operating system

macOS

Details on version and operating system

mac os 13.4

Checked with the latest development build

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Open JabRef with a library containing groups and entries
  2. Close the library via the X at the tab
  3. Observe exception in the log:

java.lang.NullPointerException: Cannot invoke "javafx.scene.control.TreeItem.getValue()" because the return value of "javafx.scene.control.TreeTableView.getRoot()" is null
	at org.jabref/org.jabref.gui.groups.GroupTreeView.lambda$26(GroupTreeView.java:245)
	at javafx.base@20/javafx.beans.binding.Bindings$1.computeValue(Bindings.java:157)
	at javafx.base@20/javafx.beans.binding.BooleanBinding.get(BooleanBinding.java:161)
	at javafx.base@20/javafx.beans.binding.BooleanExpression.getValue(BooleanExpression.java:55)
	at javafx.base@20/javafx.beans.binding.BooleanBinding.getValue(BooleanBinding.java:59)
	at javafx.base@20/com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:177)
	at javafx.base@20/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.base@20/javafx.beans.binding.BooleanBinding.invalidate(BooleanBinding.java:180)
	at javafx.base@20/com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:52)
	at javafx.base@20/com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:348)
	at javafx.base@20/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.base@20/javafx.beans.property.ReadOnlyObjectPropertyBase.fireValueChangedEvent(ReadOnlyObjectPropertyBase.java:80)
	at javafx.base@20/javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:102)
	at javafx.base@20/javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:113)
	at javafx.base@20/javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:147)
	at javafx.controls@20/javafx.scene.control.TreeTableRow.setTreeItem(TreeTableRow.java:169)
	at javafx.controls@20/javafx.scene.control.TreeTableRow.updateTreeItem(TreeTableRow.java:515)
	at javafx.controls@20/javafx.scene.control.TreeTableRow.updateItem(TreeTableRow.java:432)
	at javafx.controls@20/javafx.scene.control.TreeTableRow.indexChanged(TreeTableRow.java:298)
	at javafx.controls@20/javafx.scene.control.IndexedCell.updateIndex(IndexedCell.java:128)
	at javafx.controls@20/javafx.scene.control.skin.VirtualFlow.setCellIndex(VirtualFlow.java:1806)
	at javafx.controls@20/javafx.scene.control.skin.VirtualFlow.addTrailingCells(VirtualFlow.java:2196)
	at javafx.controls@20/javafx.scene.control.skin.VirtualFlow.layoutChildren(VirtualFlow.java:1320)
	at javafx.controls@20/javafx.scene.control.skin.VirtualFlow$5.invalidated(VirtualFlow.java:889)
	at javafx.base@20/javafx.beans.property.IntegerPropertyBase.markInvalid(IntegerPropertyBase.java:113)
	at javafx.base@20/javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:148)
	at javafx.controls@20/javafx.scene.control.skin.VirtualFlow.setCellCount(VirtualFlow.java:904)
	at javafx.controls@20/javafx.scene.control.skin.TreeTableViewSkin.updateItemCount(TreeTableViewSkin.java:354)
	at javafx.controls@20/javafx.scene.control.skin.TreeTableViewSkin.setRoot(TreeTableViewSkin.java:326)
	at javafx.controls@20/javafx.scene.control.skin.TreeTableViewSkin.lambda$new$14(TreeTableViewSkin.java:134)
	at javafx.controls@20/com.sun.javafx.scene.control.ListenerHelper$4.changed(ListenerHelper.java:219)
	at javafx.base@20/com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:360)
	at javafx.base@20/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.base@20/javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(ObjectPropertyBase.java:106)
	at javafx.base@20/javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:113)
	at javafx.base@20/javafx.beans.property.ObjectPropertyBase$Listener.invalidated(ObjectPropertyBase.java:234)
	at javafx.base@20/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
	at javafx.base@20/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.base@20/javafx.beans.binding.ObjectBinding.invalidate(ObjectBinding.java:187)
	at javafx.base@20/com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:52)
	at javafx.base@20/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
	at javafx.base@20/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.base@20/javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(ObjectPropertyBase.java:106)
	at javafx.base@20/javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:113)
	at javafx.base@20/javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:147)
	at javafx.base@20/javafx.beans.property.ObjectProperty.setValue(ObjectProperty.java:78)
	at org.jabref/org.jabref.gui.groups.GroupTreeViewModel.onActiveDatabaseChanged(GroupTreeViewModel.java:154)
	at [email protected]/com.tobiasdiez.easybind.EasyBind.lambda$subscribe$1(EasyBind.java:493)
	at javafx.base@20/com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:360)
	at javafx.base@20/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.base@20/javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(ObjectPropertyBase.java:106)
	at javafx.base@20/javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:113)
	at javafx.base@20/javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:147)
	at org.jabref/org.jabref.gui.StateManager.setActiveDatabase(StateManager.java:141)
	at org.jabref/org.jabref.gui.JabRefFrame.lambda$23(JabRefFrame.java:683)
	at [email protected]/com.tobiasdiez.easybind.EasyBind.lambda$subscribe$1(EasyBind.java:493)
	at javafx.base@20/com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:360)
	at javafx.base@20/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.base@20/javafx.beans.property.ReadOnlyObjectPropertyBase.fireValueChangedEvent(ReadOnlyObjectPropertyBase.java:80)
	at javafx.base@20/javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:102)
	at javafx.base@20/javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:113)
	at javafx.base@20/javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:147)
	at javafx.controls@20/javafx.scene.control.SelectionModel.setSelectedItem(SelectionModel.java:105)
	at javafx.controls@20/javafx.scene.control.SingleSelectionModel.updateSelectedIndex(SingleSelectionModel.java:223)
	at javafx.controls@20/javafx.scene.control.SingleSelectionModel.clearSelection(SingleSelectionModel.java:68)
	at javafx.controls@20/javafx.scene.control.TabPane$TabPaneSelectionModel.lambda$new$0(TabPane.java:628)
	at javafx.base@20/javafx.collections.WeakListChangeListener.onChanged(WeakListChangeListener.java:88)
	at javafx.base@20/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:327)
	at javafx.base@20/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:71)
	at javafx.base@20/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:238)
	at javafx.base@20/javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
	at javafx.base@20/javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
	at javafx.base@20/javafx.collections.ObservableListBase.endChange(ObservableListBase.java:210)
	at javafx.base@20/javafx.collections.ModifiableObservableListBase.remove(ModifiableObservableListBase.java:190)
	at javafx.base@20/javafx.collections.ModifiableObservableListBase.remove(ModifiableObservableListBase.java:178)
	at org.jabref/org.jabref.gui.JabRefFrame.lambda$43(JabRefFrame.java:1265)
	at javafx.graphics@20/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at javafx.graphics@20/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
	at javafx.graphics@20/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

Appendix

...

Log File
Paste an excerpt of your log file here
@Siedlerchr Siedlerchr added bug Confirmed bugs or reports that are very likely to be bugs groups labels Jun 9, 2023
@koppor koppor added this to the v5.10 milestone Jun 11, 2023
@koppor
Copy link
Member

koppor commented Jun 11, 2023

I put it to a milestone, because closing of a library should work?!

@Siedlerchr
Copy link
Member Author

Closing works. Only the exception is logged. Seems like a mill check is missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs groups
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants