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

External editor bug: Joplin stops watching file #710

Closed
matthewmoppett opened this Issue Aug 7, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@matthewmoppett

matthewmoppett commented Aug 7, 2018

Operating system

  • Linux

Application

  • Desktop

After clicking on the "Edit in external editor" icon, the feature works as you'd expect. I have a file to edit, and Joplin updates the note whenever I save the file from the external editor (in my case, Neovim-gnome-terminal-wrapper, although GVim has the same problem). However, Joplin sporadically stops watching the edited file, especially if the file is saved several times in rapid succession. In that case, I have to copy my most recent work, close the file, reopen it, and paste my work back in.

I'm attaching a copy of log.txt copied after a note-taking session when the bug occurred quite frequently, just in case that has any useful information:
joplin.log.txt

Watching the console in debug mode did not yield any messages when the bug was triggered.

@laurent22

This comment has been minimized.

Owner

laurent22 commented Sep 5, 2018

Could it be the same bug as this one? #766

@matthewmoppett

This comment has been minimized.

matthewmoppett commented Sep 5, 2018

It's possible, but that bug report seems to be describing something that happens every time the file is saved. In my case, the bug occurs fairly regularly, but not every time I save the file (maybe one time in ten).

@laurent22

This comment has been minimized.

Owner

laurent22 commented Sep 9, 2018

@matthewmoppett, I cannot replicate on Windows so maybe it's something specific to Linux. Please could you add all the debug flags to flags.txt as described there? https://joplin.cozic.net/debugging/ And then if you could post the log right after the bug happens it might help figuring out what's happening.

@matthewmoppett

This comment has been minimized.

matthewmoppett commented Sep 13, 2018

The strange thing is that after turning on debug mode mode using flags.txt, the bug seems to happen much less often than normal (which is fine by me, but hardly a permanent solution!).

Anyway, eventually the bug came up again. This is a record of the console log for my current session:
console.log

And this is the last five minutes or so of activity from log.txt before the bug occurred:
logtail.txt

@laurent22

This comment has been minimized.

Owner

laurent22 commented Sep 13, 2018

I think the issue is that the file is unwatched when it is temporarily moved by emacs. I've removed the code that was causing this and it seems to work now. I don't think any new issue would popup by removing this code but let's see. It will be in the next release.

@matthewmoppett

This comment has been minimized.

matthewmoppett commented Oct 2, 2018

The latest version of Joplin (I've just updated to 1.0.111) does seem to have fixed the issue for me. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment