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

Fixes issue where Unix crashes when inotify is full #6637

Merged
merged 7 commits into from Jul 1, 2020
Merged

Fixes issue where Unix crashes when inotify is full #6637

merged 7 commits into from Jul 1, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jun 23, 2020

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
Copy link
Member

@koppor koppor left a comment

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)

src/main/java/org/jabref/JabRefGUI.java Outdated Show resolved Hide resolved
@@ -29,11 +31,14 @@

private final Multimap<Path, FileUpdateListener> listeners = ArrayListMultimap.create(20, 4);
private WatchService watcher;
private Optional<JabRefException> filesystemMonitorFailure;
Copy link
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
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
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
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.
Copy link
Member

@koppor koppor left a comment

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.

@@ -9,12 +8,17 @@
*/
public class DummyFileUpdateMonitor implements FileUpdateMonitor {
@Override
public void addListenerForFile(Path file, FileUpdateListener listener) throws IOException {
public void addListenerForFile(Path file, FileUpdateListener listener) {
Copy link
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.

src/main/java/org/jabref/JabRefGUI.java Show resolved Hide resolved
@koppor
Copy link
Member

koppor commented Jun 30, 2020

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 koppor and Siedlerchr 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