JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.54k stars 2.47k forks source link

Uncaught java.lang.NullPointerException #11654

Open ryan-carpenter opened 3 weeks ago

ryan-carpenter commented 3 weeks ago

JabRef version

Latest development branch build (please note build date below)

Operating system

GNU / Linux

Details on version and operating system

openSUSE Tumbleweed with KDE Plasma 6.0.5

Checked with the latest development build (copy version output from About dialog)

Steps to reproduce the behaviour

  1. Select a search group
  2. Drag an entry to another group that excludes the entry from the search group
  3. Select another group => Uncaught exception

Possibly related to https://github.com/JabRef/jabref/issues/11628

JabRef 5.16--2024-08-13--1374813 Linux 6.9.9-1-default amd64 Java 21.0.2 JavaFX 22.0.2+4

Appendix

...

Log File ``` java.lang.NullPointerException at java.base/java.util.stream.ReferencePipeline$3$1.accept(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.AbstractPipeline.evaluate(Unknown Source) at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(Unknown Source) at java.base/java.util.stream.ReferencePipeline.toArray(Unknown Source) at java.base/java.util.stream.ReferencePipeline.toArray(Unknown Source) at java.base/java.util.stream.ReferencePipeline.toList(Unknown Source) at org.jabref@5.16.226/org.jabref.gui.LibraryTab.lambda$createMainTable$12(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source) at javafx.base@22.0.2/javafx.collections.ObservableListBase.fireChange(Unknown Source) at javafx.base@22.0.2/javafx.collections.ListChangeBuilder.commit(Unknown Source) at javafx.base@22.0.2/javafx.collections.ListChangeBuilder.endChange(Unknown Source) at javafx.base@22.0.2/javafx.collections.ObservableListBase.endChange(Unknown Source) at javafx.controls@22.0.2/com.sun.javafx.scene.control.SelectedItemsReadOnlyObservableList.lambda$new$0(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source) at javafx.base@22.0.2/javafx.collections.ObservableListBase.fireChange(Unknown Source) at javafx.base@22.0.2/javafx.collections.ListChangeBuilder.commit(Unknown Source) at javafx.base@22.0.2/javafx.collections.ListChangeBuilder.endChange(Unknown Source) at javafx.base@22.0.2/javafx.collections.ObservableListBase.endChange(Unknown Source) at javafx.controls@22.0.2/com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList._endChange(Unknown Source) at javafx.controls@22.0.2/javafx.scene.control.MultipleSelectionModelBase$SelectedIndicesList._endChange(Unknown Source) at javafx.controls@22.0.2/javafx.scene.control.ControlUtils.updateSelectedIndices(Unknown Source) at javafx.controls@22.0.2/javafx.scene.control.TableView$TableViewArrayListSelectionModel.fireCustomSelectedCellsListChangeEvent(Unknown Source) at javafx.controls@22.0.2/javafx.scene.control.TableView$TableViewArrayListSelectionModel.lambda$new$0(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source) at javafx.base@22.0.2/javafx.collections.ObservableListBase.fireChange(Unknown Source) at javafx.base@22.0.2/javafx.collections.ListChangeBuilder.commit(Unknown Source) at javafx.base@22.0.2/javafx.collections.ListChangeBuilder.endChange(Unknown Source) at javafx.base@22.0.2/javafx.collections.ObservableListBase.endChange(Unknown Source) at javafx.base@22.0.2/javafx.collections.transformation.SortedList.sourceChanged(Unknown Source) at javafx.base@22.0.2/javafx.collections.transformation.TransformationList.lambda$getListener$0(Unknown Source) at javafx.base@22.0.2/javafx.collections.WeakListChangeListener.onChanged(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source) at javafx.base@22.0.2/javafx.collections.ObservableListBase.fireChange(Unknown Source) at javafx.base@22.0.2/javafx.collections.ListChangeBuilder.commit(Unknown Source) at javafx.base@22.0.2/javafx.collections.ListChangeBuilder.endChange(Unknown Source) at javafx.base@22.0.2/javafx.collections.ObservableListBase.endChange(Unknown Source) at javafx.base@22.0.2/javafx.collections.ModifiableObservableListBase.add(Unknown Source) at java.base/java.util.AbstractList.add(Unknown Source) at javafx.controls@22.0.2/com.sun.javafx.scene.control.SelectedCellsMap.add(Unknown Source) at javafx.controls@22.0.2/javafx.scene.control.TableView$TableViewArrayListSelectionModel.select(Unknown Source) at javafx.controls@22.0.2/javafx.scene.control.TableView$TableViewArrayListSelectionModel.select(Unknown Source) at javafx.controls@22.0.2/javafx.scene.control.MultipleSelectionModelBase.shiftSelection(Unknown Source) at javafx.controls@22.0.2/javafx.scene.control.MultipleSelectionModelBase.shiftSelection(Unknown Source) at javafx.controls@22.0.2/javafx.scene.control.TableView$TableViewArrayListSelectionModel.updateSelection(Unknown Source) at javafx.controls@22.0.2/javafx.scene.control.TableView$TableViewArrayListSelectionModel.lambda$new$2(Unknown Source) at javafx.base@22.0.2/javafx.collections.WeakListChangeListener.onChanged(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source) at javafx.base@22.0.2/javafx.collections.ObservableListBase.fireChange(Unknown Source) at javafx.base@22.0.2/javafx.collections.ListChangeBuilder.commit(Unknown Source) at javafx.base@22.0.2/javafx.collections.ListChangeBuilder.endChange(Unknown Source) at javafx.base@22.0.2/javafx.collections.ObservableListBase.endChange(Unknown Source) at javafx.base@22.0.2/javafx.collections.transformation.SortedList.sourceChanged(Unknown Source) at javafx.base@22.0.2/javafx.collections.transformation.TransformationList.lambda$getListener$0(Unknown Source) at javafx.base@22.0.2/javafx.collections.WeakListChangeListener.onChanged(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source) at javafx.base@22.0.2/javafx.collections.ObservableListBase.fireChange(Unknown Source) at javafx.base@22.0.2/javafx.collections.transformation.FilteredList.refilter(Unknown Source) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.jabref@5.16.226/org.jabref.gui.util.FilteredListProxy.refilterListReflection(Unknown Source) at org.jabref@5.16.226/org.jabref.gui.maintable.MainTableDataModel.lambda$updateGroupMatches$18(Unknown Source) at org.jabref@5.16.226/org.jabref.gui.util.UiTaskExecutor.lambda$getJavaFXTask$3(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source) at javafx.base@22.0.2/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source) at javafx.base@22.0.2/javafx.event.Event.fireEvent(Unknown Source) at javafx.graphics@22.0.2/javafx.concurrent.EventHelper.fireEvent(Unknown Source) at javafx.graphics@22.0.2/javafx.concurrent.Task.fireEvent(Unknown Source) at javafx.graphics@22.0.2/javafx.concurrent.Task.setState(Unknown Source) at javafx.graphics@22.0.2/javafx.concurrent.Task$TaskCallable.lambda$call$1(Unknown Source) at javafx.graphics@22.0.2/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at javafx.graphics@22.0.2/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source) at javafx.graphics@22.0.2/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source) at javafx.graphics@22.0.2/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at javafx.graphics@22.0.2/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$10(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) ```
LoayGhreeb commented 3 weeks ago

I can't reproduce the issue.

I have the following library:

@Article{,
  title = {e1},
}

@Article{,
  title  = {e2},
  groups = {g1},
}

@Article{,
  title = {e3},
}

@Article{,
  title  = {e4},
  groups = {g2},
}

@Comment{jabref-meta: databaseType:bibtex;}

@Comment{jabref-meta: grouping:
0 AllEntriesGroup:;
1 SearchGroup:Not g1\;1\;groups != g1\;0\;0\;1\;\;\;\;;
1 StaticGroup:g1\;1\;0\;\;\;\;;
1 StaticGroup:g2\;1\;1\;\;\;\;;
}
ryan-carpenter commented 2 weeks ago

I am now on JabRef 5.16--2024-08-26--1620002 and will try to reproduce the exception. There isn't anything in the trace that I can decipher, so here are some details that could be important (guesses).

Here are some examples.

2 StaticGroup::mygroup-001/example\;2\;1\;0xcd5865ff\;\;A static-group description\;;
3 SearchGroup:buyme\;2\;groups=:paywall and file!="" and groups!=/exclude\;0\;0\;1\;0x008000ff\;CURRENCY_USD\;A search-group description\;;