You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
In the 8.3 release of Notepad++, the type of Scintilla's Sci_PositionCR message changed from long to intptr_t. As a result, 64-bit plugins using the NppPlugin.NET interface are prone to access violations when calling into the SCI_GETTEXTRANGE API.
After seeing this analysis of recent crashes involving the CsvQuery and DSpellCheck plugins, I was able to reproduce with CS-Script (1.7.26) — which, like CsvQuery, is compiled with NppPlugin.NET (0.93.96). The event log recorded a stack trace with ScintillaGateway.GetTextRange near the top:
<Eventxmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<ProviderName=".NET Runtime" />
<EventIDQualifiers="0">1026</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreatedSystemTime="2022-02-06T20:37:13.4781435Z" />
<EventRecordID>20975</EventRecordID>
<Correlation />
<ExecutionProcessID="9132"ThreadID="0" />
<Channel>Application</Channel>
<Computer>AcerNotebook</Computer>
<Security />
</System>
<EventData>
<Data>Application: notepad++.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 00007FF6BE92EFFF
Stack:
at Kbg.NppPluginNET.PluginInfrastructure.Win32.SendMessage(IntPtr, UInt32, IntPtr, IntPtr)
at Kbg.NppPluginNET.PluginInfrastructure.Win32.SendMessage(IntPtr, UInt32, IntPtr, IntPtr)
at Kbg.NppPluginNET.PluginInfrastructure.ScintillaGateway.GetTextRange(Kbg.NppPluginNET.PluginInfrastructure.TextRange)
at CSScriptIntellisense.NppExtensions.GetTextBetween(Kbg.NppPluginNET.PluginInfrastructure.ScintillaGateway, Int32, Int32)
at CSScriptNpp.CodeMapPanel.RefreshContent()
at CSScriptNpp.Plugin.OnCurrentFileChanged()
at CSScriptNpp.UnmanagedExports.beNotified(IntPtr)
at Kbg.NppPluginNET.UnmanagedExports.beNotified(IntPtr)
at Kbg.NppPluginNET.PluginInfrastructure.Win32.SendMessage(IntPtr, UInt32, IntPtr, System.String)
at Kbg.NppPluginNET.PluginInfrastructure.Win32.SendMessage(IntPtr, UInt32, IntPtr, System.String)
at CSScriptNpp.ProjectPanel.newBtn_Click(System.Object, System.EventArgs)
at System.Windows.Forms.ToolStripItem.RaiseEvent(System.Object, System.EventArgs)
at System.Windows.Forms.ToolStripButton.OnClick(System.EventArgs)
at System.Windows.Forms.ToolStripItem.HandleClick(System.EventArgs)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(System.Windows.Forms.MouseEventArgs)
at System.Windows.Forms.ToolStrip.OnMouseUp(System.Windows.Forms.MouseEventArgs)
at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.ToolStrip.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)</Data>
</EventData>
</Event>
For reference, both the CharacterRange and TextRange interface wrapper types have constructors taking ints:
rdipardo
changed the title
Access violation in x64 builds of Notepad++ 8.2.2 (pre-release)
Access violation in x64 builds of latest Notepad++ release
Feb 6, 2022
In the 8.3 release of Notepad++, the type of Scintilla's
Sci_PositionCR
message changed fromlong
tointptr_t
. As a result, 64-bit plugins using the NppPlugin.NET interface are prone to access violations when calling into theSCI_GETTEXTRANGE
API.After seeing this analysis of recent crashes involving the CsvQuery and DSpellCheck plugins, I was able to reproduce with CS-Script (1.7.26) — which, like CsvQuery, is compiled with NppPlugin.NET (0.93.96). The event log recorded a stack trace with
ScintillaGateway.GetTextRange
near the top:For reference, both the
CharacterRange
andTextRange
interface wrapper types have constructors takingint
s:Related to:
See also:
The text was updated successfully, but these errors were encountered: