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

Frequent ClassCastExceptions when handling CSS in JavaFX #12168

Open
2 tasks done
ytzemih opened this issue Nov 9, 2024 · 6 comments
Open
2 tasks done

Frequent ClassCastExceptions when handling CSS in JavaFX #12168

ytzemih opened this issue Nov 9, 2024 · 6 comments
Labels
status: depends-on-external A bug or issue that depends on an update of an external library

Comments

@ytzemih
Copy link

ytzemih commented Nov 9, 2024

JabRef version

Latest development branch build (please note build date below)

Operating system

GNU / Linux

Details on version and operating system

Linux Mint Debian 12

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. Keep using JR.
  2. For example, change focus from entry editor to entry list.

These exceptions appear quite frequently, sometimes several at a time. I can't quite pinpoint when exactly.

Appendix

Log File
2024-11-09 10:43:56 [JavaFX Application Thread] sun.util.logging.internal.LoggingProviderImpl$JULWrapper.log()
WARN: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in module [email protected] of loader 'app')' while converting value for '-fx-background-color' from rule '*.main-table *.table-row-cell:matching-groups-not-search' in stylesheet jrt:/org.jabref/org/jabref/gui/Base.css
@calixtus
Copy link
Member

calixtus commented Nov 9, 2024

Please provide the build information (about dialog) and the whole stack trace. Otherwise it's hard to diagnose the issue.

@koppor
Copy link
Member

koppor commented Nov 9, 2024

I also have it (always probably). Think, there is a JavaFX issue for it!

@ytzemih
Copy link
Author

ytzemih commented Nov 10, 2024

@calixtus , I'm using

JabRef 6.0--2024-11-05--4705977
Linux 6.1.0-26-amd64 amd64 
Java 21.0.5 
JavaFX 23.0.1+4

There is no stack trace AFAICT, this seems to be an exception caught by JR with only the top message forwarded to log4j or something. I've copied all I can see in the console. Sorry.

It seems to me as if there is a toString() method missing somewhere or the counterpart toCSSObject, something that's in the way of an automatic typecast.

@calixtus
Copy link
Member

Thanks.
The build number is interesting for me since we had some time ago a pull request that moved some CSS around and maybe there happened something. Refs #11881

@Siedlerchr
Copy link
Member

Siedlerchr commented Nov 10, 2024 via email

@koppor koppor added the status: depends-on-external A bug or issue that depends on an update of an external library label Nov 10, 2024
@koppor
Copy link
Member

koppor commented Nov 10, 2024

P4 Bug since JavaFX 11: https://bugs.openjdk.org/browse/JDK-8268657

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: depends-on-external A bug or issue that depends on an update of an external library
Projects
None yet
Development

No branches or pull requests

4 participants