<?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[Debugging &quot;Plugin Crash&quot;]]></title><description><![CDATA[<p dir="auto">How do I figure out the cause of the following error message types:</p>
<hr />
<h2>Plugin Crash</h2>
<h2>XPatherizerNPP.dll just crashed in<br />
notify(SCNotification *notification) :<br />
notification-&gt;nmhdr.code == 1005<br />
notification-&gt;nmhdr.hwndFrom == 0000000000080938<br />
notification-&gt;nmhdr.idFrom == -611365728</h2>
<p dir="auto">I am trying to resurrect XPatherizerNPP: <a href="https://code.google.com/archive/p/xpatherizernpp/" rel="nofollow ugc">https://code.google.com/archive/p/xpatherizernpp/</a></p>
<p dir="auto">I’ve successfully compiled the plugin and gotten Npp 7.5.4 to run it - I had to replace the NPPPluginNetHelper.cs code with the newer version from NppToolBucket.</p>
<p dir="auto">When I open NotePad++ I receive a number of crash warnings like the example above. The plugin actually works great, it seems as though the errors are inconsequential…</p>
<p dir="auto">I’ve set Notepad++ as the external program in VS 2017 Community and put in break points, but I’ve spent about 3 hours looking for the error and can’t isolate it.</p>
<p dir="auto">I have <em><strong>literally</strong></em> no idea what I’m doing. I don’t code in C# and the first time I took a swing at N++ plugins was last Friday. Any pointers would be appreciated as I intend to get this plugin working again hell or high water.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/15320/debugging-plugin-crash</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 20:54:41 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/15320.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 23 Feb 2018 20:31:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Debugging &quot;Plugin Crash&quot; on Thu, 29 Mar 2018 18:06:18 GMT]]></title><description><![CDATA[<p dir="auto">Ok, I’ve merged the branch back into master and it seems like everything works… I don’t know what the XPML functionality is supposed to be, and without a working version I’m not sure how to troubleshoot it. I’ve removed the XPML options from the menu.</p>
<p dir="auto">The functional 32 bit version of the plugin is available here:</p>
<p dir="auto"><a href="https://github.com/shrout1/xpatherizernpp" rel="nofollow ugc">https://github.com/shrout1/xpatherizernpp</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/31306</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/31306</guid><dc:creator><![CDATA[shrout1]]></dc:creator><pubDate>Thu, 29 Mar 2018 18:06:18 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging &quot;Plugin Crash&quot; on Fri, 16 Mar 2018 19:19:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chcg" aria-label="Profile: chcg">@<bdi>chcg</bdi></a> Thanks! I have changed the plugin to 32 bit.</p>
<p dir="auto">I’ve actually got the SCI_GETTEXT working by utilizing the “ScintillaGateway” object as defined in the plugin infrastructure I’ve integrated.</p>
<p dir="auto">It appears that the old “SciMsg.SCI_GETTEXT” was returning ASCII when I needed Unicode. The plugin infrastructure somehow resolves this, and I’m simply leaning on that to get it done.</p>
<p dir="auto">Now my issue appears to be that the XML Nodes are being parsed incorrectly… The parent node is being listed as a child of itself in the output… I’m slowly digging through the source code to figure out what element is chopping up the XML.</p>
<p dir="auto">Thanks for the help and suggestions! I’ve uploaded the new code to GIT again.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30956</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30956</guid><dc:creator><![CDATA[shrout1]]></dc:creator><pubDate>Fri, 16 Mar 2018 19:19:31 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging &quot;Plugin Crash&quot; on Fri, 16 Mar 2018 19:05:26 GMT]]></title><description><![CDATA[<p dir="auto">Did you build the plugin for 32bit and checked that it is working there as expected?</p>
<p dir="auto">Additionally maybe remove the int casts in NppPluginNETHelper.cs from</p>
<pre><code>    public ClikeStringArray(int num, int stringCapacity)
    {
        _nativeArray = Marshal.AllocHGlobal((num + 1) * IntPtr.Size);
        _nativeItems = new List&lt;IntPtr&gt;();
        for (int i = 0; i &lt; num; i++)
        {
            IntPtr item = Marshal.AllocHGlobal(stringCapacity);
            Marshal.WriteIntPtr((IntPtr)(_nativeArray + (i * IntPtr.Size)), item);
            _nativeItems.Add(item);
        }
        Marshal.WriteIntPtr((IntPtr)(_nativeArray + (num * IntPtr.Size)), IntPtr.Zero);
    }
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/30955</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30955</guid><dc:creator><![CDATA[chcg]]></dc:creator><pubDate>Fri, 16 Mar 2018 19:05:26 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging &quot;Plugin Crash&quot; on Fri, 16 Mar 2018 15:28:09 GMT]]></title><description><![CDATA[<p dir="auto">I’ve not given up…</p>
<p dir="auto">I discovered that the “Notification” routine in Main.CS is no longer triggered by UnmanagedExports.cs. I changed the function name to “OnNotification” and modified the argument to match the object being passed in from “beNotified” in the UnmanagedExports.cs callback.</p>
<p dir="auto">This caused the event handler to correctly trigger when NPP finishes loading, initializing the search &amp; result forms prior to  them being called. The “XPatherizerNPP.dll just crashed in runPluginCommand(size_t i : 22)” error is now gone as it is not trying to load a null form object.</p>
<p dir="auto"><em><strong>Now</strong></em> the problem is that the Scintilla interface does not appear to be returning the correct memory address for the file that is meant to be analyzed. From line 42 in NppPluginNETBase.cs:</p>
<p dir="auto">Win32.SendMessage(nppData._nppHandle, (uint) NppMsg.NPPM_GETCURRENTSCINTILLA, 0, out curScintilla);</p>
<p dir="auto">This returns an address that, when passed into “SciMsg.SCI_GETTEXT” returns a whole big bunch of gibberish (looks like Asian characters of some kind). Soooo I’m trying to figure out what’s going on with that. Slow progress! Learning as I go…</p>
<p dir="auto">I’ve updated the code in the git repo: <a href="https://github.com/shrout1/xpatherizernpp/tree/Updated_Infrastructure/XPatherizerNPP" rel="nofollow ugc">lhttps://github.com/shrout1/xpatherizernpp/tree/Updated_Infrastructure/XPatherizerNPP</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/30952</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30952</guid><dc:creator><![CDATA[shrout1]]></dc:creator><pubDate>Fri, 16 Mar 2018 15:28:09 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging &quot;Plugin Crash&quot; on Thu, 01 Mar 2018 16:34:39 GMT]]></title><description><![CDATA[<p dir="auto">So it’s choking on the ScNotification messages when Notepad++ runs “UnmanagedExports.cs”. The form object is “null” and I’m not sure how it creates an instance of the form… It gets through line 66 of “UnmanagedExports.cs” when trying to load the form and crashes.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30677</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30677</guid><dc:creator><![CDATA[shrout1]]></dc:creator><pubDate>Thu, 01 Mar 2018 16:34:39 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging &quot;Plugin Crash&quot; on Wed, 28 Feb 2018 20:34:42 GMT]]></title><description><![CDATA[<p dir="auto">Like to note that I only see the error “XPatherizerNPP.dll just crashed in runPluginCommand(size_t i : 22)” when I try to “Show XPatherizer Windows”</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30652</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30652</guid><dc:creator><![CDATA[shrout1]]></dc:creator><pubDate>Wed, 28 Feb 2018 20:34:42 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging &quot;Plugin Crash&quot; on Wed, 28 Feb 2018 19:08:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chcg" aria-label="Profile: chcg">@<bdi>chcg</bdi></a> - I saw your update to the DLLexport folder; didn’t catch it before I made a new update:</p>
<p dir="auto"><a href="https://github.com/shrout1/xpatherizernpp/tree/Updated_Infrastructure/XPatherizerNPP" rel="nofollow ugc">https://github.com/shrout1/xpatherizernpp/tree/Updated_Infrastructure/XPatherizerNPP</a></p>
<p dir="auto">I’m seeing a new error now: “XPatherizerNPP.dll just crashed in runPluginCommand(size_t i : 22)”</p>
<p dir="auto">Not a lot of reference material for that online.</p>
<p dir="auto">Otherwise I solved the SCNotification issues by remapping the main.cs calls to “ScNotification” in the Scintilla_iface.cs file, changed the “nc.nmhdr.code” calls to “nc.Header.Code” and redefined all the namespaces from “XPatherizerNPP” to “Kbg.NppPluginNET” and “Kbg.NppPluginNET.PluginInfrastructure”</p>
<p dir="auto">I borrowed from the <a href="NppPluginGuidHelper">https://github.com/kbilsted/NppPluginGuidHelper</a> plugin and used all infrastructure there.</p>
<p dir="auto">Any suggestions are still appreciated!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30648</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30648</guid><dc:creator><![CDATA[shrout1]]></dc:creator><pubDate>Wed, 28 Feb 2018 19:08:28 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging &quot;Plugin Crash&quot; on Mon, 26 Feb 2018 22:30:01 GMT]]></title><description><![CDATA[<p dir="auto">See <a href="https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net" rel="nofollow ugc">https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net</a> for the current version also the files are splitted up more, but has nicer interfaces to access data.<br />
Have you checked if the 32bit build suffers from the same issues?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30595</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30595</guid><dc:creator><![CDATA[chcg]]></dc:creator><pubDate>Mon, 26 Feb 2018 22:30:01 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging &quot;Plugin Crash&quot; on Mon, 26 Feb 2018 21:41:58 GMT]]></title><description><![CDATA[<p dir="auto">Stating what is probably obvious, it appears the the plugin infrastructure can’t handle the messaging protocols of the current version of Notepad++. I am trying to borrow newer implementations of the infrastructure from other plugins, though it will be patch work at best as I don’t understand most of the code I am looking at.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30592</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30592</guid><dc:creator><![CDATA[shrout1]]></dc:creator><pubDate>Mon, 26 Feb 2018 21:41:58 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging &quot;Plugin Crash&quot; on Mon, 26 Feb 2018 16:48:02 GMT]]></title><description><![CDATA[<p dir="auto">I’ve forked the XPatherizerNPP github project and it can be downloaded here:</p>
<p dir="auto"><a href="https://github.com/shrout1/xpatherizernpp" rel="nofollow ugc">https://github.com/shrout1/xpatherizernpp<br />
</a></p>
<p dir="auto">Thank you for suggestion on the other plugin! XML Tools seems a bit unstable, also its XPath component doesn’t seem to work correctly. Attempting to evaluate “.” in a Microsoft sample XML file does not return any nodes… The plugin loads, but the XPath functionality doesn’t seem to work. All dependencies have been installed per the installation readme.</p>
<p dir="auto">Please let me know if there are any issues with my project upload; I have limited experience with git. I’ve spent a long time working IT but only dabbled with development.</p>
<p dir="auto">Thanks very much!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30583</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30583</guid><dc:creator><![CDATA[shrout1]]></dc:creator><pubDate>Mon, 26 Feb 2018 16:48:02 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging &quot;Plugin Crash&quot; on Sun, 25 Feb 2018 18:07:38 GMT]]></title><description><![CDATA[<p dir="auto">In the meantime you might want to checkout <a href="https://sourceforge.net/projects/npp-plugins/files/XML%20Tools/Xml%20Tools%202.4.9%20Unicode/" rel="nofollow ugc">https://sourceforge.net/projects/npp-plugins/files/XML Tools/Xml Tools 2.4.9 Unicode/</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/30563</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30563</guid><dc:creator><![CDATA[chcg]]></dc:creator><pubDate>Sun, 25 Feb 2018 18:07:38 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging &quot;Plugin Crash&quot; on Sat, 24 Feb 2018 00:42:46 GMT]]></title><description><![CDATA[<p dir="auto">Code is back at the office and I’m having a heck of a time getting it rebuilt from the original source… Not sure what I’m doing wrong. Will get it on GIT ASAP.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30543</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30543</guid><dc:creator><![CDATA[shrout1]]></dc:creator><pubDate>Sat, 24 Feb 2018 00:42:46 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging &quot;Plugin Crash&quot; on Fri, 23 Feb 2018 22:57:09 GMT]]></title><description><![CDATA[<p dir="auto">Do you have a github repo with your current work?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30542</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30542</guid><dc:creator><![CDATA[chcg]]></dc:creator><pubDate>Fri, 23 Feb 2018 22:57:09 GMT</pubDate></item></channel></rss>