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

Status of x64 plugins affected by ABI changes in N++ 8.3 #11198

Closed
rdipardo opened this issue Feb 13, 2022 · 25 comments
Closed

Status of x64 plugins affected by ABI changes in N++ 8.3 #11198

rdipardo opened this issue Feb 13, 2022 · 25 comments

Comments

@rdipardo
Copy link
Contributor

rdipardo commented Feb 13, 2022

Background

Since version 8.3, x64 builds of Notepad++ can open files >2GiB in size. To achieve this, the type of Scintilla's Sci_PostionCR message was changed to intptr_t, which expands to eight bytes on x86_64 architecture.

See:

Plugin List

The following collects what has been reported1 about plugins distributed in x86_64 versions

Name Status First patched version Suggested alternative (pre-release, or from a different source than the Plugins Admin distribution)
AnalysePlugin 1.13.49
AutoIndentDetect 2.1
BracketsCheck not affected
ColumnTools 1.4.4.1
Comment Wrap 1.0.0.5
ComparePlugin 2.0.2
CS-Script 1.7.29
CsvQuery 1.2.9
DSpellCheck 1.4.23
Elastic Tabstops 1.3.2 https://ci.appveyor.com/project/dail8859/elastictabstops/builds/43155677/job/8aohta1g2deuc24t/artifacts
FWDataViz 2.4.0.2
GitSCM 1.4.6.1
GotoLineCol 2.2.0.2
HTML Tag 1.2
jN 2.2.185.7
JSMinNPP not affected
JSFunctionViewer not affected
LuaScript 0.12
MarkdownPanel not affected
MarkdownViewer++ not affected
mimeTools 2.7
NppConverter 4.4
NppExport 0.4
NppGist 1.5.1
NPPJSONViewer not affected
NppTaskList 2.4
nvda-notepadPlusPlus 2022.05.1
Papyrus Script 0.3.0.24
Python Indent 1.0.0.4
PythonScript 2.0.0 https://github.com/bruderstein/PythonScript/releases/tag/v3.0.12 (Note Win7 support has been dropped)
QuickColorPicker 2.1.2.1
QuickText 0.2.4.1
SecurePad 2.4
SelectToClipboard 1.0.3
SpeechPlugin 0.4
VisualStudioLineCopy 1.0.0.2
TagLEET ??? https://github.com/vinsworldcom/nppTagLEET/releases/tag/1.3.10.1
WakaTime not affected
XBrackets Lite 1.3.1
XMLTools 3.1.1.12

Related Issues

Only those reported against N++ are listed

To expedite closing duplicates, maintainers are encouraged to mention this issue


Notes

Footnotes

  1. Current as of 2022-11-08 1:52 PM EST

@xomx
Copy link
Contributor

xomx commented Feb 13, 2022

What I miss in N++ is a definition of some NPP_PLUGIN_INTERFACE_VERSION. It should be obligatory for all the N++ plugins (ABI compatibility check). Or am I overlooking something?

Unfortunately even the above NPP_PLUGIN_INTERFACE_VERSION does not solve current external apps Scintilla/N++ incompatibility (e.g. NVDA). Scintilla itself should abandon its archaic typedef long Sci_PositionCR; for the Windows 64-bit platform.

Edited:
IMO: They (Scintilla) know that this is a problem, see my comment about SciTe here.

@vinsworldcom
Copy link

@rdipardo I would not list TagLEET 1.3.9.7 as fixed. The original author @gstavi of the official TagLEET still has the links in the plugin list and my version is a just a copy I work on making improvements that I wanted that diverged from what @gstavi was supporting at the time. I only create "pre-releases" and they are not in the official plugin list.

Further, my 1.3.9.7 version just compiles with the new headers to stop the access violation crash. I do not correct all the Scintilla positions returning Sci_Position instead of int so while it works in >N++ 8.3, it will most likely still crash on >2Gb files.

Cheers.

@rdipardo
Copy link
Contributor Author

rdipardo commented Feb 13, 2022

@xomx,

What I miss in N++ is a definition of some NPP_PLUGIN_INTERFACE_VERSION. It should be obligatory for all the N++ plugins (ABI compatibility check). Or am I overlooking something?

Something like it was suggested after the SCNotification structure was enlarged in N++ 7.7

The (proposed) ABI check was only intended for CI workflows: notepad-plus-plus/nppPluginList#250 (comment)
All previously implemented attempts at catching problem plugins at runtime have been limited to intercepting the library loader, a recent example being HexEdit.

@ArkadiuszMichalski has developed an automated plugin crash detector: https://github.com/ArkadiuszMichalski/NPP_tools
Likewise, it only catches exceptions during DLL load. Testing Scintilla interop would require a kind of Selenium framework for text editors.

IMO: They (Scintilla) know that this is a problem, see my comment about SciTe here.

