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

Uncaught exception occured for group change #8175

Open
2 tasks done
lc9275 opened this issue Oct 23, 2021 · 7 comments
Open
2 tasks done

Uncaught exception occured for group change #8175

lc9275 opened this issue Oct 23, 2021 · 7 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs groups maintable

Comments

@lc9275
Copy link

lc9275 commented Oct 23, 2021

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

JabRef 5.4--2021-10-18--4ffdaf2

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

Regularly, I have this exception. Cannot really find a way to reproduce it systematically, but happens often when I search/select a group.

java.lang.IndexOutofBoundsException

java.util.NoSuchElementException: java.lang.IndexOutOfBoundsException
at java.base/java.util.AbstractList$Itr.next(Unknown Source)
at java.base/java.util.Iterator.forEachRemaining(Unknown Source)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
at [email protected]/org.jabref.gui.maintable.MainTable.getSelectedEntries(Unknown Source)
at [email protected]/org.jabref.gui.LibraryTab.lambda$createMainTable$14(Unknown Source)
at [email protected]/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(Unknown Source)
at [email protected]/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source)
at [email protected]/javafx.collections.ObservableListBase.fireChange(Unknown Source)
at [email protected]/javafx.collections.ListChangeBuilder.commit(Unknown Source)
at [email protected]/javafx.collections.ListChangeBuilder.endChange(Unknown Source)
at [email protected]/javafx.collections.ObservableListBase.endChange(Unknown Source)
at [email protected]/com.sun.javafx.scene.control.SelectedItemsReadOnlyObservableList.lambda$new$0(Unknown Source)
at [email protected]/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(Unknown Source)
at [email protected]/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source)
at [email protected]/javafx.collections.ObservableListBase.fireChange(Unknown Source)
at [email protected]/javafx.collections.ListChangeBuilder.commit(Unknown Source)
at [email protected]/javafx.collections.ListChangeBuilder.endChange(Unknown Source)
at [email protected]/javafx.collections.ObservableListBase.endChange(Unknown Source)
at [email protected]/com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList._endChange(Unknown Source)
at [email protected]/javafx.scene.control.MultipleSelectionModelBase$SelectedIndicesList._endChange(Unknown Source)
at [email protected]/javafx.scene.control.ControlUtils.updateSelectedIndices(Unknown Source)
at [email protected]/javafx.scene.control.TableView$TableViewArrayListSelectionModel.fireCustomSelectedCellsListChangeEvent(Unknown Source)
at [email protected]/javafx.scene.control.TableView$TableViewArrayListSelectionModel.clearSelection(Unknown Source)
at [email protected]/javafx.scene.control.TableView$TableViewArrayListSelectionModel.updateDefaultSelection(Unknown Source)
at [email protected]/javafx.scene.control.TableView$TableViewArrayListSelectionModel.lambda$new$2(Unknown Source)
at [email protected]/javafx.collections.WeakListChangeListener.onChanged(Unknown Source)
at [email protected]/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(Unknown Source)
at [email protected]/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source)
at [email protected]/javafx.collections.ObservableListBase.fireChange(Unknown Source)
at [email protected]/javafx.collections.ListChangeBuilder.commit(Unknown Source)
at [email protected]/javafx.collections.ListChangeBuilder.endChange(Unknown Source)
at [email protected]/javafx.collections.ObservableListBase.endChange(Unknown Source)
at [email protected]/javafx.collections.transformation.SortedList.sourceChanged(Unknown Source)
at [email protected]/javafx.collections.transformation.TransformationList.lambda$getListener$0(Unknown Source)
at [email protected]/javafx.collections.WeakListChangeListener.onChanged(Unknown Source)
at [email protected]/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(Unknown Source)
at [email protected]/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source)
at [email protected]/javafx.collections.ObservableListBase.fireChange(Unknown Source)
at [email protected]/javafx.collections.transformation.FilteredList.refilter(Unknown Source)
at [email protected]/javafx.collections.transformation.FilteredList$1.invalidated(Unknown Source)
at [email protected]/javafx.beans.property.ObjectPropertyBase.markInvalid(Unknown Source)
at [email protected]/javafx.beans.property.ObjectPropertyBase$Listener.invalidated(Unknown Source)
at [email protected]/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
at [email protected]/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
at [email protected]/javafx.beans.binding.ObjectBinding.invalidate(Unknown Source)
at [email protected]/com.sun.javafx.binding.BindingHelperObserver.invalidated(Unknown Source)
at [email protected]/com.sun.javafx.binding.ListExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
at [email protected]/com.sun.javafx.binding.ListExpressionHelper.fireValueChangedEvent(Unknown Source)
at [email protected]/javafx.beans.property.ReadOnlyListPropertyBase.fireValueChangedEvent(Unknown Source)
at [email protected]/javafx.beans.property.ReadOnlyListWrapper.fireValueChangedEvent(Unknown Source)
at [email protected]/javafx.beans.property.ListPropertyBase.markInvalid(Unknown Source)
at [email protected]/javafx.beans.property.ListPropertyBase$Listener.invalidated(Unknown Source)
at [email protected]/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
at [email protected]/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
at [email protected]/javafx.beans.binding.ObjectBinding.invalidate(Unknown Source)
at [email protected]/com.sun.javafx.binding.BindingHelperObserver.invalidated(Unknown Source)
at [email protected]/com.sun.javafx.collections.MapListenerHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
at [email protected]/com.sun.javafx.collections.MapListenerHelper.fireValueChangedEvent(Unknown Source)
at [email protected]/com.sun.javafx.collections.ObservableMapWrapper.callObservers(Unknown Source)
at [email protected]/com.sun.javafx.collections.ObservableMapWrapper.put(Unknown Source)
at [email protected]/org.jabref.gui.StateManager.setSelectedGroups(Unknown Source)
at [email protected]/org.jabref.gui.groups.GroupTreeViewModel.lambda$onSelectedGroupChanged$3(Unknown Source)
at java.base/java.util.Optional.ifPresent(Unknown Source)
at [email protected]/org.jabref.gui.groups.GroupTreeViewModel.onSelectedGroupChanged(Unknown Source)
at [email protected]/com.tobiasdiez.easybind.EasyBind.lambda$subscribe$1(Unknown Source)
at [email protected]/com.sun.javafx.binding.ListExpressionHelper$Generic.notifyListeners(Unknown Source)
at [email protected]/com.sun.javafx.binding.ListExpressionHelper$Generic.fireValueChangedEvent(Unknown Source)
at [email protected]/com.sun.javafx.binding.ListExpressionHelper.fireValueChangedEvent(Unknown Source)
at [email protected]/javafx.beans.property.ListPropertyBase.fireValueChangedEvent(Unknown Source)
at [email protected]/javafx.beans.property.ListPropertyBase.lambda$new$0(Unknown Source)
at [email protected]/com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(Unknown Source)
at [email protected]/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source)
at [email protected]/javafx.collections.ObservableListBase.fireChange(Unknown Source)
at [email protected]/javafx.collections.ListChangeBuilder.commit(Unknown Source)
at [email protected]/javafx.collections.ListChangeBuilder.endChange(Unknown Source)
at [email protected]/javafx.collections.ObservableListBase.endChange(Unknown Source)
at [email protected]/javafx.collections.ModifiableObservableListBase.setAll(Unknown Source)
at [email protected]/javafx.beans.binding.ListExpression.setAll(Unknown Source)
at [email protected]/org.jabref.gui.groups.GroupTreeView.updateSelection(Unknown Source)
at [email protected]/org.jabref.gui.util.BindingsHelper$BidirectionalListBinding.onChanged(Unknown Source)
at [email protected]/com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(Unknown Source)
at [email protected]/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source)
at [email protected]/javafx.collections.ObservableListBase.fireChange(Unknown Source)
at [email protected]/javafx.collections.ListChangeBuilder.commit(Unknown Source)
at [email protected]/javafx.collections.ListChangeBuilder.endChange(Unknown Source)
at [email protected]/javafx.collections.ObservableListBase.endChange(Unknown Source)
at [email protected]/com.sun.javafx.scene.control.SelectedItemsReadOnlyObservableList.lambda$new$0(Unknown Source)
at [email protected]/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(Unknown Source)
at [email protected]/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source)
at [email protected]/javafx.collections.ObservableListBase.fireChange(Unknown Source)
at [email protected]/javafx.collections.ListChangeBuilder.commit(Unknown Source)
at [email protected]/javafx.collections.ListChangeBuilder.endChange(Unknown Source)
at [email protected]/javafx.collections.ObservableListBase.endChange(Unknown Source)
at [email protected]/com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList._endChange(Unknown Source)
at [email protected]/javafx.scene.control.MultipleSelectionModelBase$SelectedIndicesList._endChange(Unknown Source)
at [email protected]/javafx.scene.control.ControlUtils.updateSelectedIndices(Unknown Source)
at [email protected]/javafx.scene.control.TreeTableView$TreeTableViewArrayListSelectionModel.fireCustomSelectedCellsListChangeEvent(Unknown Source)
at [email protected]/javafx.scene.control.TreeTableView$TreeTableViewArrayListSelectionModel.clearAndSelect(Unknown Source)
at [email protected]/com.sun.javafx.scene.control.behavior.TableCellBehaviorBase.simpleSelect(Unknown Source)
at [email protected]/com.sun.javafx.scene.control.behavior.TableCellBehaviorBase.doSelect(Unknown Source)
at [email protected]/com.sun.javafx.scene.control.behavior.CellBehaviorBase.mousePressed(Unknown Source)
at [email protected]/com.sun.javafx.scene.control.inputmap.InputMap.handle(Unknown Source)
at [email protected]/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
at [email protected]/javafx.scene.Scene$MouseHandler.process(Unknown Source)
at [email protected]/javafx.scene.Scene.processMouseEvent(Unknown Source)
at [email protected]/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
at [email protected]/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
at [email protected]/com.sun.glass.ui.View.notifyMouse(Unknown Source)
at [email protected]/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at [email protected]/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException
at [email protected]/javafx.collections.transformation.SortedList.get(Unknown Source)
at [email protected]/javafx.scene.control.TableView$TableViewSelectionModel.getModelItem(Unknown Source)
at [email protected]/javafx.scene.control.MultipleSelectionModelBase$1.getModelItem(Unknown Source)
at [email protected]/com.sun.javafx.scene.control.SelectedItemsReadOnlyObservableList.get(Unknown Source)
... 145 more

Appendix

...

Log File
Paste an excerpt of your log file here
@Siedlerchr Siedlerchr changed the title Uncaught exception occured in Thread [JavaFX Application Thread, 5, main] Uncaught exception occured for group change Oct 23, 2021
@Siedlerchr
Copy link
Member

the error is coming from a change in the group selection triggering over the state manager a change in the main table.
Then this lead somehow to an error in the selected entries. But no idea why exactly it's happening.

Do you have manual groups or are that somehow automatic groups?

at [email protected]/org.jabref.gui.maintable.MainTable.getSelectedEntries(Unknown Source)
at [email protected]/org.jabref.gui.LibraryTab.lambda$createMainTable$14(Unknown Source)
at 
...
 at [email protected]/org.jabref.gui.StateManager.setSelectedGroups(Unknown Source)
at [email protected]/org.jabref.gui.groups.GroupTreeViewModel.lambda$onSelectedGroupChanged$3(Unknown Source)
at java.base/java.util.Optional.ifPresent(Unknown Source)
at [email protected]/org.jabref.gui.groups.GroupTreeViewModel.onSelectedGroupChanged(Unknown Source

@lc9275
Copy link
Author

lc9275 commented Oct 23, 2021

Thanks for looking into this! The groups are all manual.

It seems to occur mainly after I create a new entry, and then change group or click the search box

@lc9275
Copy link
Author

lc9275 commented Nov 2, 2021

Just a little follow up: this problem doesn't happen anymore; somehow it went away by itself. I have not installed a new version or anything like that. If it returns, I'll report back!

@jpmvferreira
Copy link

I installed Jabref recently and I have had several exceptions so far, which I ignored until today, when I decided to actually bother to report the bug, only to see that it's the same as the one which this issue is about.
After changing group on a relatively new library with only 2 manually created groups the following dialog is shown:

Uncaught exception occured in Thread[JavaFX Application Thread,5,main]
java.lang.IndexOutOfBoundsException
The exception stacktrace was:
java.util.NoSuchElementException: java.lang.IndexOutOfBoundsException
	at java.base/java.util.AbstractList$Itr.next(AbstractList.java:377)
	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
	at [email protected]/org.jabref.gui.maintable.MainTable.getSelectedEntries(MainTable.java:439)
	at [email protected]/org.jabref.gui.LibraryTab.lambda$createMainTable$15(LibraryTab.java:480)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
	at javafx.base/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:239)
	at javafx.base/javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
	at javafx.base/javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
	at javafx.base/javafx.collections.ObservableListBase.endChange(ObservableListBase.java:211)
	at javafx.controls/com.sun.javafx.scene.control.SelectedItemsReadOnlyObservableList.lambda$new$0(SelectedItemsReadOnlyObservableList.java:91)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
	at javafx.base/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:239)
	at javafx.base/javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
	at javafx.base/javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
	at javafx.base/javafx.collections.ObservableListBase.endChange(ObservableListBase.java:211)
	at javafx.controls/com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList._endChange(ReadOnlyUnbackedObservableList.java:64)
	at javafx.controls/javafx.scene.control.MultipleSelectionModelBase$SelectedIndicesList._endChange(MultipleSelectionModelBase.java:898)
	at javafx.controls/javafx.scene.control.ControlUtils.updateSelectedIndices(ControlUtils.java:208)
	at javafx.controls/javafx.scene.control.TableView$TableViewArrayListSelectionModel.fireCustomSelectedCellsListChangeEvent(TableView.java:3026)
	at javafx.controls/javafx.scene.control.TableView$TableViewArrayListSelectionModel.clearSelection(TableView.java:2802)
	at javafx.controls/javafx.scene.control.TableView$TableViewArrayListSelectionModel.updateDefaultSelection(TableView.java:2991)
	at javafx.controls/javafx.scene.control.TableView$TableViewArrayListSelectionModel.lambda$new$2(TableView.java:2180)
	at javafx.base/javafx.collections.WeakListChangeListener.onChanged(WeakListChangeListener.java:88)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
	at javafx.base/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:239)
	at javafx.base/javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
	at javafx.base/javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
	at javafx.base/javafx.collections.ObservableListBase.endChange(ObservableListBase.java:211)
	at javafx.base/javafx.collections.transformation.SortedList.sourceChanged(SortedList.java:111)
	at javafx.base/javafx.collections.transformation.TransformationList.lambda$getListener$0(TransformationList.java:106)
	at javafx.base/javafx.collections.WeakListChangeListener.onChanged(WeakListChangeListener.java:88)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
	at javafx.base/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:239)
	at javafx.base/javafx.collections.transformation.FilteredList.refilter(FilteredList.java:338)
	at javafx.base/javafx.collections.transformation.FilteredList$1.invalidated(FilteredList.java:102)
	at javafx.base/javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112)
	at javafx.base/javafx.beans.property.ObjectPropertyBase$Listener.invalidated(ObjectPropertyBase.java:234)
	at javafx.base/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
	at javafx.base/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.base/javafx.beans.binding.ObjectBinding.invalidate(ObjectBinding.java:176)
	at javafx.base/com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:52)
	at javafx.base/com.sun.javafx.binding.ListExpressionHelper$Generic.notifyListeners(ListExpressionHelper.java:584)
	at javafx.base/com.sun.javafx.binding.ListExpressionHelper$Generic.fireValueChangedEvent(ListExpressionHelper.java:548)
	at javafx.base/com.sun.javafx.binding.ListExpressionHelper.fireValueChangedEvent(ListExpressionHelper.java:103)
	at javafx.base/javafx.beans.property.ReadOnlyListPropertyBase.fireValueChangedEvent(ReadOnlyListPropertyBase.java:94)
	at javafx.base/javafx.beans.property.ReadOnlyListWrapper.fireValueChangedEvent(ReadOnlyListWrapper.java:106)
	at javafx.base/javafx.beans.property.ListPropertyBase.markInvalid(ListPropertyBase.java:221)
	at javafx.base/javafx.beans.property.ListPropertyBase$Listener.invalidated(ListPropertyBase.java:336)
	at javafx.base/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
	at javafx.base/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.base/javafx.beans.binding.ObjectBinding.invalidate(ObjectBinding.java:176)
	at javafx.base/com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:52)
	at javafx.base/com.sun.javafx.collections.MapListenerHelper$SingleInvalidation.fireValueChangedEvent(MapListenerHelper.java:125)
	at javafx.base/com.sun.javafx.collections.MapListenerHelper.fireValueChangedEvent(MapListenerHelper.java:72)
	at javafx.base/com.sun.javafx.collections.ObservableMapWrapper.callObservers(ObservableMapWrapper.java:115)
	at javafx.base/com.sun.javafx.collections.ObservableMapWrapper.put(ObservableMapWrapper.java:169)
	at [email protected]/org.jabref.gui.StateManager.setSelectedGroups(StateManager.java:108)
	at [email protected]/org.jabref.gui.groups.GroupTreeViewModel.lambda$onSelectedGroupChanged$3(GroupTreeViewModel.java:104)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at [email protected]/org.jabref.gui.groups.GroupTreeViewModel.onSelectedGroupChanged(GroupTreeViewModel.java:100)
	at [email protected]/com.tobiasdiez.easybind.EasyBind.lambda$subscribe$1(EasyBind.java:493)
	at javafx.base/com.sun.javafx.binding.ListExpressionHelper$Generic.notifyListeners(ListExpressionHelper.java:588)
	at javafx.base/com.sun.javafx.binding.ListExpressionHelper$Generic.fireValueChangedEvent(ListExpressionHelper.java:571)
	at javafx.base/com.sun.javafx.binding.ListExpressionHelper.fireValueChangedEvent(ListExpressionHelper.java:109)
	at javafx.base/javafx.beans.property.ListPropertyBase.fireValueChangedEvent(ListPropertyBase.java:201)
	at javafx.base/javafx.beans.property.ListPropertyBase.lambda$new$0(ListPropertyBase.java:57)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(ListListenerHelper.java:164)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
	at javafx.base/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:239)
	at javafx.base/javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
	at javafx.base/javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
	at javafx.base/javafx.collections.ObservableListBase.endChange(ObservableListBase.java:211)
	at javafx.base/javafx.collections.ModifiableObservableListBase.setAll(ModifiableObservableListBase.java:98)
	at javafx.base/javafx.beans.binding.ListExpression.setAll(ListExpression.java:378)
	at [email protected]/org.jabref.gui.groups.GroupTreeView.updateSelection(GroupTreeView.java:345)
	at [email protected]/org.jabref.gui.util.BindingsHelper$BidirectionalListBinding.onChanged(BindingsHelper.java:269)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(ListListenerHelper.java:164)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
	at javafx.base/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:239)
	at javafx.base/javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
	at javafx.base/javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
	at javafx.base/javafx.collections.ObservableListBase.endChange(ObservableListBase.java:211)
	at javafx.controls/com.sun.javafx.scene.control.SelectedItemsReadOnlyObservableList.lambda$new$0(SelectedItemsReadOnlyObservableList.java:91)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
	at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
	at javafx.base/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:239)
	at javafx.base/javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
	at javafx.base/javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
	at javafx.base/javafx.collections.ObservableListBase.endChange(ObservableListBase.java:211)
	at javafx.controls/com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList._endChange(ReadOnlyUnbackedObservableList.java:64)
	at javafx.controls/javafx.scene.control.MultipleSelectionModelBase$SelectedIndicesList._endChange(MultipleSelectionModelBase.java:898)
	at javafx.controls/javafx.scene.control.ControlUtils.updateSelectedIndices(ControlUtils.java:208)
	at javafx.controls/javafx.scene.control.TreeTableView$TreeTableViewArrayListSelectionModel.fireCustomSelectedCellsListChangeEvent(TreeTableView.java:3368)
	at javafx.controls/javafx.scene.control.TreeTableView$TreeTableViewArrayListSelectionModel.clearAndSelect(TreeTableView.java:2830)
	at javafx.controls/com.sun.javafx.scene.control.behavior.TableCellBehaviorBase.simpleSelect(TableCellBehaviorBase.java:213)
	at javafx.controls/com.sun.javafx.scene.control.behavior.TableCellBehaviorBase.doSelect(TableCellBehaviorBase.java:195)
	at javafx.controls/com.sun.javafx.scene.control.behavior.CellBehaviorBase.mousePressed(CellBehaviorBase.java:176)
	at javafx.controls/com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
	at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
	at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
	at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
	at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
	at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Scene.java:3897)
	at javafx.graphics/javafx.scene.Scene.processMouseEvent(Scene.java:1878)
	at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2623)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:301)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:450)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449)
	at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(View.java:557)
	at javafx.graphics/com.sun.glass.ui.View.notifyMouse(View.java:943)
	at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:290)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IndexOutOfBoundsException
	at javafx.base/javafx.collections.transformation.SortedList.get(SortedList.java:168)
	at javafx.controls/javafx.scene.control.TableView$TableViewSelectionModel.getModelItem(TableView.java:2032)
	at javafx.controls/javafx.scene.control.MultipleSelectionModelBase$1.getModelItem(MultipleSelectionModelBase.java:74)
	at javafx.controls/com.sun.javafx.scene.control.SelectedItemsReadOnlyObservableList.get(SelectedItemsReadOnlyObservableList.java:100)
	at java.base/java.util.AbstractList$Itr.next(AbstractList.java:371)
	... 145 more

