Skip to content

InputMismatchException when using = to search within library #14632

@rahul-p19

Description

@rahul-p19

JabRef version

Other (please describe below)

Operating system

macOS

Details on version and operating system

macOS 15.6.1

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. Open a library.
  2. Click inside the Search bar and type title = <some_word> (or any other field like year instead of title).
  3. As soon as you type =, before you're done typing <some_word> an Error - InputMismatchException shows up in the console (Search functionality stills works though).
    The search query is considered to be incomplete since there is no argument after = in that moment before <some_word> is typed.

Appendix

Log File
2025-12-16 23:42:32 [JavaFX Application Thread] org.jabref.model.search.query.SearchQuery.<init>()
ERROR: Search query Parsing error: org.antlr.v4.runtime.InputMismatchException
	at org.antlr.antlr4.runtime@4.13.2/org.antlr.v4.runtime.BailErrorStrategy.recoverInline(BailErrorStrategy.java:61)
	at org.jabref.jablib/org.jabref.search.SearchParser.searchValue(SearchParser.java:625)
	at org.jabref.jablib/org.jabref.search.SearchParser.comparison(SearchParser.java:503)
	at org.jabref.jablib/org.jabref.search.SearchParser.expression(SearchParser.java:396)
	at org.jabref.jablib/org.jabref.search.SearchParser.andExpression(SearchParser.java:221)
	at org.jabref.jablib/org.jabref.search.SearchParser.start(SearchParser.java:150)
	at org.jabref.jablib/org.jabref.model.search.query.SearchQuery.getStartContext(SearchQuery.java:101)
	at org.jabref.jablib/org.jabref.model.search.query.SearchQuery.<init>(SearchQuery.java:37)
	at org.jabref.jablib/org.jabref.model.search.query.SearchQuery.<init>(SearchQuery.java:30)
	at org.jabref/org.jabref.gui.preview.PreviewViewer.highlightLayoutText(PreviewViewer.java:243)
	at org.jabref/org.jabref.gui.preview.PreviewViewer.lambda$new$0(PreviewViewer.java:106)
	at javafx.base@25.0.1/com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:386)
	at javafx.base@25.0.1/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
	at javafx.base@25.0.1/javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:104)
	at javafx.base@25.0.1/javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:111)
	at javafx.base@25.0.1/javafx.beans.property.StringPropertyBase$Listener.invalidated(StringPropertyBase.java:231)
	at javafx.base@25.0.1/com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:376)
	at javafx.base@25.0.1/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl$TextProperty.fireValueChangedEvent(TextInputControl.java:1491)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl$TextProperty.markInvalid(TextInputControl.java:1495)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl$TextProperty.controlContentHasChanged(TextInputControl.java:1434)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl.lambda$new$0(TextInputControl.java:176)
	at javafx.base@25.0.1/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:147)
	at javafx.base@25.0.1/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl$ContentBase.fireValueChangedEvent(TextInputControl.java:149)
	at javafx.controls@25.0.1/javafx.scene.control.TextField$TextFieldContent.insert(TextField.java:88)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl.replaceText(TextInputControl.java:1296)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl.updateContent(TextInputControl.java:605)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl.replaceText(TextInputControl.java:597)
	at javafx.controls@25.0.1/javafx.scene.control.skin.TextFieldSkin.replaceText(TextFieldSkin.java:452)
	at javafx.controls@25.0.1/com.sun.javafx.scene.control.behavior.TextFieldBehavior.replaceText(TextFieldBehavior.java:189)
	at javafx.controls@25.0.1/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.defaultKeyTyped(TextInputControlBehavior.java:400)
	at javafx.controls@25.0.1/com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
	at javafx.base@25.0.1/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
	at javafx.base@25.0.1/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
	at javafx.base@25.0.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
	at javafx.base@25.0.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
	at javafx.base@25.0.1/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at javafx.base@25.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at javafx.base@25.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25.0.1/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at javafx.base@25.0.1/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.graphics@25.0.1/javafx.scene.Scene.processKeyEvent(Scene.java:2257)
	at javafx.graphics@25.0.1/javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2791)
	at javafx.graphics@25.0.1/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.get(GlassViewEventHandler.java:176)
	at javafx.graphics@25.0.1/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.get(GlassViewEventHandler.java:120)
	at javafx.graphics@25.0.1/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
	at javafx.graphics@25.0.1/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:204)
	at javafx.graphics@25.0.1/com.sun.glass.ui.View.handleKeyEvent(View.java:563)
	at javafx.graphics@25.0.1/com.sun.glass.ui.View.notifyKeyAndReturnConsumed(View.java:1008)