As you pointed out, SciTE uses only Sci_Position, which has been typedefed as ptrdiff_t since version 4.0.0.
N++ currently links against 4.4.6, so the platform-independent Sci_Position was always available for large file support (as the author of XBrackets Lite has just recently demonstrated). Granted, a Sci_Position would have still left many plugins broken (something SciTE doesn't have to worry about), but using the given interface type would have eliminated the need to patch Scintilla 5.x (which retains the legacy Sci_PositionCR), whenever the long-awaited platform jump is finished.

@vinsworldcom
Copy link

XMLTools

The most updated version is 3.1.1.12.

@vinsworldcom
Copy link

@rdipardo You may also add:

CsvQuery by @jokedst with the open issue at: jokedst/CsvQuery#33

In an email correspondence, he said he was still supporting the plugin and would provide a fix, though no ETA.

Cheers.

@rdipardo
Copy link
Contributor Author

Update

@rdipardo
Copy link
Contributor Author

@xomx ,

What I miss in N++ is a definition of some NPP_PLUGIN_INTERFACE_VERSION. It should be obligatory for all the N++ plugins (ABI compatibility check). Or am I overlooking something?

notepad-plus-plus/nppPluginList#416

7.7 was the first opportunity, then along comes 8.3 . . . maybe the 3rd time will be the charm?

@xomx
Copy link
Contributor

xomx commented Feb 20, 2022

If an INTERFACE_VERSION exists, we can e.g.:

// For Sci_CharacterRange  which is defined as long to be compatible with Win32 CHARRANGE
#if INTERFACE_VERSION > 1
typedef intptr_t Sci_PositionCR;
#else
typedef long Sci_PositionCR;
#endif

Unfortunately a dynamic flexible API/ABI is not easy to implement. So using the above INTERFACE_VERSION (together with the above mentioned nppPluginList proposal of npp-version) is probably the easiest way, how to automatically ensure the ABI compatibility of N++ plugins in the future.

@vinsworldcom
Copy link

vinsworldcom commented Feb 24, 2022

@rdipardo AnalysePlugin is on the way to being fixed: v01.13-pre1

@rdipardo
Copy link
Contributor Author

rdipardo commented Apr 4, 2022

Update

Plugins Admin 1.4.9 will feature new stable versions of Comment Wrap, Python Indent and VisualStudioLineCopy.

Bobsson added a commit to Bobsson/ElasticTabstops that referenced this issue Apr 5, 2022
@rdipardo
Copy link
Contributor Author

rdipardo commented Apr 6, 2022

Update

@vinsworldcom
Copy link

@rdipardo I have an alternative for CsvQuery

@rdipardo
Copy link
Contributor Author

@rdipardo I have an alternative for CsvQuery

Noted.

@rdipardo
Copy link
Contributor Author

P.S.
In case anyone wants to adopt another orphaned plugin, I posted a patched build of SelectToClipboard, but @KubaDee still hasn't reacted.

@jokedst
Copy link

jokedst commented Apr 27, 2022

I've released a new version of CsvQuery. A pull request for the plugin list has been created. So no need to switch to the alternative :P

@vinsworldcom
Copy link

@rdipardo, @jokedst has released the official CsvQuery 1.2.9 update for Notepad++ >= 8.3. You can remove my alternate link and update CsvQuery as working with 1.2.9 version (tested by me on Notepad++ 8.4, though not rigorously).

Cheers.

@donho
Copy link
Member

donho commented Apr 27, 2022

@jokedst @vinsworldcom
List updated.

@vinsworldcom
Copy link

vinsworldcom commented Apr 28, 2022

@donho, thanks - but the list above in the first comment of this issue for CsvQuery should also be updated to reflect:

First patched version: 1.2.9
Suggested alternative (pre-release, or from a different source than the Plugins Admin distribution): [blank]

I have removed my forked repo so the link currently in "Suggested alternative ..." no longer works - and with @jokedst 's update, my fork is no longer needed.

Cheers.

@rdipardo
Copy link
Contributor Author

I have removed my forked repo so the link currently in "Suggested alternative ..." no longer works

@vinsworldcom, you can restore it anytime within the next 30 days at https://github.com/settings/deleted_repositories

@vinsworldcom
Copy link

@rdipardo thanks, but I'm hoping there isn't a need to, since @jokedst has updated the official version!

Cheers.

@KubaDee
Copy link

KubaDee commented May 5, 2022

P.S. In case anyone wants to adopt another orphaned plugin, I posted a patched build of SelectToClipboard, but @KubaDee still hasn't reacted.

Thanks for pointing me. Just fixed it now. PR into plugin-list will follow soon.

@rdipardo
Copy link
Contributor Author

Updated with newest jN release.

@rdipardo
Copy link
Contributor Author

BTW, informational issues like this one should be pinned to the top of the issue tracker.
It will remain visible even after it's closed.

@donho donho pinned this issue Jun 30, 2022
@rdipardo
Copy link
Contributor Author

Looking good! There is still room for #11766

@rdipardo
Copy link
Contributor Author

rdipardo commented Nov 8, 2022

Closing because:

  1. The last remaining hold-out is the orignal TagLEET plugin, which seems abandoned.
    The patched fork should be good enough for most users. Any problems with it can be reported to the plugin maintainer(s).

  2. Scintilla has begun providing 64-bit positions on the Windows platform.
    All current and future plugin develpment should be utilizing the new suite of *FULL APIs. Unmaintianed plugins will eventually be left behind; but that will be a separate issue entirely.

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

6 participants