sieukrem / jn-npp-plugin

Plugin for Notepad++ allowing you to automate some tasks using JavaScript
https://github.com/sieukrem/jn-npp-plugin/wiki
107 stars 24 forks source link

jN Npp plugin 2.2.185.6 seems to crash on latest Notepad++ 8.4.2 64 bit #110

Closed mahaju closed 2 years ago

mahaju commented 2 years ago

Describe the bug With the plugin running, Notepad++ crashes after some period of use (sometimes it is 10 minutes, some times it is 30 minutes). Notepad++ closes suddenly, with no indication of anything going wrong if it is reopened.

To Reproduce Steps to reproduce the behavior:

  1. Install jN plugin 2.2.185.6 from plugin manager
  2. Open a number of documents (I use the "Use folder as workspace..." feature
  3. Keep using normally for few minutes
  4. Notepad++ suddenly closes with no warnings or errors

Expected behavior Notepad++ should keep running

Screenshots

Environment

Additional context My post on Notepad++ forum: https://community.notepad-plus-plus.org/topic/23100/notepad-8-4-2-64-bit-suddenly-closes-for-no-reason/2?_=1655081837121

I have not extensively tested if the problem is with the plugin, but this is the only plugin I manually installed (Mime tools, converter, NppExport plugins were already installed, I did not touch anything in the default installation) and it seems to be fixed when I downgrade Notepad++ (currently using v8.2.1 64 bit). This behaviour is consistent with other forum posts related to latest Notepad++ installations crashing randomly.

sieukrem commented 2 years ago

@mahaju thanks for mailing the issue, I will check whether it is possible to release new plugin version without breaking compatibility with old version of N++.

sieukrem commented 2 years ago

@mahaju can you please test the fix!

  1. Download the jN.dll from artifacts list https://ci.appveyor.com/project/sieukrem/jn-npp-plugin/build/job/o830xe6meo62mtuw/artifacts
  2. Replace the existing one in <notepad++>\plugins\jN directory
DriverOp commented 2 years ago

I tested the fix in Notepad++ v8.4.2 (64 bit) on Windows 10 2H21. Although the program does not quit abruptly now, a modal window appears with an error message. Something like "Microsoft Visual C++ Runtime Library...". HEAP CORRUPTION DETECTED...." This happens in my case when I double-click on a word in the text I am editing. Screenshot 2022-06-15 091935

sieukrem commented 2 years ago

@DriverOp @mahaju Please test the next fix https://ci.appveyor.com/project/sieukrem/jn-npp-plugin/builds/43905684/job/771cdqlu1bfhp4e7/artifacts

DriverOp commented 2 years ago

Hello @sieukrem I think we have a winner. So far so good.

sieukrem commented 2 years ago

@mahaju, @DriverOp thanks for support! The new release is already scheduled.

donho commented 2 years ago

@sieukrem Thank you for fixing the bug and for the new release. Please don't forget updating in Npp Plugin List by adding "npp-compatible-versions" && "old-versions-compatibility" information. (https://npp-user-manual.org/docs/plugins/#rules-for-adding-your-plugins-into-list)

donho commented 2 years ago

FYI: https://github.com/notepad-plus-plus/nppPluginList/commit/572e42a535a2d37762c2a20770e998b3569ac4b3

sieukrem commented 2 years ago

@donho Thanks, you were faster than me!

donho commented 2 years ago

@sieukrem No problem. It's because I'm doing the v8.4.3 release candidate, and I need a updated plugin list :) Please keep "npp-compatible-versions" && "old-versions-compatibility" information as they are now for the future release. So users will not have any unstable issue. Thank you for this awesome plugin!