p0358 / notepadpp-CodeStats

Notepad++ plugin for Code::Stats (https://codestats.net)
Other
38 stars 21 forks source link

Code::Stats plugin is hanging Notepad++ #4

Open ferenczy opened 6 years ago

ferenczy commented 6 years ago

When I have the plugin active, Notepad++ hangs after some time. It's 100 % reproducible. It hangs after tens of minutes to an hour. I don't have more information, unfortunately. The plugin itself is working fine, it's successfully sending the stats to the Code::Stats API.

Notepad++ version: 7.5.6 Plugin version: 1.0.1

p0358 commented 6 years ago

I'm aware of this, it sometimes does happen to me as well. I will have to investigate it soon. For now I can recommend trying to press Win+DownArrow and then Win+UpArrow (or reversed order if you don't have your Notepad++ maximized), it fixes it for me most of time.

p0358 commented 6 years ago

@ferenczy Can you possibly tell me by time, does the issue also occur with WakaTime plugin? I wonder if it's caused by my code and window messages or by former codebase.

ferenczy commented 6 years ago

I see. I'll try your suggestion with the key shortcuts. I'll be happy if it works, it still would be annoying but better than killing Notepad++ 20 times per day.

I'll try the WakaTime plugin and let you know. I have never used it so I don't know if it has the same issue now.

ferenczy commented 6 years ago

So Win + Down | Up unfortunatelly didn't help, Notepad++ is completely frozen, it's not even possible to click on window control button (minimize, close, etc.). When I press Win + Down, the window is minimized but it's not possible to make it visible or maximize it anymore.

dropcase commented 5 years ago

I had this issue (or presented similarly) when I was updating a large CSV file (find and replace) before CSV support was added. There was a long hang time while the replacements happened, anywhere from ~5 to ~15 minutes for a 10MB CSV. Does the extension you're working in matter?

StephenITSG commented 5 years ago

I am also having this issue and can confirm that it is Code:Stats specifically doing it. I have removed the plugin, works fine. Reinstalled the plugin, starts crashing again. NP++ is up to date (7.5.9) and no other plugins are installed

Thanks, Stephen

rafaelparente commented 5 years ago

In my case the hanging happens if I run anything (other programs/batches/etc.) as administrator, so maybe it's something related to the UAC screen. Tried without any other plugins, same thing. NP++ v7.6.3. edit: my User Account Control Settings are on the default level. I tried setting it to the lowest level (Never notify) which disables the UAC screen. On that setting the hanging didn't happen anymore, so it's definitely the UAC screen.

p0358 commented 5 years ago

@dropcase This was actually expected in the old version with the log spamming, it was triggering log line (along with file open and close) for each character (no way to remove this without removing support for counting XP when removing characters with Backspace, those are tied to the same notification and flags). That part will be fixed in next update, but I am sure it is separate to those freezes. @rafaelparente This is interesting behavior. I couldn't reproduce it with UAC screen, but I know that bringing up UAC screen (or pressing Ctrl+Alt+Delete) changes the active desktop. After going back to your logged in session, Windows is refreshing all windows, and it does so by window messages. I'm led to believe this issue might be somehow related to window messages, possibly communications between Notepad++ window and my plugin? For me the issue happens if I try bringing Notepad++ up from taskbar after at least a few hours after it was minimized. Or another cause might be something heavy in main thread...

ANANTHAN-HUB commented 4 years ago

how to get the code stats API key? any software need? i am new student of learn html through notepad++

p0358 commented 1 year ago

v1.1.0 was now released, which might alleviate the issue. If it still happens regularly to you, please enable debug logging in plugin settings and post log at the moment Notepad++ is frozen, which could hopefully let us spot where it happens and if it even happens inside of plugin's code control at all...

@ANANTHAN-HUB You need to create an account on https://codestats.net/ and create a new machine in the Machines tab, this will give you an API key to use in your editor.