benji300 / joplin-note-tabs

Allows to open several notes at once in tabs and pin them.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Infinite message loop?

laurent22 opened this issue · comments

I've just noticed that the plugin keeps sending messages at regular interval. If you check the main console, you'll see these messages in a loop:

main-html.js:48 12:26:08: PluginRunner: Got message (3): joplin.workspace.selectedNote
main-html.js:48 12:26:08: PluginRunner: Got message (3): joplin.settings.globalValue showCompletedTodos
main-html.js:48 12:26:08: PluginRunner: Got message (3): joplin.views.panels.setHtml <hidden>
main-html.js:48 12:26:08: PluginRunner: Got message (3): joplin.settings.setValue noteTabs []
main-html.js:48 12:26:09: Saving settings...
main-html.js:48 12:26:09: Settings have been saved.

I didn't see anything obvious in the code that could cause this, but it might be an event listener that indirectly triggers an event, which is then again caught by the same listener. It could be worth checking this as it could drain the user's battery.

Oh... didn't recognized that. Of course I will have a look at it as soon as possible. Thanks for the hint.

Hello @laurent22,

I cannot reproduce this behavior on my side. I can't see any messages from PluginRunner. They only message I see comes on App start and says:

DevTools failed to load SourceMap: Could not load content for file:///C:/Program%20Files/Joplin/resources/app.asar/PluginRunner.js.map: 

Could that be a problem?

I get the following bunch of messages on when starting Jopin in Dev mode and the plugin specified via the development plugins. But when I do nothing, I get no more messages.

image

Except I select another note, then I get the following messages.

image

I've also tested to install the plugin in dev mode, but no change.

  • What is the approximate time interval you receive these messages?
  • Which version of the plugin you're using?

My Setup:

Joplin 1.7.11 (dev, win32)

Client ID: e8cd6740a96d4da78f033fac4ae93de1
Sync Version: 2
Profile Version: 34
Keychain Supported: Yes

Revision: f560563d8 (master)

All right... I found the problem. Surprisingly, though, I really don't get the messages. But a debug output in Settings.onChange() showed the problem.

image

I guess this should be easily fixed. 👍