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

IndexOutOfBoundsException while selecting web search result entries in a particular order #11081

Closed
2 tasks done
subhramit opened this issue Mar 23, 2024 · 4 comments · Fixed by #11107
Closed
2 tasks done

Comments

@subhramit
Copy link
Member

subhramit commented Mar 23, 2024

JabRef version

5.12 (latest release)

Operating system

Windows

Details on version and operating system

Windows 11 Home 23H2

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. Go to File -> New library
  2. On the Web search panel on the bottom left select any source from the dropdown.
  3. Type any valid query and click Search. You'll see a list of entries as results.
  4. Precondition: Make sure that for your query, there are at least 3 entries as results.
  5. Select any two entries one after another, the second entry being "after" the first (in the "downward" order of the list of results).
    For example, let's say for 6 consecutive entries as results, we index them as 1, 2, 3, 4, 5 and 6, select entries 3 and 5.
  6. Now, select any result which comes "before" the first entry we selected in step 5 (in "upward" order of the list of results).
    For example, select entry 2 (or 1).
  7. You will get the following error: "Uncaught exception occurred in Thread[#42,JavaFX Application Thread,5,main]"
    Entire stack trace is attached as log in the Appendix.

Appendix

image
See Log File below for entire stack trace:

Log File ``` java.lang.IndexOutOfBoundsException: [ fromIndex: -1, toIndex: 0, size: 3 ] at org.controlsfx.controls@11.2.0/impl.org.controlsfx.collections.ReadOnlyUnbackedObservableList.subList(ReadOnlyUnbackedObservableList.java:110) at javafx.base@22/javafx.collections.ListChangeListener$Change.getAddedSubList(ListChangeListener.java:243) at org.controlsfx.controls@11.2.0/org.controlsfx.control.CheckBitSetModelBase.lambda$new$2(CheckBitSetModelBase.java:110) at javafx.base@22/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:327) at javafx.base@22/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:71) at javafx.base@22/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:246) at org.controlsfx.controls@11.2.0/impl.org.controlsfx.collections.ReadOnlyUnbackedObservableList.callObservers(ReadOnlyUnbackedObservableList.java:44) at org.controlsfx.controls@11.2.0/org.controlsfx.control.CheckBitSetModelBase.lambda$new$1(CheckBitSetModelBase.java:99) at javafx.base@22/com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(ListListenerHelper.java:162) at javafx.base@22/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:71) at javafx.base@22/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:246) at org.controlsfx.controls@11.2.0/impl.org.controlsfx.collections.ReadOnlyUnbackedObservableList.callObservers(ReadOnlyUnbackedObservableList.java:44) at org.controlsfx.controls@11.2.0/org.controlsfx.control.CheckBitSetModelBase.check(CheckBitSetModelBase.java:259) at org.controlsfx.controls@11.2.0/org.controlsfx.control.CheckBitSetModelBase.toggleCheckState(CheckBitSetModelBase.java:249) at org.controlsfx.controls@11.2.0/org.controlsfx.control.CheckBitSetModelBase.toggleCheckState(CheckBitSetModelBase.java:240) at org.jabref@100.0.0/org.jabref.gui.importer.ImportEntriesDialog.lambda$initialize$8(ImportEntriesDialog.java:179) at org.jabref@100.0.0/org.jabref.gui.util.ViewModelListCellFactory$1.lambda$updateItem$0(ViewModelListCellFactory.java:180) at javafx.base@22/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) at javafx.base@22/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232) at javafx.base@22/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189) at javafx.base@22/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) at javafx.base@22/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at javafx.base@22/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@22/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@22/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@22/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@22/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@22/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@22/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@22/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@22/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@22/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at javafx.base@22/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49) at javafx.base@22/javafx.event.Event.fireEvent(Event.java:198) at javafx.graphics@22/javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3689) at javafx.graphics@22/javafx.scene.Scene$MouseHandler.process(Scene.java:3994) at javafx.graphics@22/javafx.scene.Scene.processMouseEvent(Scene.java:1891) at javafx.graphics@22/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2709) at javafx.graphics@22/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411) at javafx.graphics@22/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:301) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at javafx.graphics@22/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:450) at javafx.graphics@22/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:430) at javafx.graphics@22/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449) at javafx.graphics@22/com.sun.glass.ui.View.handleMouseEvent(View.java:551) at javafx.graphics@22/com.sun.glass.ui.View.notifyMouse(View.java:937) at javafx.graphics@22/com.sun.glass.ui.win.WinApplication._enterNestedEventLoopImpl(Native Method) at javafx.graphics@22/com.sun.glass.ui.win.WinApplication._enterNestedEventLoop(WinApplication.java:211) at javafx.graphics@22/com.sun.glass.ui.Application.enterNestedEventLoop(Application.java:513) at javafx.graphics@22/com.sun.glass.ui.EventLoop.enter(EventLoop.java:107) at javafx.graphics@22/com.sun.javafx.tk.quantum.QuantumToolkit.enterNestedEventLoop(QuantumToolkit.java:656) at javafx.graphics@22/javafx.stage.Stage.showAndWait(Stage.java:469) at javafx.controls@22/javafx.scene.control.HeavyweightDialog.showAndWait(HeavyweightDialog.java:162) at javafx.controls@22/javafx.scene.control.Dialog.showAndWait(Dialog.java:346) at org.jabref@100.0.0/org.jabref.gui.JabRefDialogService.showCustomDialogAndWait(JabRefDialogService.java:289) at org.jabref@100.0.0/org.jabref.gui.importer.fetcher.WebSearchPaneViewModel.search(WebSearchPaneViewModel.java:168) at org.jabref@100.0.0/org.jabref.gui.importer.fetcher.WebSearchPaneView.lambda$initialize$3(WebSearchPaneView.java:96) at javafx.base@22/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) at javafx.base@22/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232) at javafx.base@22/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189) at javafx.base@22/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) at javafx.base@22/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at javafx.base@22/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@22/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@22/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@22/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@22/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@22/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@22/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@22/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@22/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@22/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at javafx.base@22/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49) at javafx.base@22/javafx.event.Event.fireEvent(Event.java:198) at javafx.graphics@22/javafx.scene.Node.fireEvent(Node.java:8917) at javafx.controls@22/javafx.scene.control.Button.fire(Button.java:203) at javafx.controls@22/com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:207) at javafx.controls@22/com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274) at javafx.base@22/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247) at javafx.base@22/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80) at javafx.base@22/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232) at javafx.base@22/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189) at javafx.base@22/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) at javafx.base@22/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at javafx.base@22/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@22/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@22/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@22/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@22/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@22/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@22/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@22/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@22/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@22/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at javafx.base@22/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54) at javafx.base@22/javafx.event.Event.fireEvent(Event.java:198) at javafx.graphics@22/javafx.scene.Scene$MouseHandler.process(Scene.java:3985) at javafx.graphics@22/javafx.scene.Scene.processMouseEvent(Scene.java:1891) at javafx.graphics@22/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2709) at javafx.graphics@22/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411) at javafx.graphics@22/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:301) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at javafx.graphics@22/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:450) at javafx.graphics@22/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:430) at javafx.graphics@22/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449) at javafx.graphics@22/com.sun.glass.ui.View.handleMouseEvent(View.java:551) at javafx.graphics@22/com.sun.glass.ui.View.notifyMouse(View.java:937) at javafx.graphics@22/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics@22/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184) at java.base/java.lang.Thread.run(Thread.java:1583) ```
@koppor
Copy link
Member

koppor commented Mar 23, 2024

What happens if you save your library after step 1 @subhramit ?

@subhramit
Copy link
Member Author

What happens if you save your library after step 1 @subhramit ?

The issue persists.

@calixtus
Copy link
Member

Quote from #11107

This was a bug in controlsfx, which was fixed in controlsfx/controlsfx#1541. Just updated to version 11.2.1.

@subhramit
Copy link
Member Author

Quote from #11107

This was a bug in controlsfx, which was fixed in controlsfx/controlsfx#1541. Just updated to version 11.2.1.

So we can close this now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants