Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When trying to save a new XSLT (Save As...) in Notepad++, the App goes to "not responding" #154

Closed
lucky1luc opened this issue Mar 29, 2022 · 16 comments

Comments

@lucky1luc
Copy link

Notepad++ v8.3.3 (64-bit)
Build time : Mar 13 2022 - 17:20:02
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 11 (64-bit)
OS Version : 2009
OS Build : 22000.556
Current ANSI codepage : 1252
Plugins : ComparePlugin.dll mimeTools.dll NppConverter.dll NppExport.dll NppHorizontalRuler.dll SQLinFormNpp64.dll XMLTools.dll

image

The XSLT is +/-49000 lines big.
I reproduce this by

  • I create an XSLT with Mapforce
  • Paste the XSLT in a new document in notepad++
  • Do file, Save As, select a folder, enter a filename and click OK
  • Notepad becomes unresponsive.

Remarks:

  • When I kill the process, and restart Notepad (the XSLT is temp saved, so is still in Notepad++ and press save as, it saves within a couple of seconds.
    **- When I remove the XML-tools plugin, the saving is (almost) instanteneous.
  • When I reinstall the XML-Tools (from the plugin-admin) the behaviour returns.**
  • Notepad++ (Not responding is top CPU user:
    image
    It indicates that Notepad++ is doing something in Memory which is taking a lot of effort (and after one hour of this, notepad is still not responding.
@vinsworldcom
Copy link

@lucky1luc have a try on this pre-release. You'll need to manually install over your current XMLTools.dll but let us know if it solves the problem. This is 3.1.1.13 prerelease that is addressing few other new issues that cropped up lately - perhaps due to the Notepad++ / Scintilla API changes.

Cheers.

@morbac
Copy link
Owner

morbac commented Mar 29, 2022

@lucky1luc, @vinsworldcom, a new pre-release was built to fix issue #152
I suspect that both issues have same cause : an internal conversion UTF-8 to UCS2 (required by MSSQL) was not optimized and very slow on big files. This conversion is perfomed on XML syntax check. Therefore if you have the "Enable XML syntax auto-check" option enabled, the XML syntax check is performed automatically on every Save.

@lucky1luc
Copy link
Author

Thank you, I will first attempt to switch off the "Enable XML syntax auto-check" before trying to install software which is not on GitHub. With all due respect, I do not want to download a file from an unknown source. That is an unacceptable risk for me. Then I rather wait until the official version comes out, and it can be installed from the official site.

@mimccu
Copy link

mimccu commented Mar 31, 2022

I disabled the "Enable XML syntax auto-check" and I was able to save a 2 MB XML file quickly. However, when using "Evaluate XPath Expression" it still failed (hour glassed). I'm assuming it did a XML syntax check at that point. Any word on when a regular release is coming and not a pre-release?

@mimccu
Copy link

mimccu commented Mar 31, 2022

@vinsworldcom - what is the most recent prior version of Notepad++ that uses an older version of the Scintilla API that is compatible with the XML Tools plugin? I can go back to a prior version of Notepad++ to make this work.

@vinsworldcom
Copy link

@mimccu I think 8.2.1

@morbac
Copy link
Owner

morbac commented Mar 31, 2022

Any word on when a regular release is coming and not a pre-release?

I plan to build a new release during incoming weekend.

@mimccu
Copy link

mimccu commented Mar 31, 2022

My colleague is on Notepad++ 8.2.1 and she does not have issues. However, I went back to version 8.2.1 and still have issues, so I'm not entirely sure it's due to the Scintilla API changes in more recent versions of Notepad++.

My plugin version is:
image

@Gitoffthelawn
Copy link

Gitoffthelawn commented Apr 1, 2022

What's the easiest way to check which version of Scintilla your current version of Notepad++ is using?

Surprisingly, it doesn't seem to be specified in the Notepad++ About or Debug Info windows.

@rdipardo
Copy link

rdipardo commented Apr 1, 2022

@Gitoffthelawn,

What's the easiest way to check which version of Scintilla your current version of Notepad++ is using?

The only place to find that is the version.txt file in the git repository.

But the above discussion has nothing to do with the version of Scintilla. All Notepad++ versions from 7.9.4 to now have used Scintilla 4.4.6.

What did change after version 8.2.1 is the size of an important data structure that plugins like XMLTools depend on.
Notepad++ made this change independently of Scintilla, in order to support files sizes of >2 GB.

Funny thing is, Scintilla has provided this ability for a long time. The announcement of Scintilla 4.1.6 reads in part:

The major feature of this release is support for files larger than 2 gigabytes in SciTE

("SciTE" being the original Scintilla-based text editor.)

So, Notepad++ committed itself to an API that is not only incompatible with all plugins that worked in 8.2.1 — it's not even compatible with the current Scintilla!

@mimccu
Copy link

mimccu commented Apr 1, 2022

Thanks @rdipardo. Maybe we should petition Notepad++ to reverse course and use the large file size capabilities that are inherent to Scintilla instead of going outside Scintilla to support large file sizes? (I'm hoping I interpreted what you said correctly).

@morbac
Copy link
Owner

morbac commented Apr 2, 2022

New release 3.1.1.13 should fix the issue

@mimccu
Copy link

mimccu commented Apr 4, 2022

Thanks very much @morbac -- I used release 3.1.1.13 with Notepad++ 8.3.3 64 bit version for Windows and both saving a XML file and evaluating XPath expressions are working now. Note that using the Plugin Admins tool under Notepad++ does not see XML Tools version 3.1.1.13 yet -- it only sees the prior version available for download.

@mimccu
Copy link

mimccu commented Apr 4, 2022

On a separate note, can you tell me if this is a known issue under XML Tools? I have a FHIR Bundle that declares a default namespace at the top level. If I use evaluate XPath expression with the default namespace, it does not find any entries that match. However, if I remove the default namespace, evaluate XPath expression works. I tried to declare a default namespace under evaluate XPath expression but that didn't produce any better results.
Here's an example:

Thanks,
Mike

@537mfb
Copy link

537mfb commented Apr 5, 2022

Can confirm version 3.1.1.13 fixes the not responding issue

@morbac
Copy link
Owner

morbac commented Apr 5, 2022

Note that using the Plugin Admins tool under Notepad++ does not see XML Tools version 3.1.1.13 yet -- it only sees the prior version available for download.

A pull request has been sent and merged in NPP plugin a few days ago. Therefore plugin admin will show version 3.1.1.13 when next NPP version will be released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants