Skip to content

Fixes issue where Unix crashes when inotify is full#6637

Merged
koppor merged 7 commits into
masterfrom
unknown repository
Jul 1, 2020
Merged

Fixes issue where Unix crashes when inotify is full#6637
koppor merged 7 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jun 23, 2020

Copy link
Copy Markdown

Previously, the program was crashing for Unix users when inotify had reached its max file limit. Since the only way to fix this seems to be to close applications or to edit privileged system files, the proposed solution is to notify the user of the issue and give them the option of continuing usage of the application. Fixes #6073

Caleb Tillman added 2 commits June 23, 2020 18:05
Previously, the program was crashing for Unix users when inotify had reached its max file limit. Since the only way to fix this seems to be to close applications or to edit privileged system files, the proposed solution is to notify the user of the issue and give them the option of continuing usage of the application. fixes #6073
Previously, the program was crashing for Unix users when inotify had reached its max file limit. Since the only way to fix this seems to be to close applications or to edit privileged system files, the proposed solution is to notify the user of the issue and give them the option of continuing usage of the application. fixes #6073

@koppor koppor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR. Could you try to reformat the code according to our style rules (otherwise CheckStyle will fail:

image

Could you create a FAQ entry to https://github.com/JabRef/user-documentation/blob/master/en/faqgeneral.md? (Taking the links from #6073)

Comment thread src/main/java/org/jabref/JabRefGUI.java Outdated

private final Multimap<Path, FileUpdateListener> listeners = ArrayListMultimap.create(20, 4);
private WatchService watcher;
private Optional<JabRefException> filesystemMonitorFailure;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, it's OK to store the exception (for future work).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? I am not sure what the code change is that you are requesting.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was more a comment to a second reviewer.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caleb Tillman added 3 commits June 25, 2020 13:43
Style edits according to JabRef preferences.

@koppor koppor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the quick update. Still have some comments about the localization.

@calixtus Maybe we need to have a discussion about the archicture here. I did not look deep into the code about the control flow of the Exception not being thrown any more, but at some later point in time checked for an error.

public class DummyFileUpdateMonitor implements FileUpdateMonitor {
@Override
public void addListenerForFile(Path file, FileUpdateListener listener) throws IOException {
public void addListenerForFile(Path file, FileUpdateListener listener) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exception was removed here, but not in the interface. I think, it should also be removed here (and the JavaDoc be adapted).

With the current implementation, it does not throw an exception if the file does not exist.

Comment thread src/main/java/org/jabref/JabRefGUI.java
@koppor

koppor commented Jun 30, 2020

Copy link
Copy Markdown
Member

Since this is an important fix, it should not be stalled. @cttillman We hope that you'll include other improvements in JabRef, so we want to share knowledge about the coding ideas in JabRef. The localization is a difficult thing here. Would you mind to fix the localization isse?

grafik

Added #6073 error message to localizaiton file.
@ghost ghost requested review from Siedlerchr and koppor July 1, 2020 14:49
@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jul 1, 2020
@koppor koppor merged commit e8eb8e6 into JabRef:master Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uncaught Exception: "You need to start the file monitor before watching files" when opening a file

2 participants