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

Selecting an Entry preview style triggers an Uncaught Exception #7860

Closed
1 task done
wujastyk opened this issue Jun 28, 2021 · 8 comments · Fixed by #8216
Closed
1 task done

Selecting an Entry preview style triggers an Uncaught Exception #7860

wujastyk opened this issue Jun 28, 2021 · 8 comments · Fixed by #8216
Labels
bug Confirmed bugs or reports that are very likely to be bugs preferences status: depends-on-external A bug or issue that depends on an update of an external library ui

Comments

@wujastyk
Copy link

wujastyk commented Jun 28, 2021

JabRef 5.3--2021-06-28--9fe7617
Linux 5.4.0-77-generic amd64
Java 16.0.1
JavaFX 16+8

Following on from #7652 :

Steps to reproduce the behavior:

  1. Select options/preferences/Entry preview
  2. click one of the selected styles in the right window
  3. Get an Uncaught Exception popup window. Sometimes it takes one or two click to get the exception; I can't see quite what behaviour uniquely triggers it.

The event log is empty.

image

Log File
java.lang.IllegalArgumentException: Visible paragraphs' last index is [-1] but visibleParIndex was [0]
  at org.jabref.merged.module@5.3.420/org.fxmisc.richtext.GenericStyledArea.visibleParToAllParIndex(Unknown Source)
  at org.jabref.merged.module@5.3.420/org.fxmisc.richtext.ViewActions.firstVisibleParToAllParIndex(Unknown Source)
  at org.jabref.merged.module@5.3.420/org.fxmisc.richtext.LineNumberFactory.deleteParagraphCheck(Unknown Source)
  at org.jabref.merged.module@5.3.420/org.fxmisc.richtext.LineNumberFactory.lambda$new$1(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
  at java.base/java.security.AccessController.doPrivileged(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
  at org.jabref.merged.module@5.3.420/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
  at org.jabref.merged.module@5.3.420/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(Unknown Source)
  at java.base/java.lang.Thread.run(Unknown Source)

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

Refs. #7526 (comment)

@crystalfp
Copy link

Still exists in latest development (you have to click on the various selected formats till the exception occurs).

JabRef 5.4--2021-09-20--a91420d
Windows 10 10.0 amd64 
Java 16.0.2 
JavaFX 17+18

image

@ThiloteE
Copy link
Member

ThiloteE commented Oct 1, 2021

@ThiloteE I encountered that as well. It has to do with the Edit-Field (coming from the richtextfx library) and the syntax highlighting feature. Did not yet find out why exactly it's happening. It seems to be coming when you don't have anything selected at all, e.g the list is empty At least that triggered it a few times

If you want to try this version, you can check the build here https://builds.jabref.org/pull/8110/merge/

Mhm not sure. Which list exactly are you talking about? - Something within the edit field or the selected list?

I can trigger the error pretty reliably in "selected" even when it is not empty, so not sure if the emptiness is a criterion. I can trigger it when selecting the styles via keyboard arrows and also when selecting them via mouse. I also get the error basically every time i click on customized preview style, but not always. Sometimes something seems to reset itself, i mean i guess that is to be expected, since the error message shows index issues.

JabRef 5.4--2021-08-21--644e48d
Windows 10 10.0 amd64
Java 16.0.2
JavaFX 16+8

@ThiloteE
Copy link
Member

ThiloteE commented Oct 1, 2021

JabRef 5.4-PullRequest8110.247--2021-10-01--9bc899a
Windows 10 10.0 amd64
Java 16.0.2
JavaFX 17+18

Whereas in the older version (JabRef 5.4--2021-08-21--644e48d) prior to you having implemented the preview and edit function, the Available list did not trigger the error, now in the new version (JabRef 5.4-PullRequest8110.247--2021-10-01--9bc899a) it also triggers the error.

@Siedlerchr
Copy link
Member

This bug is unfortunately coming from an external library, seems like it's FXMisc/RichTextFX#1021
But the fixed version is not yet released :(

@Siedlerchr Siedlerchr added the status: depends-on-external A bug or issue that depends on an update of an external library label Oct 2, 2021
@Jugen
Copy link

Jugen commented Oct 26, 2021

Hey guys, sorry I didn't see this earlier otherwise I would have tried to publish a RichTextFX update sooner. Anyways version 0.10.7 is out now and Maven should reflect it in the next 24 hours.

@ThiloteE
Copy link
Member

ThiloteE commented Nov 8, 2021

The uncaught exceptions do indeed not trigger anymore in

JabRef 5.4--2021-11-08--1eaaf50
Windows 10 10.0 amd64
Java 16.0.2
JavaFX 17.0.1+1

and they also did not trigger in the development version from yesterday.

Awesome!

@wujastyk
Copy link
Author

wujastyk commented Nov 8, 2021

JabRef 5.4--2021-11-08--1eaaf50
Linux 5.11.0-38-generic amd64
Java 16.0.2
JavaFX 17.0.1+1

Confirmed. Great news. Thank you!

@koppor koppor moved this to Done in Prioritization Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs preferences status: depends-on-external A bug or issue that depends on an update of an external library ui
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants