Skip to content

java.nio.file.ClosedWatchServiceException #8657

@ThiloteE

Description

@ThiloteE

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

JabRef 5.6--2022-04-10--93177fa Windows 10 10.0 amd64 Java 17.0.2 JavaFX 18+12

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

Additional Info:

Follow up to #8655 that reports about corrupted pdf files.

The whole issue was triggered by upgrading pdfbox to version 3.0 with its new "SaveIncremental" method of saving and reading files.

Steps to reproduce the behaviour

  1. Have pdf file linked to entry
  2. write XMP metadata to pdf file (multiple times)
  3. Exception emerges. The pdf can be corrupted.

Appendix

...

Log File
java.nio.file.ClosedWatchServiceException
	at java.base/sun.nio.fs.AbstractPoller.invoke(Unknown Source)
	at java.base/sun.nio.fs.AbstractPoller.register(Unknown Source)
	at java.base/sun.nio.fs.WindowsWatchService.register(Unknown Source)
	at java.base/sun.nio.fs.WindowsPath.register(Unknown Source)
	at java.base/java.nio.file.Path.register(Unknown Source)
	at org.jabref@5.6.149/org.jabref.gui.util.DefaultFileUpdateMonitor.addListenerForFile(Unknown Source)
	at org.jabref@5.6.149/org.jabref.gui.entryeditor.fileannotationtab.FileAnnotationTabViewModel.notifyNewSelectedFile(Unknown Source)
	at org.jabref@5.6.149/org.jabref.gui.entryeditor.fileannotationtab.FileAnnotationTabViewModel.lambda$reloadAnnotations$1(Unknown Source)
	at org.jabref.merged.module@5.6.149/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.6.149/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
	at org.jabref.merged.module@5.6.149/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
	at org.jabref.merged.module@5.6.149/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at org.jabref.merged.module@5.6.149/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(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

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions