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

Plugin loading loops #13

Closed
joostk90 opened this issue Mar 3, 2014 · 10 comments
Closed

Plugin loading loops #13

joostk90 opened this issue Mar 3, 2014 · 10 comments

Comments

@joostk90
Copy link

joostk90 commented Mar 3, 2014

Hi!

I have installed FileHeader (v1.5.4) through Package Control (v2.0.0, ST v3.3059) on my Win 7 system and I noticed lag after loading the plugin. Opening the Packages directory new files are continuously written and removed to/from the FileHeader folder. Opening the Sublime Text console reveals a loop of the following four lines, every few seconds:

reloading plugin FileHeader.FileHeader
reloading Packages/FileHeader/FileHeader.sublime-settings
found 9 files for base name Default.sublime-keymap
found 9 files for base name Main.sublime-menu

What may be going on?

Thanks a lot! :-)

Cheers, Joost

@ghost
Copy link

ghost commented Mar 3, 2014

Hi,
Every time you open ST or the plugin changes, it will trigger loaded event, then it will unarchive FileHeader.sublime-package under Installed Packages to Fileheader under Packages. That's where ST3 differs with ST2.

But the loop of loading is not normal, may be you just open ST or Fileheader is updating. May it will help you.

@ghost ghost closed this as completed Mar 3, 2014
@joostk90
Copy link
Author

joostk90 commented Mar 4, 2014

Hello,

Thanks for your reply. The problem occurs on my business laptop where I installed the plugin. I synced my settings using Dropbox (the symlink solution of Package Control) with my other computers. The problem does not occur at home (Win 8.1 x64) if I enable FileHeader and everything works fine. The loop starts again on my business laptop (Win 7 SP1 x86).

Is there any debugging feature for your package? Or another way to troubleshoot it?

"auto_upgrade_ignore": [
    "FileHeader"
]

Also did not work... I'll try disabling everything but FileHeader and see what happens...

Thanks in advance!

Cheers, Joost

@ghost
Copy link

ghost commented Mar 4, 2014

Hi,

First, is the loop log showing again and again? Or it shows several times and disappears?

The loops proved that FileHeader is changing. It can't be FileHeader updating since the version of FileHeader is the newest. There's other reason.

In which file do you changed FileHeader settings? Settings - Default or Settings -User? That's important. It's a wrong way to change the settings in Settings - Default under ST3(ST2 is ok), because the settings will be covered when you reopen ST.

You said that you synced your settings with Dropbox, so I doubt the that's the problem. The version of Sublime Text version is 2.xxxx on your computer(Win 8.1 x64)? And version 3.xxxx on your business laptop? You changed the FileHeader settings in Settings -Default on ST2 and synced it to you business laptop with ST3. So the Setting - Default changed and recovered again and again , which means FileHeader changed again and again.

If the inference above is correct, you should stop the syncing and change FileHeader setting in Settings - User manually. If it's still not work, you can disable it in Preferences.sublime-settings with:

"ignored_packages": [
    "FileHeader"
],

or uninstall it.

@joostk90
Copy link
Author

joostk90 commented Mar 4, 2014

Hi shiyanhui,

Thank you again for taking your time to help me. 👍 :-)
I didn't change anything in the Default settings, as I'm aware of using the User settings instead. Both computers run ST2.
Now I've fixed the loop by renaming the User folder to something else, restarting ST3 and enabling FileHeader. No loop! Yay!

I'll investigate the problems inside my User folder and if I discovered and fixed it, I'll provide the solution. :-)

Cheers,
Joost

ps: This package looks to awesome to uninstall!

@joostk90
Copy link
Author

joostk90 commented Mar 4, 2014

Well,
It doesn't always loop. But if it does, it happens after loading all plugins during ST initialization. If it loops, it won't stop untill I quit the program. And additionally "plugin_host.exe" in the task manager if it doesn't quit itself.

Restarting ST with an empty User folder doesn't always cut the loop.

I just noticed that I can't reach several internet services such as ftp, may be some ports are blocked. Or traffic is blocked by a proxy. Could that be the problem?

Cheers,
Joost

ghost pushed a commit that referenced this issue Mar 4, 2014
@ghost
Copy link

ghost commented Mar 4, 2014

Hi,

I tested ST2/3 on both win8 and OSX, and found that the problem did exist on win8 with ST3. I have fixed it, and reopen your ST to update it.

Welcome to feedback!

@ghost ghost reopened this Mar 4, 2014
@joostk90
Copy link
Author

joostk90 commented Mar 4, 2014

Hi,

I just did some test on my (faster) Win8.1 computer with ST3 and FileHeader v1.5.5:
I reopened ST3 several times and searched the loops in the console.

1. 13 loops and an error: 
   [Errno 2] No such file or directory: 'C:\\Users\\Joost\\AppData\\Roaming\\Sublime Text 3\\Packages\\FileHeader\\template/header\\None.tmpl'
2.  2 loops
3. 26 loops
4.  2 loops
5. 17 loops
6.  6 loops
7. 10 loops

And they are all like:

reloading plugin FileHeader.FileHeader
reloading Packages/FileHeader/FileHeader.sublime-settings
found 10 files for base name Default.sublime-keymap
found 10 files for base name Main.sublime-menu

Maybe it is helpfull to provide the installed packages:

"installed_packages":
[
    "AAAPackageDev",
    "FileHeader",
    "HTML5",
    "Javascript Beautify",
    "jQuery",
    "Package Control",
    "Phix Color Scheme",
    "SFTP",
    "SideBarEnhancements",
    "SublimeCodeIntel",
    "SublimeHighlight",
    "Sublimerge Pro",
    "Theme - Soda"
]

They may be interfering in someway. I don't know.

Keep up the good work.

@ghost
Copy link

ghost commented Mar 5, 2014

Hi,

I have fixed it now, and it will work 100% this time. The problem is that every time you open ST3, ST3 will unarchive FileHeader.sublime-package in Installed Packages to Packages/FileHeader, and that will cause reloaded event. When reloaded, ST3 will unarchive the plugin again. That's how the loop generates. Only ST3 on Win8 has this problem(I didn't test it on *nix and Win7).

So update it to 1.5.6 and welcome to feedback again!

@joostk90
Copy link
Author

joostk90 commented Mar 5, 2014

Hi shiyanhui,

Updating on my Win8.1 computer works well.

And on the business laptop running Win7 SP1 x86:
I did another test run with v1.5.4: 88 times reloading plugin FileHeader.FileHeader
After upgrading to v1.5.6: 70 times reloading plugin FileHeader.FileHeader. During this I accessed the Packages/FileHeader out of curiousity. Then the following occurred:

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 115, in reload_plugin
    m.plugin_loaded()
  File "C:\Users\student.student-w7\AppData\Roaming\Sublime Text 3\Packages\FileHeader\FileHeader.py", line 69, in plugin_loaded
PermissionError: [WinError 5] Toegang geweigerd: 'C:\\Users\\student.student-w7\\AppData\\Roaming\\Sublime Text 3\\Packages\\FileHeader'
error: [Errno 13] Permission denied: 'C:\\Users\\student.student-w7\\AppData\\Roaming\\Sublime Text 3\\Packages\\FileHeader\\template/header\\Text.tmpl'

After this two other reloading events (totalling the 70). After saving an empty "test.py" no header is added. The shortcut keys don't work either. Maybe the Exception broke the plugin.

Good luck.

Joost

@ghost
Copy link

ghost commented Mar 6, 2014

Hi,
Sorry for delay. I installed Win7 x64 on vmware fusion, and tested both ST2 and ST3. They worked fine. Maybe you should uninstall FileHeader and install it again, other than updating it.

Good luck.

@ghost ghost closed this as completed Mar 6, 2014
shiyanhui added a commit that referenced this issue Sep 9, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant