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

Search for unlinked local files fails after large result & SaveException due to "Too many open files" #12432

Open
2 tasks done
hongmiao-wu opened this issue Jan 30, 2025 · 0 comments

Comments

@hongmiao-wu
Copy link

JabRef version

Latest development branch build (please note build date below)

Operating system

macOS

Details on version and operating system

Mac OS X 13.4 aarch64 JabRef 6.0-alpha.65--2025-01-29--5ace0ef

Checked with the latest development build (copy version output from About dialog)

  • 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. Open a non-empty library
  2. Click Search for unlinked local files under Lookup
  3. Search using the root directory and any file types (in my case, 50k+ files)
  4. Close the search window
  5. Re-open the Search for unlinked local files window, now search with any directory, or limit the file type
  6. Search result always shows 0 file(s)
  7. Make any changes to your library, and try to save it, JabRef could not save files.

Appendix

First search result using the root directory and any file types:

Image

The following search result using the same directory as the first one, shows 0 file(s)
Image

Image
Save library error details
org.jabref.logic.exporter.SaveException: Problems saving: java.io.FileNotFoundException: /Users/xxx/test.bib.tmp (Too many open files)
	at org.jabref@6.0.15065/org.jabref.gui.exporter.SaveDatabaseAction.saveDatabase(SaveDatabaseAction.java:282)
	at org.jabref@6.0.15065/org.jabref.gui.exporter.SaveDatabaseAction.save(SaveDatabaseAction.java:235)
	at org.jabref@6.0.15065/org.jabref.gui.exporter.SaveDatabaseAction.save(SaveDatabaseAction.java:210)
	at org.jabref@6.0.15065/org.jabref.gui.exporter.SaveDatabaseAction.save(SaveDatabaseAction.java:80)
	at org.jabref@6.0.15065/org.jabref.gui.exporter.SaveAction.execute(SaveAction.java:54)
	at org.jabref@6.0.15065/org.jabref.gui.actions.JabRefAction.lambda$new$1(JabRefAction.java:25)
	at org.jabref.merged.module@6.0.15065/org.controlsfx.control.action.Action.handle(Action.java:423)
	at org.jabref.merged.module@6.0.15065/org.controlsfx.control.action.Action.handle(Action.java:64)
	at javafx.base@23.0.1/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at javafx.base@23.0.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
	at javafx.base@23.0.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
	at javafx.base@23.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at javafx.base@23.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@23.0.1/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at javafx.base@23.0.1/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
	at javafx.base@23.0.1/javafx.event.Event.fireEvent(Event.java:199)
	at javafx.controls@23.0.1/javafx.scene.control.MenuItem.fire(MenuItem.java:459)
	at javafx.controls@23.0.1/com.sun.javafx.scene.control.GlobalMenuAdapter.lambda$bindMenuItemProperties$2(GlobalMenuAdapter.java:150)
	at javafx.base@23.0.1/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at javafx.base@23.0.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
	at javafx.base@23.0.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
	at javafx.base@23.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at javafx.base@23.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base@23.0.1/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at javafx.base@23.0.1/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.base@23.0.1/javafx.event.Event.fireEvent(Event.java:199)
	at javafx.controls@23.0.1/javafx.scene.control.MenuItem.fire(MenuItem.java:459)
	at javafx.graphics@23.0.1/com.sun.javafx.tk.quantum.GlassSystemMenu$1.action(GlassSystemMenu.java:266)
Caused by: java.io.FileNotFoundException: /Users/xxx/test.bib.tmp (Too many open files)
	at java.base/java.io.FileOutputStream.open0(Native Method)
	at java.base/java.io.FileOutputStream.open(FileOutputStream.java:295)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:237)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:185)
	at org.jabref@6.0.15065/org.jabref.logic.exporter.AtomicFileOutputStream.<init>(AtomicFileOutputStream.java:83)
	at org.jabref@6.0.15065/org.jabref.logic.exporter.AtomicFileWriter.<init>(AtomicFileWriter.java:29)
	at org.jabref@6.0.15065/org.jabref.gui.exporter.SaveDatabaseAction.saveDatabase(SaveDatabaseAction.java:259)
	... 27 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants