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

Uncaught exception occurred in Thread[#53,JavaFX Application Thread,5,main] (-> Run JabRef as Admin as a fix) #11151

Closed
2 tasks done
tmlmao opened this issue Apr 5, 2024 · 38 comments

Comments

@tmlmao
Copy link

tmlmao commented Apr 5, 2024

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

No response

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

Using search and citationkey

Appendix

...

Log File
Paste an excerpt of your log file here
Uncaught exception occurred in Thread[#53,JavaFX Application Thread,5,main] java.lang.StringIndexOutOfBoundsException: Range [7, -2147483642) out of bounds for length 7 at java.base/jdk.internal.util.Preconditions$1.apply(Unknown Source) at java.base/jdk.internal.util.Preconditions$1.apply(Unknown Source) at java.base/jdk.internal.util.Preconditions$4.apply(Unknown Source) at java.base/jdk.internal.util.Preconditions$4.apply(Unknown Source) at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Unknown Source) at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Unknown Source) at java.base/java.lang.String.checkBoundsBeginEnd(Unknown Source) at java.base/java.lang.String.substring(Unknown Source) at org.jabref.merged.module@5.14.4/com.sun.glass.ui.win.WinTextRangeProvider.GetText(Unknown Source) at org.jabref.merged.module@5.14.4/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at org.jabref.merged.module@5.14.4/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source)
@Siedlerchr
Copy link
Member

Can you please try the version from here? https://builds.jabref.org/jdk-ea/
Alternatively, try running the App as Administrator

@JanSeitz
Copy link

JanSeitz commented Apr 5, 2024

It works when I run JabRef as administrator. However, this seems for me impractical.
But thank you very much for that idea!

@Siedlerchr Siedlerchr changed the title Uncaught exception occurred in Thread[#53,JavaFX Application Thread,5,main] Uncaught exception occurred in Thread[#53,JavaFX Application Thread,5,main] (-> Run JabRef as Admin as a fix) Apr 5, 2024
@Siedlerchr
Copy link
Member

Can you please tell me wich Windows version you are running exactly? e..g best to include the version string or build number

@JanSeitz
Copy link

JanSeitz commented Apr 5, 2024

Windows 10 Home
10.0.19045 N/A Build 19045

@Siedlerchr
Copy link
Member

Just tested on my other computer with Windows 10 Home 22H2 19045.4170 and it works fine. Do you have any accessibility stuff enabled? on screen keyboard of anything related?

@JanSeitz
Copy link

JanSeitz commented Apr 5, 2024

No, I am not using any accessibility stuff.
My .bib document is on a network drive. Could that be a problem?

@JanSeitz
Copy link

JanSeitz commented Apr 5, 2024

It also has problems on the local disc.

@JanSeitz
Copy link

JanSeitz commented Apr 5, 2024

And the problem occurs when I want to add a new source.

@koppor
Copy link
Member

koppor commented Apr 5, 2024

Let us know your graphics card, driver version and screen resolution if possible 😅

@Siedlerchr
Copy link
Member

How do you add the source? New entry? copy pasting in the entry editor?

@JanSeitz
Copy link

JanSeitz commented Apr 5, 2024 via email

@koppor
Copy link
Member

koppor commented Apr 11, 2024

I tried with auto completion enabled: Windows 11 (Microsoft Windows [Version 10.0.22631.3447]) with AMD Radeon works.

@JanSeitz Wild guessing: Does resetting the preferences help?

@JanSeitz
Copy link

JanSeitz commented Apr 11, 2024 via email

@koppor
Copy link
Member

koppor commented Apr 12, 2024

Hi Oliver, resetting perferences also doesn’t work. I recognized that the titlebar shows “null” lwhen I start Jabref for a short time. In my memory that wasn’t the case before.

The null thing happens since years 😅. Interesting that there is a larger UI delay at your side now.

@dfw63
Copy link

dfw63 commented Apr 16, 2024

Same problem here
Edition Windows 11 Home
Version 23H2
Installed ‎06.‎12.‎2022
Build 22631.3447
Windows Feature Experience Pack 1000.22688.1000.0

JabRef 5.13--2024-04-01--6bdcf63
Windows 11 10.0 amd64
Java 21.0.2
JavaFX 22+30

Upon entering just two digits into the New Entry ->"Select Entry Type" -> DOI:

java.lang.StringIndexOutOfBoundsException: Range [2, -2147483647) out of bounds for length 2
at java.base/jdk.internal.util.Preconditions$1.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions$1.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions$4.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions$4.apply(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Unknown Source)
at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Unknown Source)
at java.base/java.lang.String.checkBoundsBeginEnd(Unknown Source)
at java.base/java.lang.String.substring(Unknown Source)

Running Jabref as Admin indeed works.

@dfw63
Copy link

dfw63 commented Apr 16, 2024

Tested (as non-privileged user)
JabRef 5.14--2024-04-15--93e0174
Windows 11 10.0 amd64
Java 22
JavaFX 23-ea+12
Problem persists.

@koppor
Copy link
Member

koppor commented Apr 16, 2024

I think, we are not the only ones in the world where this happens -- https://stackoverflow.com/q/78332309/873282

@koppor
Copy link
Member

koppor commented Apr 16, 2024

@dfw63 I assume you installed a Windows update? And JabRef worked before? Do you have your update history at hand?

@koppor
Copy link
Member

koppor commented Apr 16, 2024

We should need if old versions of JabRef are affected. Does v5.11 (JavaFX 20) still work?

@koppor koppor mentioned this issue Apr 16, 2024
6 tasks
@liamsharp
Copy link

We've been having the same issue in the Java app I work on. We'd never seen this issue at all until 24/03/24, and have seen an sudden increase since. We've using Java & JavaFX 17. The issue we believe is due to an Windows update, but have yet to be able to reproduce it ourselves, but have lots of customer that can. The issue also happens with Java 21 & JavaFX 21. We have an LTS relationship with Gluon and they have patched JavaFX for us to stop this from happening.

@dfw63
Copy link

dfw63 commented Apr 16, 2024

@dfw63 I assume you installed a Windows update? And JabRef worked before? Do you have your update history at hand?

image

Sorry, it is in German. Unfortunately I cannot exactly tell when the Jabref issue started for me.

@koppor koppor mentioned this issue Apr 16, 2024
6 tasks
@koppor
Copy link
Member

koppor commented Apr 16, 2024

Current state: Tried to add a hotfix. Did try to use in JabRef, but did not succeed.

Thus, we need to wait that someone reports to Oracle and that they fix it.

@Siedlerchr
Copy link
Member

@koppor can we use the reproducer for it?

@koppor
Copy link
Member

koppor commented Apr 16, 2024

@Siedlerchr Does the reproducer have a text field?

The MWE from SO is:

    // launch the application
    public void start(Stage s)
    {
        // set title for the stage
        s.setTitle("creating TextField");

        // create a textfield
        TextField b = new TextField();

        // create a stack pane
        StackPane r = new StackPane();

        // add textfield
        r.getChildren().add(b);

        // create a scene
        Scene sc = new Scene(r, 200, 200);

        // set the scene
        s.setScene(sc);

        s.show();
    }

I think, simply adding a text field to the reproducer will show the error.

@koppor
Copy link
Member

koppor commented Apr 17, 2024

There is now a JDK issue: https://bugs.openjdk.org/browse/JDK-8330462

@koppor
Copy link
Member

koppor commented Apr 17, 2024

@dfw63 Could you uninstall the recent update? Also das 2024-04 H2 update. Das ganz oben auf der Liste? - Das Ding ist, dass es hier auf meiner Kiste (AMD-Graphikkarte) läuft und ich hier im Blindflug rate, was es denn sein könnte :)

@koppor
Copy link
Member

koppor commented Apr 17, 2024

@dfw63 Schreib mir auch gerne privat - Wir müssen irgendwie das konkrete Setup rausfinden, weil es bei der Mehrheit der Leute noch funktioniert.

@koppor
Copy link
Member

koppor commented Apr 17, 2024

Please try the reproducer available at "Artifacts" at https://github.com/Siedlerchr/javafxreproducer/actions/runs/8718689729?pr=19. If it happens also there, we can enrich the reproducer to output more environment information to track down the issue.

(PR creating these artifacts: Siedlerchr/javafxreproducer#19)

@dfw63
Copy link

dfw63 commented Apr 17, 2024

Sorry, I cannot remove the latest 2024-04 H2 update right now.

@dfw63
Copy link

dfw63 commented Apr 17, 2024

JabRef 5.14--2024-04-15--93e0174
Windows 11 10.0 amd64
Java 22
JavaFX 23-ea+12

On my machine the problem disappears as soon as I close the Deepl app (the program that allows you to open deepl typing Ctr-C twice). Once off, Jabref works normally. When on again, crash on entering DOIs or whatever again... Seems to be reproducible.

@koppor
Copy link
Member

koppor commented Apr 17, 2024

@dfw63 Thank you so much for the reproducer. I could not resist and to post it on Mastodon: https://mastodon.acm.org/@koppor/112286143673069313. Now that the issue is reproducible, I am hoping for a fast fix.

@dfw63
Copy link

dfw63 commented Apr 17, 2024

It is important to switch on/off the deepl app in the residential area (system tray, lower right corner). In jabref, I can even recover from the crash by closing the deepl app in the system tray, then getting back to it by opening the app again. Pretty funny.

@andy-goryachev-oracle
Copy link

https://bugs.openjdk.org/browse/JDK-8330462

@koppor
Copy link
Member

koppor commented Apr 18, 2024

Proposed a fix at openjdk/jfx#1442.

@VivaldoMendes
Copy link

VivaldoMendes commented Apr 30, 2024

I can confirm that the problem in my case was related to the DeepL App. After removing this app, JabRef is working OK, and the problem with the Uncaught exception is gone.

@koppor
Copy link
Member

koppor commented May 16, 2024

Please try out https://builds.jabref.org/jdk-ea/, it should be fixed there.

@dfw63
Copy link

dfw63 commented May 23, 2024

Tested today, no issues any more.

@Siedlerchr
Copy link
Member

Thank you for reporting this issue. We think, that is already fixed in our development version and consequently the change will be included in the next release.

We would like to ask you to use a development build from https://builds.jabref.org/main and report back if it works for you. Please remember to make a backup of your library before trying-out this version.

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

No branches or pull requests

8 participants