sunjw / jstoolnpp

A JavaScript (JSON) tool for Notepad++ (formerly JSMinNpp) and Visual Studio Code.
GNU General Public License v2.0
283 stars 24 forks source link

Hard crash of 32bit NPP when formatting a single line of JSON #152

Closed boris-v closed 5 months ago

boris-v commented 5 months ago

Windows, NPP latest version, 32bit. Latest plugin version (1.2312). The bug is only with 32bit NPP; not reproducible on 64bit npp (same version of NPP & plugin).

Test JSON line:

[{"i": null, "j": null, "k": null, "l": "P1", "m": false, "n": "a", "o": "szdf", "p": 123456}, {"i": null, "j": null, "k": null, "l": "P2", "m": false, "n": "a", "o": "szdf", "p": 123456}, {"i": null, "j": null, "k": null, "l": "P3", "m": false, "n": "a", "o": "szdf", "p": 123456}, {"i": null, "j": null, "k": null, "l": "P4", "m": false, "n": "a", "o": "szdf", "p": 123456}, {"i": null, "j": null, "k": null, "l": "P5", "m": false, "n": "a", "o": "szdf", "p": 123456}, {"i": null, "j": "qwerty", "k": "zxcvb", "l": "P1", "m": false, "n": "a", "o": "szdf", "p": 123456}, {"i": null, "j": "qwerty", "k": "zxcvb", "l": "P2", "m": false, "n": "a", "o": "szdf", "p": 123456}, {"i": null, "j": "qwerty", "k": "zxcvb", "l": "P3", "m": false, "n": "a", "o": "szdf", "p": 123456}, {"i": null, "j": "qwerty", "k": "zxcvb", "l": "P4", "m": false, "n": "a", "o": "szdf", "p": 123456}, {"i": null, "j": "qwerty", "k": "zxcvb", "l": "P5", "m": false, "n": "a", "o": "szdf", "p": 123456}, {"i": null, "j": null, "k": "zxcvb", "l": "P1", "m": false, "n": "a", "o": "szdf", "p": 123456}, {"i": null, "j": null, "k": "zxcvb", "l": "P2", "m": false, "n": "a", "o": "szdf", "p": 123456}, {"i": null, "j": null, "k": "zxcvb", "l": "P3", "m": false, "n": "a", "o": "szdf", "p": 123456}, {"i": null, "j": null, "k": "zxcvb", "l": "P4", "m": false, "n": "a", "o": "szdf", "p": 123456}, {"i": null, "j": null, "k": "zxcvb", "l": "P5", "m": false, "n": "a", "o": "szdf", "p": 123456}]
  1. Paste the JSON into a blank npp document, single line. image
  1. It works correctly with the selection if a single newline is added to the end. Paste the JSON into a blank document, single line, add one newline (Unix - LF), Select All. image Plugin JSTool -> JSFormat with this JSON line + newline selected: image
sunjw commented 5 months ago

I couldn't reproduce this issue. You can see the screen record I attached. Is there any step wrong in the record?

https://github.com/sunjw/jstoolnpp/assets/846335/f11f681e-81d4-4a2e-8b09-c5091d047b92

boris-v commented 5 months ago

Thanks for looking into it! I cannot reproduce it anymore, either 😓

I only realized I still had the 32bit version when making this issue, and I replaced it with 64bit afterwards. I now reinstalled the 32bit version, installed the plugins, and could not reproduce it again.

Anything more is just guessing... It might be that something went wrong with one of the updates, I've had that 32bit installation for many years and I just kept upgrading NPP and the plugins.