This dialog was actually shown approximately 5 times and I had to close each of them.

System:

  • OS: Manjaro
  • Kernel: Linux 5.4.169-1-MANJARO
  • WM: i3
  • Java environment: java-17-openjdk
  • Installation method: AUR
  • Jabref version: 5.4-1

@Siedlerchr
Copy link
Member

Thanks for the detailed report. Unfortunately, I was not yet able to reproduce this locally in my environment, but I think the culprit might be somehow this line in the LIbraryTab

A group selection event triggers somehow this sselectionListener in the mainTable...
@tobiasdiez Any idea how this comes to be?

// Add the listener that binds selection to state manager (TODO: should be replaced by proper JavaFX binding as soon as table is implemented in JavaFX)
mainTable.addSelectionListener(listEvent -> stateManager.setSelectedEntries(mainTable.getSelectedEntries()));

@tobiasdiez
Copy link
Member

I guess something like group selection changes > some of the current entries are not part of the new group > they are not shown and thus deselected.

@jpmvferreira
Copy link

Nice guess, I selected an entry, switched to a group which that entry does not belong to and the exception showed.
However, doing it again didn't show the exception, not even after a reboot or even in a different library. It did show once though.

@ThiloteE ThiloteE added the bug Confirmed bugs or reports that are very likely to be bugs label Apr 25, 2022
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 maintable
Projects
None yet
Development

No branches or pull requests

5 participants