notepadpp-CodeStats icon indicating copy to clipboard operation
notepadpp-CodeStats copied to clipboard

Code::Stats plugin is hanging Notepad++

Open ferenczy opened this issue 6 years ago • 10 comments

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

ferenczy avatar Jun 12 '18 11:06 ferenczy

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 avatar Jun 24 '18 14:06 p0358

@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.

p0358 avatar Jul 03 '18 07:07 p0358

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 avatar Jul 12 '18 16:07 ferenczy

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.

ferenczy avatar Jul 13 '18 11:07 ferenczy

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?

dropcase avatar Jan 09 '19 17:01 dropcase

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

StephenITSG avatar Mar 05 '19 17:03 StephenITSG

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.

rafaelparente avatar Mar 12 '19 14:03 rafaelparente

@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...

p0358 avatar May 18 '19 23:05 p0358

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

ANANTHAN-HUB avatar Apr 22 '20 12:04 ANANTHAN-HUB

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.

p0358 avatar Oct 20 '22 16:10 p0358