<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Prevent plugin from crash on v8.3 and later version: Recompile x64 plugins with new header]]></title><description><![CDATA[<p dir="auto">Dear all plugin authors,</p>
<p dir="auto">You might notice that Notepad++ v8.3 x64 binary will support opening 2GB+ files.</p>
<p dir="auto">If your plugins are also released in x64 binary, you should replace <strong>Sci_Position.h</strong> by <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/include/Sci_Position.h" rel="nofollow ugc">the new one</a> (or just replace <s><code>typedef long Sci_PositionCR;</code></s> by <code>typedef intptr_t Sci_PositionCR;</code> in <strong>Sci_Position.h</strong> of your project), then recompile your plugins.</p>
<p dir="auto">It can prevent from crash and to have the best compatibility with Notepad++ v8.3 and later versions.</p>
<p dir="auto">Feel free to leave your questions/concerning requests here. I will do my best to answer your questions/requests.</p>
<p dir="auto"><em><strong>Edit: Once you release a new version,  please update <a href="https://github.com/notepad-plus-plus/nppPluginList" rel="nofollow ugc">nppPluginList</a> with your new release, so users can update the incompatible version of plugins to the new ones directly via their new version of Notepad++.</strong></em></p>
]]></description><link>https://community.notepad-plus-plus.org/topic/22471/prevent-plugin-from-crash-on-v8-3-and-later-version-recompile-x64-plugins-with-new-header</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 18:50:54 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/22471.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 01 Feb 2022 01:21:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Prevent plugin from crash on v8.3 and later version: Recompile x64 plugins with new header on Thu, 10 Nov 2022 21:10:04 GMT]]></title><description><![CDATA[<p dir="auto">A few months ago, I’ve created a PR which was already merged to the plugins pack origin repo which targets at least some of the pointers:<br />
<a href="https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/pull/91" rel="nofollow ugc">https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/pull/91</a><br />
And there is still one open:<br />
<a href="https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/pull/95" rel="nofollow ugc">https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/pull/95</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/81361</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81361</guid><dc:creator><![CDATA[Fruchtzwerg94]]></dc:creator><pubDate>Thu, 10 Nov 2022 21:10:04 GMT</pubDate></item><item><title><![CDATA[Reply to Prevent plugin from crash on v8.3 and later version: Recompile x64 plugins with new header on Thu, 10 Nov 2022 01:08:33 GMT]]></title><description><![CDATA[<p dir="auto">V8.3.3 ussualy crash, hope v8.4.6 better than</p>
]]></description><link>https://community.notepad-plus-plus.org/post/81322</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/81322</guid><dc:creator><![CDATA[Land Market]]></dc:creator><pubDate>Thu, 10 Nov 2022 01:08:33 GMT</pubDate></item><item><title><![CDATA[Reply to Prevent plugin from crash on v8.3 and later version: Recompile x64 plugins with new header on Sun, 13 Feb 2022 02:25:44 GMT]]></title><description><![CDATA[<p dir="auto">A <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11198" rel="nofollow ugc">tracking issue</a> has been opened.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/74101</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/74101</guid><dc:creator><![CDATA[rdipardo]]></dc:creator><pubDate>Sun, 13 Feb 2022 02:25:44 GMT</pubDate></item><item><title><![CDATA[Reply to Prevent plugin from crash on v8.3 and later version: Recompile x64 plugins with new header on Tue, 01 Feb 2022 13:34:34 GMT]]></title><description><![CDATA[<p dir="auto">CS-Script is <a href="https://github.com/oleg-shilo/cs-script.npp/issues/64" rel="nofollow ugc">confirmed vulnerable</a>. Haven’t tried the others yet.</p>
<p dir="auto">I’ve taken the issue <a href="https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/issues/84" rel="nofollow ugc">upstream</a>, but even if <code>NppPlugin.NET</code> gets patched (a <a href="https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/releases" rel="nofollow ugc">new version</a> has been in pre-release for over a year), there’s no telling when/if the dependent plugins will upgrade. (At least the <a href="https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net#upgrading-to-a-newer-version" rel="nofollow ugc">migration path</a> looks easy enough.)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73566</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73566</guid><dc:creator><![CDATA[rdipardo]]></dc:creator><pubDate>Tue, 01 Feb 2022 13:34:34 GMT</pubDate></item><item><title><![CDATA[Reply to Prevent plugin from crash on v8.3 and later version: Recompile x64 plugins with new header on Tue, 01 Feb 2022 12:31:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rdipardo" aria-label="Profile: rdipardo">@<bdi>rdipardo</bdi></a> said in <a href="/post/73559">Recompile your x64 plugins with new header</a>:</p>
<blockquote>
<p dir="auto">Don’t forget the x64 plugins that target .NET Framework, for example:</p>
</blockquote>
<p dir="auto">Good point and I’ve looked at some.  I <em><strong>think</strong></em> (correct me if I’m wrong) the crash only manifests if you actually use a Scintilla call that would return a <code>Sci_TextRange</code> object and looking on <a href="https://www.scintilla.org/ScintillaDoc.html" rel="nofollow ugc">Scintilla Docs</a>, there seem to be only 2:</p>
<ul>
<li><a href="https://www.scintilla.org/ScintillaDoc.html#SCI_GETTEXTRANGE" rel="nofollow ugc">SCI_GETTEXTRANGE</a></li>
<li><a href="https://www.scintilla.org/ScintillaDoc.html#SCI_GETSTYLEDTEXT" rel="nofollow ugc">SCI_GETSTYLEDTEXT</a></li>
</ul>
<p dir="auto">I checked my version of Markdown Panel and although the “bad” Scintilla interface code is there, the plugin never uses / calls it and in my daily use of Notepad++ (using the latest dev build) Markdown Panel has not crashed for me.</p>
<p dir="auto">On the other hand, <a href="https://github.com/jokedst/CsvQuery" rel="nofollow ugc">CsvQuery</a> does crash Notepad++ and it does indeed make a <code>getTextRange()</code> call <a href="https://github.com/jokedst/CsvQuery/blob/d6cb77b001091ddcb160e091e924ab600d284fd7/CsvQuery/Main.cs#L130" rel="nofollow ugc">here</a> and <a href="https://github.com/jokedst/CsvQuery/blob/d6cb77b001091ddcb160e091e924ab600d284fd7/CsvQuery/Forms/QueryWindow.cs#L175" rel="nofollow ugc">here</a>.  An <a href="https://github.com/jokedst/CsvQuery/issues/33" rel="nofollow ugc">issue</a> has been opened.</p>
<p dir="auto">I can’t speak for the rest as I don’t use them nor do I know C# programming in the least.</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73563</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73563</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Tue, 01 Feb 2022 12:31:48 GMT</pubDate></item><item><title><![CDATA[Reply to Prevent plugin from crash on v8.3 and later version: Recompile x64 plugins with new header on Tue, 01 Feb 2022 07:46:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/donho" aria-label="Profile: donho">@<bdi>donho</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/chcg" aria-label="Profile: chcg">@<bdi>chcg</bdi></a></p>
<p dir="auto">Don’t forget the x64 plugins that target .NET Framework, for example:</p>
<ul>
<li><a href="https://github.com/oleg-shilo/cs-script.npp" rel="nofollow ugc">CS-Script</a></li>
<li><a href="https://github.com/jokedst/CsvQuery#npppluginnet-v06-07-by-ufo-pu55y-and-later-by-kbilsted" rel="nofollow ugc">CsvQuery</a></li>
<li><a href="https://github.com/davidsover/nppJSFunctionViewer" rel="nofollow ugc">JSFunctionViewer</a></li>
<li><a href="https://github.com/mohzy83/NppMarkdownPanel#prerequisites" rel="nofollow ugc">Markdown Panel</a></li>
<li><a href="https://github.com/nea/MarkdownViewerPlusPlus#compatibility" rel="nofollow ugc">MarkdownViewer++</a></li>
<li><a href="https://github.com/KvanTTT/NppGist" rel="nofollow ugc">NppGist</a></li>
<li><a href="https://github.com/wakatime/notepadpp-wakatime#compatibility" rel="nofollow ugc">WakaTime</a></li>
</ul>
<p dir="auto">These are based on <a href="https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net" rel="nofollow ugc">a .NET plugin template</a> that re-implements the Scintilla interface in C#.</p>
<p dir="auto">Looking at <a href="https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/blob/0049b172c04ecd19fe70a998abd93b095273943b/Visual%20Studio%20Project%20Template%20C%23/PluginInfrastructure/GatewayDomain.cs#L189-L195" rel="nofollow ugc">the template code</a>, it seems character ranges are defined using the <code>int</code> type:</p>
<pre><code class="language-cs">  [StructLayout(LayoutKind.Sequential)]
  public struct CharacterRange
  {
      public CharacterRange(int cpmin, int cpmax) { cpMin = cpmin; cpMax = cpmax; }
      public int cpMin;
      public int cpMax;
  }
</code></pre>
<p dir="auto">That will surely overflow as <code>int</code> is an alias for the Common Language Runtime’s <a href="https://docs.microsoft.com/en-us/dotnet/api/system.int32?view=netframework-4.0#instantiating-an-int32-value" rel="nofollow ugc"><code>Int32</code> type</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73559</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73559</guid><dc:creator><![CDATA[rdipardo]]></dc:creator><pubDate>Tue, 01 Feb 2022 07:46:49 GMT</pubDate></item><item><title><![CDATA[Reply to Prevent plugin from crash on v8.3 and later version: Recompile x64 plugins with new header on Tue, 01 Feb 2022 06:39:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/donho" aria-label="Profile: donho">@<bdi>donho</bdi></a> Shouldn’t it be at least 8.3 with such a breaking change?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73557</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73557</guid><dc:creator><![CDATA[chcg]]></dc:creator><pubDate>Tue, 01 Feb 2022 06:39:02 GMT</pubDate></item></channel></rss>