Error when trying to use an external editor

  • Joplin 2.9.17 (prod, linux)
  • Sync to filesystem
  • Only tried WYSIWYG editors
  • Debian GNU/Linux 11, kernel 5.10.0-21-amd64
  • Joplin is installed from the GitHub script:
    wget -O - | bash

Nothing happens when I try to use an external editor. In the options, the editor is set to default (mousepad).

When started from the terminal (command /home/[user]/.joplin/Joplin.AppImage %u), when clicking the toggle external editing button:
corrupted size vs. prev_size

Log when clicking the toggle external editing button:
2023-03-23 11:20:47: "CommandService::execute:", "toggleExternalEditing", "[]" 2023-03-23 11:20:47: "CommandService::execute:", "startExternalEditing", "["36e2e8f62c304e08a051cfb59f9901b2"]" 2023-03-23 11:20:47: "ExternalEditWatcher: Started watching /home/[user]/.config/joplin-desktop/" 2023-03-23 11:20:47: "ExternalEditWatcher: Event: add: /home/[user]/.config/joplin-desktop/" 2023-03-23 11:20:59: "ResourceService::indexNoteResources: Start" 2023-03-23 11:20:59: "ResourceService::indexNoteResources: Completed" 2023-03-23 11:20:59: "ResourceService::deleteOrphanResources:", "[]" 2023-03-23 11:21:00: "CommandService::execute:", "toggleExternalEditing", "[]" 2023-03-23 11:21:00: "CommandService::execute:", "stopExternalEditing", "["36e2e8f62c304e08a051cfb59f9901b2"]" 2023-03-23 11:21:00: "ExternalEditWatcher: Stopped watching /home/[user]/.config/joplin-desktop/"


Does it happen on just one specific note or any of them ?

Just tried this from an Ubuntu-based Linux distro with same Joplin version and I don't have the issue, neither the error you mention.
Is the log obtained coming from Dev console ? In my case, even with verbose mode enabled, I can see only the following 2 lines (with time, profile and note paths details as in your log, that I have stripped off here) :

ExternalEditWatcher: Started watching
ExternalEditWatcher: Stopped watching

corrupted size vs. prev_size error apparently refers to memory allocation issue in C++. Maybe to be related to Joplin's framework Electron which uses C++?
Maybe to have more indications you will want to run Joplin through valgrind as suggested at the page linked above and try reproducing the error (I am not sure what to expect having myself never used valgrind).

1 Like

Yes, it happens on any note.
The log is produced in debug mode using the method described here: (I can't post links :slightly_smiling_face:)
I saw the information about memory allocation errors too, but it didn't give me any insight. Speaking about the Valgrind, how can I run Joplin through it? Isn't it just a memory checker? When I try to run Valgrind on Joplin.AppImage binary, it prints the following:

Cannot mount AppImage, please check your FUSE setup. You might still be able to extract the contents of this AppImage if you run it with the --appimage-extract option.

Even when I figure out how to run Valgrind on Joplin, will it be able to reproduce the state in which I try to open external editor?

Right now, I ended up with the command
valgrind --leak-check=full --show-leak-kinds=all -s -v --trace-children=yes /home/[user]/.joplin/Joplin.AppImage
which prints that it cannot mount AppImage, one No such file or directory error and four memory leaks (four non-freed blocks).

I will update this thread after figuring out how to use the Valgrind.
Anyway, I think I must make a bug report, but should I post it in joplin/issues or research the error more and post it directly to electron/issues?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.