JabRef version
Other (please describe below)
Operating system
GNU / Linux
Details on version and operating system
JabRef 5.4--2021-11-25--7aaf5e2 Linux 5.11.0-40-generic amd64 Java 16.0.2 JavaFX 17.0.1+1
Checked with the latest development build
Steps to reproduce the behaviour
- Options / Preferences / Entry Preview /
- Select Customized preview style (first "Available" entry)
- Tried a random edit, and got this:

I can reproduce this reliably.
- Select any "Available" journal style
- click the XML window below
- go back to the journal style window and click on another style name
- the uncaught exception window pops up.
Appendix
...
Log File
java.lang.NullPointerException: Cannot invoke "org.jabref.logic.preview.PreviewLayout.getDisplayName()" because "this.layout" is null
at org.jabref@5.4.517/org.jabref.gui.preview.PreviewViewer.lambda$update$6(Unknown Source)
at org.jabref@5.4.517/org.jabref.gui.util.DefaultTaskExecutor.lambda$getJavaFXTask$3(Unknown Source)
at org.jabref.merged.module@5.4.517/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at org.jabref.merged.module@5.4.517/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at org.jabref.merged.module@5.4.517/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at org.jabref.merged.module@5.4.517/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.4.517/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.4.517/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at org.jabref.merged.module@5.4.517/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at org.jabref.merged.module@5.4.517/javafx.event.Event.fireEvent(Unknown Source)
at org.jabref.merged.module@5.4.517/javafx.concurrent.EventHelper.fireEvent(Unknown Source)
at org.jabref.merged.module@5.4.517/javafx.concurrent.Task.fireEvent(Unknown Source)
at org.jabref.merged.module@5.4.517/javafx.concurrent.Task.setState(Unknown Source)
at org.jabref.merged.module@5.4.517/javafx.concurrent.Task$TaskCallable.lambda$call$0(Unknown Source)
at org.jabref.merged.module@5.4.517/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.4.517/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
at org.jabref.merged.module@5.4.517/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at org.jabref.merged.module@5.4.517/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at org.jabref.merged.module@5.4.517/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
JabRef version
Other (please describe below)
Operating system
GNU / Linux
Details on version and operating system
JabRef 5.4--2021-11-25--7aaf5e2 Linux 5.11.0-40-generic amd64 Java 16.0.2 JavaFX 17.0.1+1
Checked with the latest development build
Steps to reproduce the behaviour
I can reproduce this reliably.
Appendix
...
Log File