jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Endless exception dialogues with illegal char in file path

Open wwtan opened this issue 5 years ago • 4 comments

JabRef version 5.2 on Windows 10 (19042)

  • [x] Mandatory: I have tested the latest development version from http://builds.jabref.org/master/ and the problem persists

Steps to reproduce the behavior:

  1. Start with the file test.bib
    % Encoding: UTF-8
    
    @Article{test,
      file = {:C$\:User/someone/somefile.pdf:PDF},
    }
    
  2. Open JabRef and Ctrl+O to open this file.
  3. Java error is thrown.
Main problem here is, you are stuck in endless Java exception dialogs and has to terminate JabRef the hard way. ``` java.nio.file.InvalidPathException: Illegal char <:> at index 2: C$:User/someone/Baalbergen et al. - 2018 - Integrated collaboration capabilities for competitive aircraft design.pdf at java.base/sun.nio.fs.WindowsPathParser.normalize(Unknown Source) at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source) at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source) at java.base/sun.nio.fs.WindowsPath.parse(Unknown Source) at java.base/sun.nio.fs.WindowsFileSystem.getPath(Unknown Source) at java.base/java.nio.file.Path.of(Unknown Source) at [email protected]/org.jabref.logic.importer.util.FileFieldParser.convert(Unknown Source) at [email protected]/org.jabref.logic.importer.util.FileFieldParser.parse(Unknown Source) at java.base/java.util.Optional.map(Unknown Source) at [email protected]/com.tobiasdiez.easybind.optional.PreboundOptionalBinding$1.computeValue(Unknown Source) at [email protected]/com.tobiasdiez.easybind.optional.PreboundOptionalBinding$1.computeValue(Unknown Source) at [email protected]/javafx.beans.binding.ObjectBinding.get(Unknown Source) at [email protected]/javafx.beans.binding.ObjectExpression.getValue(Unknown Source) at [email protected]/com.tobiasdiez.easybind.optional.PreboundOptionalBinding$3.computeValue(Unknown Source) at [email protected]/javafx.beans.binding.ObjectBinding.get(Unknown Source) at [email protected]/javafx.beans.binding.ObjectExpression.getValue(Unknown Source) at [email protected]/javafx.scene.control.TableCell.updateItem(Unknown Source) at [email protected]/javafx.scene.control.TableCell.indexChanged(Unknown Source) at [email protected]/javafx.scene.control.IndexedCell.updateIndex(Unknown Source) at [email protected]/javafx.scene.control.skin.TableRowSkinBase.updateCells(Unknown Source) at [email protected]/javafx.scene.control.skin.TableRowSkinBase.(Unknown Source) at [email protected]/javafx.scene.control.skin.TableRowSkin.(Unknown Source) at [email protected]/javafx.scene.control.TableRow.createDefaultSkin(Unknown Source) at [email protected]/javafx.scene.control.Control.doProcessCSS(Unknown Source) at [email protected]/javafx.scene.control.Control$1.doProcessCSS(Unknown Source) at [email protected]/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source) at [email protected]/javafx.scene.Parent.doProcessCSS(Unknown Source) at [email protected]/javafx.scene.Parent$1.doProcessCSS(Unknown Source) at [email protected]/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source) at [email protected]/javafx.scene.Parent.doProcessCSS(Unknown Source) at [email protected]/javafx.scene.Parent$1.doProcessCSS(Unknown Source) at [email protected]/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source) at [email protected]/javafx.scene.Parent.doProcessCSS(Unknown Source) at [email protected]/javafx.scene.Parent$1.doProcessCSS(Unknown Source) at [email protected]/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.control.ControlHelper.superProcessCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.control.ControlHelper.superProcessCSS(Unknown Source) at [email protected]/javafx.scene.control.Control.doProcessCSS(Unknown Source) at [email protected]/javafx.scene.control.Control$1.doProcessCSS(Unknown Source) at [email protected]/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source) at [email protected]/javafx.scene.Parent.doProcessCSS(Unknown Source) at [email protected]/javafx.scene.Parent$1.doProcessCSS(Unknown Source) at [email protected]/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source) at [email protected]/javafx.scene.Parent.doProcessCSS(Unknown Source) at [email protected]/javafx.scene.Parent$1.doProcessCSS(Unknown Source) at [email protected]/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.control.ControlHelper.superProcessCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.control.ControlHelper.superProcessCSS(Unknown Source) at [email protected]/javafx.scene.control.Control.doProcessCSS(Unknown Source) at [email protected]/javafx.scene.control.Control$1.doProcessCSS(Unknown Source) at [email protected]/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source) at [email protected]/javafx.scene.Parent.doProcessCSS(Unknown Source) at [email protected]/javafx.scene.Parent$1.doProcessCSS(Unknown Source) at [email protected]/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.control.ControlHelper.superProcessCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.control.ControlHelper.superProcessCSS(Unknown Source) at [email protected]/javafx.scene.control.Control.doProcessCSS(Unknown Source) at [email protected]/javafx.scene.control.Control$1.doProcessCSS(Unknown Source) at [email protected]/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source) at [email protected]/javafx.scene.Parent.doProcessCSS(Unknown Source) at [email protected]/javafx.scene.Parent$1.doProcessCSS(Unknown Source) at [email protected]/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source) at [email protected]/javafx.scene.Parent.doProcessCSS(Unknown Source) at [email protected]/javafx.scene.Parent$1.doProcessCSS(Unknown Source) at [email protected]/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.control.ControlHelper.superProcessCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.control.ControlHelper.superProcessCSS(Unknown Source) at [email protected]/javafx.scene.control.Control.doProcessCSS(Unknown Source) at [email protected]/javafx.scene.control.Control$1.doProcessCSS(Unknown Source) at [email protected]/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(Unknown Source) at [email protected]/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source) at [email protected]/javafx.scene.Node.processCSS(Unknown Source) at [email protected]/javafx.scene.Node.processCSS(Unknown Source) at [email protected]/javafx.scene.Node.processCSS(Unknown Source) at [email protected]/javafx.scene.Node.processCSS(Unknown Source) at [email protected]/javafx.scene.Node.processCSS(Unknown Source) at [email protected]/javafx.scene.Scene.doCSSPass(Unknown Source) at [email protected]/javafx.scene.Scene$ScenePulseListener.pulse(Unknown Source) at [email protected]/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at [email protected]/com.sun.javafx.tk.Toolkit.runPulse(Unknown Source) at [email protected]/com.sun.javafx.tk.Toolkit.firePulse(Unknown Source) at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source) at [email protected]/com.sun.javafx.tk.quantum.PaintCollector.liveRepaintRenderJob(Unknown Source) at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$ViewEventNotification.run(Unknown Source) at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$ViewEventNotification.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleViewEvent$15(Unknown Source) at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source) at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleViewEvent(Unknown Source) at [email protected]/com.sun.glass.ui.View.handleViewEvent(Unknown Source) at [email protected]/com.sun.glass.ui.View.notifyResize(Unknown Source) at [email protected]/com.sun.glass.ui.win.WinWindow._setBounds(Native Method) at [email protected]/com.sun.glass.ui.win.WinWindow.setBounds(Unknown Source) at [email protected]/com.sun.javafx.tk.quantum.WindowStage.setBounds(Unknown Source) at [email protected]/javafx.stage.Window$TKBoundsConfigurator.apply(Unknown Source) at [email protected]/javafx.stage.Window.applyBounds(Unknown Source) at [email protected]/javafx.stage.Window.adjustSize(Unknown Source) at [email protected]/javafx.stage.Window.sizeToScene(Unknown Source) at [email protected]/javafx.stage.Window$12.invalidated(Unknown Source) at [email protected]/javafx.beans.property.BooleanPropertyBase.markInvalid(Unknown Source) at [email protected]/javafx.beans.property.BooleanPropertyBase.set(Unknown Source) at [email protected]/javafx.stage.Window.setShowing(Unknown Source) at [email protected]/javafx.stage.Window.show(Unknown Source) at [email protected]/javafx.stage.Stage.show(Unknown Source) at [email protected]/javafx.stage.Stage.showAndWait(Unknown Source) at [email protected]/javafx.scene.control.HeavyweightDialog.showAndWait(Unknown Source) at [email protected]/javafx.scene.control.Dialog.showAndWait(Unknown Source) at [email protected]/org.jabref.gui.JabRefDialogService.showErrorDialogAndWait(Unknown Source) at [email protected]/org.jabref.gui.FallbackExceptionHandler.lambda$uncaughtException$0(Unknown Source) at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source) at [email protected]/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source) at [email protected]/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at [email protected]/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) ```

I tried it with the field author and it does not result in such error. Hence I reckon it should be related to the path parser. This happens when I editted the entires manually.

wwtan avatar Jan 24 '21 22:01 wwtan

If the filename contains something like {\"{O}} instead of Ö, the same error is thrown. I migrated from Mendeley to JabRef and my bib file was generated by Mendeley originally.

wwtan avatar Jan 25 '21 00:01 wwtan

I got the same issue occurring for multiple of file-path's. I would prefer that I don't get a warning box when opening the file but rather when I try to follow the link. I have been using JabRef for +10 years, with >1300 entries, and it seems overwhelming to have to update all the broken path's manually.

davidbalslevclausen avatar Jan 25 '21 08:01 davidbalslevclausen

Can you please try the latest development version again. One hour after you reported this issue, the file handling was improved. https://github.com/JabRef/jabref/pull/7347

tobiasdiez avatar Jan 25 '21 13:01 tobiasdiez

Awesome, the issue has been resolved! Just to document the change, previously as soon as the ill-formed bib is opened, the endless loop begins. Now I presume it is a lazy loading, only throwing one error dialog when switching to General tab or double-click on the pdf icon.

Thanks for the work!

wwtan avatar Jan 26 '21 16:01 wwtan