Skip to content

Selecting "Customized Preview Style" causes uncaught exception #8280

@wujastyk

Description

@wujastyk

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

  • 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. Options / Preferences / Entry Preview /
  2. Select Customized preview style (first "Available" entry)
  3. Tried a random edit, and got this:

image

I can reproduce this reliably.

  1. Select any "Available" journal style
  2. click the XML window below
  3. go back to the journal style window and click on another style name
  4. 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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions