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 java.lang.NullPointerException #11654

Open
2 tasks done
ryan-carpenter opened this issue Aug 19, 2024 · 2 comments
Open
2 tasks done

Uncaught java.lang.NullPointerException #11654

ryan-carpenter opened this issue Aug 19, 2024 · 2 comments
Labels
groups status: waiting-for-feedback The submitter or other users need to provide more information about the issue
Milestone

Comments

@ryan-carpenter
Copy link

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)

  • 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. 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 #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 [email protected]/org.jabref.gui.LibraryTab.lambda$createMainTable$12(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.TableView$TableViewArrayListSelectionModel.fireCustomSelectedCellsListChangeEvent(Unknown Source)
	at [email protected]/javafx.scene.control.TableView$TableViewArrayListSelectionModel.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.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$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.add(Unknown Source)
	at java.base/java.util.AbstractList.add(Unknown Source)
	at [email protected]/com.sun.javafx.scene.control.SelectedCellsMap.add(Unknown Source)
	at [email protected]/javafx.scene.control.TableView$TableViewArrayListSelectionModel.select(Unknown Source)
	at [email protected]/javafx.scene.control.TableView$TableViewArrayListSelectionModel.select(Unknown Source)
	at [email protected]/javafx.scene.control.MultipleSelectionModelBase.shiftSelection(Unknown Source)
	at [email protected]/javafx.scene.control.MultipleSelectionModelBase.shiftSelection(Unknown Source)
	at [email protected]/javafx.scene.control.TableView$TableViewArrayListSelectionModel.updateSelection(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 java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at [email protected]/org.jabref.gui.util.FilteredListProxy.refilterListReflection(Unknown Source)
	at [email protected]/org.jabref.gui.maintable.MainTableDataModel.lambda$updateGroupMatches$18(Unknown Source)
	at [email protected]/org.jabref.gui.util.UiTaskExecutor.lambda$getJavaFXTask$3(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.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.concurrent.EventHelper.fireEvent(Unknown Source)
	at [email protected]/javafx.concurrent.Task.fireEvent(Unknown Source)
	at [email protected]/javafx.concurrent.Task.setState(Unknown Source)
	at [email protected]/javafx.concurrent.Task$TaskCallable.lambda$call$1(Unknown Source)
	at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
	at [email protected]/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
	at [email protected]/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at [email protected]/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$10(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

@koppor koppor added this to the 6.0-alpha milestone Aug 20, 2024
@koppor koppor added the groups label Aug 20, 2024
@LoayGhreeb
Copy link
Collaborator

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\;\;\;\;;
}
  • Selected the group "Not g1".
  • Dragged entries into "g1".
  • The entries will either hidden or the background color will change if in the floating mode.
  • Switching to "g1" or "g2" did not cause any exceptions.

@koppor koppor added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Aug 26, 2024
@ryan-carpenter
Copy link
Author

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).

  • the library contains about 120 user-created groups plus a long list created by JabRef from the keywords field.
  • The groups and search groups associated with the exception were user-created.
  • The search groups include Boolean statements without regular expressions.
  • Group names include non-alphanumeric characters such as : and /, with ; as the separator
  • Most of the groups are nested one level deep.

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\;;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
groups status: waiting-for-feedback The submitter or other users need to provide more information about the issue
Projects
None yet
Development

No branches or pull requests

3 participants