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

Keygeneration after Paste to Bibtex source results in IndexOutOfBoundsException - Tabs no longer navigatable #3375

Closed
Siedlerchr opened this issue Oct 30, 2017 · 3 comments
Labels
component: entry-editor component: ui [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs

Comments

@Siedlerchr
Copy link
Member

Reproduced from this forum post

Windows, current master

  1. Add a new article entry
  2. Go to Source tab, paste some bibtex code onto it
  3. Press Keygeneration
  4. Select other entry in the main table
    Exception occurs:
    Tabs no longer clickable.

Exception seems to be triggerd by the updateSource in the EntryEditor

23:20:35.019 [pool-3-thread-1] ERROR org.jabref.FallbackExceptionHandler - Uncaught exception occurred in Thread[pool-3-thread-1,5,main]
java.lang.IndexOutOfBoundsException: [31, 32) is not a valid range within [0, 16)
	at org.reactfx.util.Lists.checkRange(Lists.java:128) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.util.Lists.checkRange(Lists.java:123) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.collection.MemoizationListImpl.force(MemoizationList.java:118) ~[reactfx-2.0-M5.jar:?]
	at org.fxmisc.flowless.SizeTracker.lambda$new$4(SizeTracker.java:60) ~[flowless-0.5.2.jar:?]
	at org.reactfx.value.Val$2.computeValue(Val.java:705) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.ValBase.getValue(ValBase.java:17) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.Val.lambda$combine$7(Val.java:584) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.Val$2.computeValue(Val.java:705) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.ValBase.getValue(ValBase.java:17) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.Val.lambda$combine$10(Val.java:645) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.Val$2.computeValue(Val.java:705) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.ValBase.getValue(ValBase.java:17) ~[reactfx-2.0-M5.jar:?]
	at java.util.Optional.map(Optional.java:215) ~[?:1.8.0_152]
	at org.reactfx.value.FlatMapped.computeValue(FlatMapped.java:33) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.ValBase.getValue(ValBase.java:17) ~[reactfx-2.0-M5.jar:?]
	at javafx.beans.property.BooleanPropertyBase$1.computeValue(BooleanPropertyBase.java:174) ~[jfxrt.jar:?]
	at javafx.beans.binding.BooleanBinding.get(BooleanBinding.java:157) ~[jfxrt.jar:?]
	at javafx.beans.property.BooleanPropertyBase.get(BooleanPropertyBase.java:130) ~[jfxrt.jar:?]
	at javafx.scene.Node$5.invalidated(Node.java:1153) ~[jfxrt.jar:?]
	at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109) ~[jfxrt.jar:?]
	at javafx.beans.property.BooleanPropertyBase.access$000(BooleanPropertyBase.java:49) ~[jfxrt.jar:?]
	at javafx.beans.property.BooleanPropertyBase$Listener.invalidated(BooleanPropertyBase.java:245) ~[jfxrt.jar:?]
	at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:137) ~[jfxrt.jar:?]
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81) ~[jfxrt.jar:?]
	at javafx.beans.binding.BooleanBinding.invalidate(BooleanBinding.java:176) ~[jfxrt.jar:?]
	at com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:51) ~[jfxrt.jar:?]
	at org.reactfx.value.InvalidationListenerWrapper.accept(Val.java:765) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.util.AbstractReducingStreamNotifications.lambda$head$0(NotificationAccumulator.java:248) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:57) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.ValBase.invalidate(ValBase.java:32) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.FlatMapped.selectedInvalidated(FlatMapped.java:54) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.FlatMapped.lambda$null$1(FlatMapped.java:41) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.InvalidationListenerWrapper.accept(Val.java:765) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.util.AbstractReducingStreamNotifications.lambda$head$0(NotificationAccumulator.java:248) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:57) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.ValBase.invalidate(ValBase.java:32) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.Val$2.lambda$connect$0(Val.java:691) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.InvalidationListenerWrapper.accept(Val.java:765) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.util.AbstractReducingStreamNotifications.lambda$head$0(NotificationAccumulator.java:248) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:57) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.ValBase.invalidate(ValBase.java:32) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.Val$2.lambda$connect$0(Val.java:691) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.InvalidationListenerWrapper.accept(Val.java:765) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.util.AbstractReducingStreamNotifications.lambda$head$0(NotificationAccumulator.java:248) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:57) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.ValBase.invalidate(ValBase.java:32) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.OrElseConst.lambda$connect$0(OrElseConst.java:24) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.InvalidationListenerWrapper.accept(Val.java:765) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.util.AbstractReducingStreamNotifications.lambda$head$0(NotificationAccumulator.java:248) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:57) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.ValBase.invalidate(ValBase.java:32) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.collection.ListReduction.lambda$connect$0(ListReduction.java:53) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.collection.LiveList.lambda$observeChanges$9(LiveList.java:268) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.util.ListNotifications.lambda$takeHead$0(NotificationAccumulator.java:317) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.collection.MemoizationListImpl$MemoizedView.publishNotifications(MemoizationList.java:58) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.collection.MemoizationListImpl$MemoizedView.access$300(MemoizationList.java:30) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.collection.MemoizationListImpl.sourceChanged(MemoizationList.java:89) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.util.ListNotifications.lambda$takeHead$0(NotificationAccumulator.java:317) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:57) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.collection.MappedList.sourceChanged(MappedList.java:41) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.util.ListNotifications.lambda$takeHead$0(NotificationAccumulator.java:317) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:57) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.collection.MemoizationListImpl.sourceChanged(MemoizationList.java:88) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.util.ListNotifications.lambda$takeHead$0(NotificationAccumulator.java:317) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:57) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.collection.MappedList.sourceChanged(MappedList.java:41) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.util.ListNotifications.lambda$takeHead$0(NotificationAccumulator.java:317) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.SuspendableBase.resume(SuspendableBase.java:64) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.CloseableOnceGuard.close(Guard.java:49) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.MultiGuard.close(Guard.java:83) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.Suspendable$1.resumeSource(Suspendable.java:118) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.Suspendable$1.suspendSource(Suspendable.java:104) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.util.NonAccumulativeStreamNotifications.lambda$head$0(NotificationAccumulator.java:134) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:57) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ProperEventStream.emit(ProperEventStream.java:18) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.EventStreams$3.lambda$observeInputs$0(EventStreams.java:105) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.ChangeListenerWrapper.accept(Val.java:786) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.util.AbstractReducingStreamNotifications.lambda$head$0(NotificationAccumulator.java:248) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:57) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.value.ValBase.invalidate(ValBase.java:32) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.SuspendableBoolean.release(SuspendableBoolean.java:24) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.CloseableOnceGuard.close(Guard.java:49) ~[reactfx-2.0-M5.jar:?]
	at org.reactfx.Suspendable.suspendWhile(Suspendable.java:49) ~[reactfx-2.0-M5.jar:?]
	at org.fxmisc.richtext.model.GenericEditableStyledDocumentBase.update(GenericEditableStyledDocumentBase.java:222) ~[richtextfx-0.7-M5.jar:?]
	at org.reactfx.util.Tuple3.exec(Tuple3.java:43) ~[reactfx-2.0-M5.jar:?]
	at org.fxmisc.richtext.model.GenericEditableStyledDocumentBase.replace(GenericEditableStyledDocumentBase.java:129) ~[richtextfx-0.7-M5.jar:?]
	at org.fxmisc.richtext.model.SimpleEditableStyledDocument.replace(SimpleEditableStyledDocument.java:7) ~[richtextfx-0.7-M5.jar:?]
	at org.fxmisc.richtext.GenericStyledArea.replace(GenericStyledArea.java:1302) ~[richtextfx-0.7-M5.jar:?]
	at org.fxmisc.richtext.GenericStyledArea.replaceText(GenericStyledArea.java:1297) ~[richtextfx-0.7-M5.jar:?]
	at org.fxmisc.richtext.model.EditActions.insertText(EditActions.java:32) ~[richtextfx-0.7-M5.jar:?]
	at org.fxmisc.richtext.model.EditActions.appendText(EditActions.java:15) ~[richtextfx-0.7-M5.jar:?]
	at org.jabref.gui.entryeditor.SourceTab.updateSourcePane(SourceTab.java:69) ~[bin/:?]
	at org.jabref.gui.entryeditor.EntryEditor.lambda$4(EntryEditor.java:228) ~[bin/:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_152]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_152]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_152]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_152]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
