molsonkiko / JsonToolsNppPlugin

A Notepad++ plugin providing tools for JSON like linting, querying, a tree view, and CSV conversion.
Apache License 2.0
70 stars 9 forks source link

UI tests sometimes cause Notepad++ to hang indefinitely #45

Closed molsonkiko closed 6 months ago

molsonkiko commented 10 months ago

In version 5.5 I added UI tests, to reduce the amount of playing around with the plugin after making changes.

These tests work great about 80-90% of the time, and the rest of the time they do weird stuff and cause Notepad++ to hang. This almost always happens after overwriting one of the UI buffers with 2000 lines of the JSON array [1]. If you look closely at the bottom of the Notepad++ window, it seems like the amount of selected text is slowly increasing. Eventually the tests all finish running, but then Notepad++ is locked up and unresponsive anyway. Very odd.

I should clarify that this is only a problem with the UI tests themselves and the multi-selection system is not generally this glitchy.

Debug info:

Notepad++ v8.5.5   (64-bit)
Build time : Aug  7 2023 - 18:44:22
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Home (64-bit)
OS Version : 22H2
OS Build : 19045.3324
Current ANSI codepage : 1252
Plugins : 
    ComparePlus (1.1)
    CSVLint (0.4.6.5)
    DSpellCheck (1.5)
    EnhanceAnyLexer (1.1.3)
    HexEditor (0.9.12)
    HTMLTag (1.4.1)
    HugeFiles (0.4.1)
    JsonTools (5.5)
    mimeTools (2.9)
    NavigateTo (2.6)
    NppConverter (4.5)
    NppExport (0.4)
    NppLspClient (0.0.13)
    PythonScript (3.0.16)
    QuickText (0.2.5.1)
    XMLTools (3.1.1.13)
molsonkiko commented 10 months ago

Since some of the changes made between v5.6, this problem is largely fixed.

molsonkiko commented 8 months ago

As of v5.8, I think this is completely fixed.

I'm pretty sure the problem was doing asynchronous operations in the tests before the UI tests, which is no longer happening since the API request tests were moved after the API tests.

molsonkiko commented 6 months ago

I haven't seen this issue even once in quite some time, so I'm closing it.