TaoK / PoorMansTSqlFormatter

A small free .Net and JS library (with demo UI, command-line bulk formatter, SSMS/VS add-in, notepad++ plugin, winmerge plugin, and demo webpage) for reformatting and coloring T-SQL code to the user's preferences.
http://www.architectshack.com/PoorMansTSqlFormatter.ashx
GNU Affero General Public License v3.0
947 stars 266 forks source link

PoorMansTSqlFormatter plugin crashes latest AppVeyor build of Notepad++ 64 bit when opening a file #246

Closed dinkumoil closed 4 years ago

dinkumoil commented 4 years ago

Description of the Issue

Today I tried the latest AppVeyor build of Notepad++ 64 bit based on commit notepad-plus-plus/notepad-plus-plus@c92b3ca57897098eb642c04bde8e3e8fec3dd651 . When I opened a file via (menu) File -> Open Notepad++ crashed. Loading a file via drag'n drop did not crash Notepad++.

After removing all plugins and adding them one by one again I was able to track down the crash's cause to the PoorMansTSqlFormatter plugin (latest version v1.6.13.31508, 64 bit). Notepad++ 64 bit crashes even if this plugin is the only plugin installed.

This happens only in the 64 bit version, 32 bit version works fine. The official Npp v7.7.1 64 bit release doesn't crash as well. The other 27 plugins in my Notepad++ installation do not cause a crash of the latest AppVeyor build of Notepad++.

Steps to Reproduce the Issue

  1. Download latest AppVeyor 64 bit debug builds of notepad++.exe and SciLexer.dll.
  2. Install PoorMansTSqlFormatter plugin v1.6.13.31508 64 bit manually.
  3. Remove all other plugins manually.
  4. Start Notepad++ and go to (menu) File -> Open and try to open e.g. the change log file of Notepad++.

Expected Behavior

The selected file should be opened.

Actual Behavior

Notepad++ crashes.

Debug Information

Notepad++ v7.7.1 (64-bit) Build time : Sep 25 2019 - 08:05:40 Path : D:\npp\Win64\notepad++.exe Admin mode : OFF Local Conf mode : ON OS Name : Windows 7 Ultimate (64-bit) OS Build : 7601.24519 Plugins : PoorMansTSqlFormatterNppPlugin.dll

Version of PoorMansTSqlFormatter plugin: 1.6.13.31508, 64 bit

How to Download AppVeyor Builds of Notepad++ And Set Up a Testing Environment

You can skip steps 1 to 6 in the list below and start with step 7 if you follow this direct link to open AppVeyor download page.

  1. Open website of Notepad++ commit tracker.
  2. Go to entry of latest commit.
  3. Click on the small green arrow at its right.

grafik

  1. In the popup window click on the Details link at its lower right corner.
  2. Click on Configuration: Unicode Debug; Platform: x64.
  3. In the menu bar above the blue box click on Artifacts.
  4. Download Notepad++.x64.Unicode Debug.exe and SciLexer.x64.Unicode Debug.dll.
  5. Rename the downloaded files to notepad++.exe and SciLexer.dll.
  6. Download a portable version of Notepad++ v7.7.1 64 bit from the official website and unzip the archive file.
  7. Copy the files of step 8 to the directory where you unzipped the portable version.
dinkumoil commented 4 years ago

The release candidate of Npp v7.8 from 2019-10-01 doesn't crash, so I close this issue.