@tobiasdiez
Copy link
Member

I cannot reproduce it but @lenhard reported a similar exception in #3366 (review)

12:04:25.997 [JavaFX Application Thread] ERROR org.jabref.FallbackExceptionHandler - Uncaught exception occurred in Thread[JavaFX Application Thread,5,main]
java.lang.IndexOutOfBoundsException: [-2147483648, 8) is not a valid range within [0, 8)
        at org.reactfx.util.Lists.checkRange(Lists.java:128) ~[reactfx-2.0-M5.jar:?]
        at org.reactfx.util.Lists.checkRange(Lists.java:123) ~[reactfx-2.0-M5.jar:?]
        at org.reactfx.collection.MemoizationListImpl.forget(MemoizationList.java:184) ~[reactfx-2.0-M5.jar:?]
        at org.fxmisc.flowless.CellListManager.cropTo(CellListManager.java:71) ~[flowless-0.5.2.jar:?]
        at org.fxmisc.flowless.CellPositioner.cropTo(CellPositioner.java:24) ~[flowless-0.5.2.jar:?]
        at org.fxmisc.flowless.Navigator.cropToNeighborhoodOf(Navigator.java:209) ~[flowless-0.5.2.jar:?]
        at org.fxmisc.flowless.Navigator.placeStartAtMayCrop(Navigator.java:182) ~[flowless-0.5.2.jar:?]
        at org.fxmisc.flowless.Navigator.visit(Navigator.java:111) ~[flowless-0.5.2.jar:?]
        at org.fxmisc.flowless.StartOffStart.accept(TargetPosition.java:49) ~[flowless-0.5.2.jar:?]
        at org.fxmisc.flowless.Navigator.layoutChildren(Navigator.java:67) ~[flowless-0.5.2.jar:?]
        at javafx.scene.Parent.layout(Parent.java:1087) ~[jfxrt.jar:?]
        at org.fxmisc.flowless.VirtualFlow.layoutChildren(VirtualFlow.java:165) ~[flowless-0.5.2.jar:?]
        at javafx.scene.Parent.layout(Parent.java:1087) ~[jfxrt.jar:?]
        at javafx.scene.Parent.layout(Parent.java:1093) ~[jfxrt.jar:?]
        at javafx.scene.Parent.layout(Parent.java:1093) ~[jfxrt.jar:?]
        at javafx.scene.Parent.layout(Parent.java:1093) ~[jfxrt.jar:?]
        at javafx.scene.Parent.layout(Parent.java:1093) ~[jfxrt.jar:?]
        at javafx.scene.Parent.layout(Parent.java:1093) ~[jfxrt.jar:?]
        at javafx.scene.Scene.doLayoutPass(Scene.java:552) ~[jfxrt.jar:?]
        at javafx.scene.Scene.preferredSize(Scene.java:1646) ~[jfxrt.jar:?]
        at javafx.scene.Scene.impl_preferredSize(Scene.java:1720) ~[jfxrt.jar:?]

        at javafx.stage.Window$9.invalidated(Window.java:846) ~[jfxrt.jar:?]
        at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109) ~[jfxrt.jar:?]
        at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144) ~[jfxrt.jar:?]
        at javafx.stage.Window.setShowing(Window.java:922) ~[jfxrt.jar:?]
        at javafx.stage.Window.show(Window.java:937) ~[jfxrt.jar:?]
        at com.sun.javafx.stage.EmbeddedWindow.show(EmbeddedWindow.java:58) ~[jfxrt.jar:?]
        at javafx.embed.swing.JFXPanel.lambda$addNotify$49(JFXPanel.java:799) ~[jfxrt.jar:?]
        at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) ~[jfxrt.jar:?]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_121]
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) ~[jfxrt.jar:?]
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) ~[jfxrt.jar:?]
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) ~[jfxrt.jar:?]
        at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191) ~[jfxrt.jar:?]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]

@tobiasdiez
Copy link
Member

This should be fixed in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks!

@Siedlerchr
Copy link
Member Author

Solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: entry-editor component: ui [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs
Projects
None yet
Development

No branches or pull requests

2 participants