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

Cannot save library in WSL folder from Windows #9547

Closed
2 tasks done
DominikStiller opened this issue Jan 6, 2023 · 4 comments
Closed
2 tasks done

Cannot save library in WSL folder from Windows #9547

DominikStiller opened this issue Jan 6, 2023 · 4 comments
Labels
export / save status: depends-on-external A bug or issue that depends on an update of an external library

Comments

@DominikStiller
Copy link

DominikStiller commented Jan 6, 2023

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

JabRef 5.8--2022-12-18--b7fae4b and JabRef 6.0--2023-01-05--89890e5, Windows 10 Pro 22H2

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. Set up Windows Subsystem for Linux (https://learn.microsoft.com/en-us/windows/wsl/install). I am using WSL2 1.0.3.0 with Ubuntu 22.04.
  2. Open JabRef in Windows.
  3. Create a new library.
  4. Save the library to a WSL path (e.g., \\wsl.localhost\Ubuntu\home\myuser\test.bib).

Appendix

  • An empty file "test.bib.tmp" is created in the same folder (even with added library entries).
  • The error did not occur with JabRef 5.7.
  • The path is accessible, I can save to the same path from Windows Notepad.
Log File
Not updating theme because it hasn't changed
Theme set to Theme{type=DEFAULT, name=''} with base css StyleSheet{jrt:/org.jabref/org/jabref/gui/Base.css}
No open database detected
Saving library...
A problem occurred when trying to save the file \\wsl.localhost\Ubuntu\home\dominik\test.bib
org.jabref.logic.exporter.SaveException: Problems saving: java.io.IOException: Incorrect function
	at org.jabref@6.0.3218/org.jabref.gui.exporter.SaveDatabaseAction.saveDatabase(Unknown Source)
	at org.jabref@6.0.3218/org.jabref.gui.exporter.SaveDatabaseAction.save(Unknown Source)
	at org.jabref@6.0.3218/org.jabref.gui.exporter.SaveDatabaseAction.saveAs(Unknown Source)
	at org.jabref@6.0.3218/org.jabref.gui.exporter.SaveDatabaseAction.save(Unknown Source)
	at org.jabref@6.0.3218/org.jabref.gui.exporter.SaveDatabaseAction.save(Unknown Source)
	at org.jabref@6.0.3218/org.jabref.gui.exporter.SaveAction.execute(Unknown Source)
	at org.jabref@6.0.3218/org.jabref.gui.actions.JabRefAction.lambda$new$3(Unknown Source)
	at org.jabref.merged.module@6.0.3218/org.controlsfx.control.action.Action.handle(Unknown Source)
	at org.jabref.merged.module@6.0.3218/org.controlsfx.control.action.Action.handle(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/javafx.event.Event.fireEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/javafx.scene.control.MenuItem.fire(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.doSelect(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.lambda$createChildren$12(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/javafx.event.Event.fireEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/javafx.scene.Scene$MouseHandler.process(Unknown Source)
	at org.jabref.merged.module@6.0.3218/javafx.scene.Scene.processMouseEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.glass.ui.View.notifyMouse(Unknown Source)
	at org.jabref.merged.module@6.0.3218/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at org.jabref.merged.module@6.0.3218/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Incorrect function
	at java.base/sun.nio.ch.FileDispatcherImpl.lock0(Native Method)
	at java.base/sun.nio.ch.FileDispatcherImpl.lock(Unknown Source)
	at java.base/sun.nio.ch.FileChannelImpl.lock(Unknown Source)
	at java.base/java.nio.channels.FileChannel.lock(Unknown Source)
	at org.jabref@6.0.3218/org.jabref.logic.exporter.AtomicFileOutputStream.<init>(Unknown Source)
	at org.jabref@6.0.3218/org.jabref.logic.exporter.AtomicFileOutputStream.<init>(Unknown Source)
	at org.jabref@6.0.3218/org.jabref.logic.exporter.AtomicFileWriter.<init>(Unknown Source)
	... 50 more

@Siedlerchr
Copy link
Member

Hi, thanks for reporting. This is related to the save improvements, and it seems like file locks are not supported on WSL: microsoft/WSL#5762

You might try some workarounds microsoft/WSL#4309 (comment)

Unfortunately, there is nothing from our side we can do to solve this error.

@DominikStiller
Copy link
Author

Thank you for the prompt reply, that is unfortunate. I will stay on JabRef 5.7 then or run JabRef within WSL.

@Siedlerchr Siedlerchr added the status: depends-on-external A bug or issue that depends on an update of an external library label Jan 6, 2023
@Siedlerchr
Copy link
Member

@DominikStiller We recently had a similar issue with saving on Samoa shares on macOS and added workaround. Can you please test the latest version 5.11?

@DominikStiller
Copy link
Author

This issue is fixed in 5.11! Thank you.

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

No branches or pull requests

3 participants