2025-12-16 23:42:32 [JavaFX Application Thread] org.jabref.model.search.query.SearchQuery.<init>()
ERROR: Search query Parsing error: org.antlr.v4.runtime.InputMismatchException
	at org.antlr.antlr4.runtime@4.13.2/org.antlr.v4.runtime.BailErrorStrategy.recoverInline(BailErrorStrategy.java:61)
	at org.jabref.jablib/org.jabref.search.SearchParser.searchValue(SearchParser.java:625)
	at org.jabref.jablib/org.jabref.search.SearchParser.comparison(SearchParser.java:503)
	at org.jabref.jablib/org.jabref.search.SearchParser.expression(SearchParser.java:396)
	at org.jabref.jablib/org.jabref.search.SearchParser.andExpression(SearchParser.java:221)
	at org.jabref.jablib/org.jabref.search.SearchParser.start(SearchParser.java:150)
	at org.jabref.jablib/org.jabref.model.search.query.SearchQuery.getStartContext(SearchQuery.java:101)
	at org.jabref.jablib/org.jabref.model.search.query.SearchQuery.<init>(SearchQuery.java:37)
	at org.jabref.jablib/org.jabref.model.search.query.SearchQuery.<init>(SearchQuery.java:30)
	at org.jabref/org.jabref.gui.preview.PreviewViewer.highlightLayoutText(PreviewViewer.java:243)
	at org.jabref/org.jabref.gui.preview.PreviewViewer.lambda$new$0(PreviewViewer.java:106)
	at javafx.base@25.0.1/com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:386)
	at javafx.base@25.0.1/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
	at javafx.base@25.0.1/javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:104)
	at javafx.base@25.0.1/javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:111)
	at javafx.base@25.0.1/javafx.beans.property.StringPropertyBase$Listener.invalidated(StringPropertyBase.java:231)
	at javafx.base@25.0.1/com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:376)
	at javafx.base@25.0.1/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl$TextProperty.fireValueChangedEvent(TextInputControl.java:1491)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl$TextProperty.markInvalid(TextInputControl.java:1495)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl$TextProperty.controlContentHasChanged(TextInputControl.java:1434)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl.lambda$new$0(TextInputControl.java:176)
	at javafx.base@25.0.1/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:147)
	at javafx.base@25.0.1/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl$ContentBase.fireValueChangedEvent(TextInputControl.java:149)
	at javafx.controls@25.0.1/javafx.scene.control.TextField$TextFieldContent.insert(TextField.java:88)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl.replaceText(TextInputControl.java:1296)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl.updateContent(TextInputControl.java:605)
	at javafx.controls@25.0.1/javafx.scene.control.TextInputControl.replaceText(TextInputControl.java:597)
	at javafx.controls@25.0.1/javafx.scene.control.skin.TextFieldSkin.replaceText(TextFieldSkin.java:452)
	at javafx.controls@25.0.1/com.sun.javafx.scene.control.behavior.TextFieldBehavior.replaceText(TextFieldBehavior.java:189)
	at javafx.controls@25.0.1/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.defaultKeyTyped(TextInputControlBehavior.java:400)
	at javafx.controls@25.0.1/com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
	at javafx.base@25.0.1/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
	at javafx.base@25.0.1/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
	at javafx.base@25.0.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
	at javafx.base@25.0.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
	at javafx.base@25.0.1/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at javafx.base@25.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at javafx.base@25.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base@25.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@25.0.1/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at javafx.base@25.0.1/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.graphics@25.0.1/javafx.scene.Scene.processKeyEvent(Scene.java:2257)
	at javafx.graphics@25.0.1/javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2791)
	at javafx.graphics@25.0.1/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.get(GlassViewEventHandler.java:176)
	at javafx.graphics@25.0.1/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.get(GlassViewEventHandler.java:120)
	at javafx.graphics@25.0.1/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
	at javafx.graphics@25.0.1/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:204)
	at javafx.graphics@25.0.1/com.sun.glass.ui.View.handleKeyEvent(View.java:563)
	at javafx.graphics@25.0.1/com.sun.glass.ui.View.notifyKeyAndReturnConsumed(View.java:1008)

Screenshots

Image Image

Metadata

Metadata

Labels

component: searchgood first issueAn issue intended for project-newcomers. Varies in difficulty.📌 Pinned📍 AssignedAssigned by assign-issue-action (or manually assigned)

Type

No fields configured for bug.

Projects

Status
Done
Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions