JabRef / jabref

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

migration of search syntax throws exception and generates empty/defunct table #11752

Closed ilippert closed 1 month ago

ilippert commented 1 month ago

JabRef version

Latest development branch build (please note build date below)

Operating system

GNU / Linux

Details on version and operating system

JabRef 5.16--2024-09-10--ce9e34f Linux 6.10.8-200.fc40.x86_64 amd64 Java 21.0.2 JavaFX 22.0.2+4

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

Steps to reproduce the behaviour

  1. open database with old search group syntax
  2. migration assistant shows up :white_check_mark:
  3. agree to running the migration
  4. then exception occurs
  5. then migration seems to happening / running wheel shows up
  6. then in different test of JabRef nothing happens, (wheel continues to run for many minutes) or a blank table is presented.

Appendix

...

Log File ``` org.antlr.v4.runtime.misc.ParseCancellationException at org.jabref.merged.module@5.16.345/org.antlr.v4.runtime.BailErrorStrategy.recoverInline(Unknown Source) at org.jabref@5.16.345/org.jabref.search.SearchParser.name(Unknown Source) at org.jabref@5.16.345/org.jabref.search.SearchParser.comparison(Unknown Source) at org.jabref@5.16.345/org.jabref.search.SearchParser.expression(Unknown Source) at org.jabref@5.16.345/org.jabref.search.SearchParser.start(Unknown Source) at org.jabref@5.16.345/org.jabref.migrations.SearchToLuceneMigration.getStartContext(Unknown Source) at org.jabref@5.16.345/org.jabref.migrations.SearchToLuceneMigration.migrateToLuceneSyntax(Unknown Source) at org.jabref@5.16.345/org.jabref.gui.importer.actions.SearchGroupsMigrationAction.migrateGroups(Unknown Source) at org.jabref@5.16.345/org.jabref.gui.importer.actions.SearchGroupsMigrationAction.migrateGroups(Unknown Source) at java.base/java.util.Optional.ifPresent(Unknown Source) at org.jabref@5.16.345/org.jabref.gui.importer.actions.SearchGroupsMigrationAction.performAction(Unknown Source) at org.jabref@5.16.345/org.jabref.gui.importer.actions.OpenDatabaseAction.performPostOpenActions(Unknown Source) at org.jabref@5.16.345/org.jabref.gui.LibraryTab.onDatabaseLoadingSucceed(Unknown Source) at org.jabref@5.16.345/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) Caused by: org.antlr.v4.runtime.InputMismatchException ... 33 more ```
LoayGhreeb commented 1 month ago

@ilippert Could you share the search groups you have in the library? I saw the groups you posted at https://discourse.jabref.org/t/feedback-on-search-groups-syntax-update/4459/7 but I have a few questions:

Are these groups working as expected in JabRef v5.15?

ilippert commented 1 month ago

@ilippert Could you share the search groups you have in the library? I saw the groups you posted at https://discourse.jabref.org/t/feedback-on-search-groups-syntax-update/4459/7 but I have a few questions:

* The first search group has the query `Project =`, which seems incomplete. What result do you expect from this query? The same goes for the group with the query `teachingmodules =`.

* For the last group with the query `locationhardcopy=*`, what results are you expecting here as well?

same for all these queries: I want to show entries that have that field. And it works (before initiating "migrating"). still works as long as I do not agree to migration.

Does this suffice?

Are these groups working as expected in JabRef v5.15?

they have been working in the recent version before the migration assistant showed up.

koppor commented 1 month ago

same for all these queries: I want to show entries that have that field. And it works (before initiating "migrating").

I checked with JabRef 4.3.1 - no result

image

With RegEx, it works:

image


With the new syntax, the following should be the right query:

title:/.*/
koppor commented 1 month ago

@ilippert We had a devcall discussion, 50:50: One opinion: query did not work, thus we do not migrate, other opinion: migrate and accept that results may differ. WDYT?