prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Recent alpha versions crash Notepad++ versions 8.2.x and below
  <!-- Please read the text in this edit field before filling it in.
  Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files.
  Issues may be closed if the required information is not present.
  https://github.com/nvaccess/nvda/blob/master/devDocs/githubIssueTemplateExplanationAndExamples.md
  Please also note that the NVDA project has a Citizen and Contributor Code of Conduct which can be found at https://github.com/nvaccess/nvda/blob/master/CODE_OF_CONDUCT.md. NV Access expects that all contributors and other community members read and abide by the rules set out in this document while participating or contributing to this project. This includes creating or commenting on issues and pull requests. 
  
  Each of the questions and sections below start with multiple hash symbols (#). Place your answers and information on the blank line below each question.
  -->
  
  ### Steps to reproduce:
  1. Use NVDA alpha version nvda_snapshot_alpha-24771,a1a6598b.exe or above.
  2. Open Notepad++ v8.1.x or v8.2.x 64-bit.
  3.Press up/down a few times.
  
  ### Actual behavior:
  Notepad++ crashes. No error message is printed in NVDA log.
  ### Expected behavior:
  Notepad++ should not crash.
  ### System configuration
  #### NVDA installed/portable/running from source:
  Portable alpha nvda_snapshot_alpha-24771,a1a6598b.exe
  #### NVDA version:
  nvda_snapshot_alpha-24771,a1a6598b.exe
  
  #### Windows version:
  Reproduced on both Windows 10 and 11 64-bit.
  #### Name and version of other software in use when reproducing the issue:
  Reproduced using either of these two versions (64-bit in both cases):
  - Notepad++ v8.1.9.3: https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.1.9.3/npp.8.1.9.3.portable.x64.zip
  - Notepad++ v8.2.1: https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.2.1/npp.8.2.1.portable.x64.zip
  #### Other information about your system:
  N/A
  ### Other questions
  #### Does the issue still occur after restarting your computer?
  Yes
  #### Have you tried any other versions of NVDA? If so, please report their behaviors.
  Identified that commit a1a6598b19f71bd108bef64373dd35c89c14cd4a is causing this, therefore cc: @lukaszgo1.
  #### If NVDA add-ons are disabled, is your problem still occurring?
  Yes
  #### Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
  Yes
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `source/appModules/notepadPlusPlus.py`
  Content:
  ```
  1 # A part of NonVisual Desktop Access (NVDA)
  2 # Copyright (C) 2022 NV Access Limited, Łukasz Golonka
  3 # This file may be used under the terms of the GNU General Public License, version 2 or later.
  4 # For more details see: https://www.gnu.org/licenses/gpl-2.0.html
  5 
  6 """AppModule for Notepad++.
  7 Do not rename! The executable file for Notepad++ is named `notepad++` and `+` is not a valid character
  8 in Python's import statements.
  9 This module is mapped to the right binary separately
  10 and the current name makes it possible to expose it from `nvdaBuiltin` for add-on developers.
  11 """
  12 
  13 import ctypes
  14 
  15 import appModuleHandler
  16 import NVDAObjects.window.scintilla as ScintillaBase
  17 
  18 
  19 class CharacterRangeStructLongLong(ctypes.Structure):
  20 	"""By default character ranges in Scintilla are represented by longs.
  21 	However long is not big enough for files over 2 GB,
  22 	therefore in 64-bit builds of Notepad++ 8.3 and later
  23 	these ranges are represented by longlong.
  24 	"""
  25 	_fields_ = [
  26 		('cpMin', ctypes.c_longlong),
  27 		('cpMax', ctypes.c_longlong),
  28 	]
  29 
  30 
  31 class ScintillaTextInfoNpp83(ScintillaBase.ScintillaTextInfo):
  32 	"""Text info for 64-bit builds of Notepad++ 8.3 and later.
  33 	"""
  34 
  35 	class TextRangeStruct(ctypes.Structure):
  36 		_fields_ = [
  37 			('chrg', CharacterRangeStructLongLong),
  38 			('lpstrText', ctypes.c_char_p),
  39 		]
  40 
  41 
  42 class NppEdit(ScintillaBase.Scintilla):
  43 
  44 	name = None  # The name of the editor is not useful.
  45 
  46 	def _get_TextInfo(self):
  47 		if self.appModule.is64BitProcess:
  48 			appVerMajor, appVerMinor, *__ = self.appModule.productVersion.split(".")
  49 			if int(appVerMajor) >= 8 and int(appVerMinor) >= 3:
  50 				return ScintillaTextInfoNpp83
  51 		return super().TextInfo
  52 
  53 
  54 class AppModule(appModuleHandler.AppModule):
  55 
  56 	def chooseNVDAObjectOverlayClasses(self, obj, clsList):
  57 		if obj.windowClassName == "Scintilla" and obj.windowControlID == 0:
  58 			clsList.insert(0, NppEdit)
  59
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/source/appModules/notepadPlusPlus.py b/source/appModules/notepadPlusPlus.py
  --- a/source/appModules/notepadPlusPlus.py
  +++ b/source/appModules/notepadPlusPlus.py
  @@ -46,7 +46,12 @@
   	def _get_TextInfo(self):
   		if self.appModule.is64BitProcess:
   			appVerMajor, appVerMinor, *__ = self.appModule.productVersion.split(".")
  -			if int(appVerMajor) >= 8 and int(appVerMinor) >= 3:
  +			# When retrieving the version, Notepad++ concatenates
  +			# minor, patch, build in major.minor.patch.build to the form of major.minor
  +			# https://github.com/notepad-plus-plus/npp-usermanual/blob/master/content/docs/plugin-communication.md#nppm_getnppversion
  +			# e.g. '8.3' for '8.3', '8.21' for '8.2.1' and '8.192' for '8.1.9.2'.
  +			# Therefore, only use the first digit of the minor version to match against version 8.3 or later.
  +			if int(appVerMajor) >= 8 and int(appVerMinor[0]) >= 3:
   				return ScintillaTextInfoNpp83
   		return super().TextInfo
  
verification_info: {"golden_diff": "diff --git a/source/appModules/notepadPlusPlus.py b/source/appModules/notepadPlusPlus.py\n--- a/source/appModules/notepadPlusPlus.py\n+++ b/source/appModules/notepadPlusPlus.py\n@@ -46,7 +46,12 @@\n \tdef _get_TextInfo(self):\r\n \t\tif self.appModule.is64BitProcess:\r\n \t\t\tappVerMajor, appVerMinor, *__ = self.appModule.productVersion.split(\".\")\r\n-\t\t\tif int(appVerMajor) >= 8 and int(appVerMinor) >= 3:\r\n+\t\t\t# When retrieving the version, Notepad++ concatenates\r\n+\t\t\t# minor, patch, build in major.minor.patch.build to the form of major.minor\r\n+\t\t\t# https://github.com/notepad-plus-plus/npp-usermanual/blob/master/content/docs/plugin-communication.md#nppm_getnppversion\r\n+\t\t\t# e.g. '8.3' for '8.3', '8.21' for '8.2.1' and '8.192' for '8.1.9.2'.\r\n+\t\t\t# Therefore, only use the first digit of the minor version to match against version 8.3 or later.\r\n+\t\t\tif int(appVerMajor) >= 8 and int(appVerMinor[0]) >= 3:\r\n \t\t\t\treturn ScintillaTextInfoNpp83\r\n \t\treturn super().TextInfo\n", "issue": "Recent alpha versions crash Notepad++ versions 8.2.x and below\n<!-- Please read the text in this edit field before filling it in.\r\nPlease thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files.\r\nIssues may be closed if the required information is not present.\r\nhttps://github.com/nvaccess/nvda/blob/master/devDocs/githubIssueTemplateExplanationAndExamples.md\r\nPlease also note that the NVDA project has a Citizen and Contributor Code of Conduct which can be found at https://github.com/nvaccess/nvda/blob/master/CODE_OF_CONDUCT.md. NV Access expects that all contributors and other community members read and abide by the rules set out in this document while participating or contributing to this project. This includes creating or commenting on issues and pull requests. \r\n\r\nEach of the questions and sections below start with multiple hash symbols (#). Place your answers and information on the blank line below each question.\r\n-->\r\n\r\n### Steps to reproduce:\r\n1. Use NVDA alpha version nvda_snapshot_alpha-24771,a1a6598b.exe or above.\r\n2. Open Notepad++ v8.1.x or v8.2.x 64-bit.\r\n3.Press up/down a few times.\r\n\r\n### Actual behavior:\r\nNotepad++ crashes. No error message is printed in NVDA log.\r\n### Expected behavior:\r\nNotepad++ should not crash.\r\n### System configuration\r\n#### NVDA installed/portable/running from source:\r\nPortable alpha nvda_snapshot_alpha-24771,a1a6598b.exe\r\n#### NVDA version:\r\nnvda_snapshot_alpha-24771,a1a6598b.exe\r\n\r\n#### Windows version:\r\nReproduced on both Windows 10 and 11 64-bit.\r\n#### Name and version of other software in use when reproducing the issue:\r\nReproduced using either of these two versions (64-bit in both cases):\r\n- Notepad++ v8.1.9.3: https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.1.9.3/npp.8.1.9.3.portable.x64.zip\r\n- Notepad++ v8.2.1: https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.2.1/npp.8.2.1.portable.x64.zip\r\n#### Other information about your system:\r\nN/A\r\n### Other questions\r\n#### Does the issue still occur after restarting your computer?\r\nYes\r\n#### Have you tried any other versions of NVDA? If so, please report their behaviors.\r\nIdentified that commit a1a6598b19f71bd108bef64373dd35c89c14cd4a is causing this, therefore cc: @lukaszgo1.\r\n#### If NVDA add-ons are disabled, is your problem still occurring?\r\nYes\r\n#### Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?\r\nYes\n", "before_files": [{"content": "# A part of NonVisual Desktop Access (NVDA)\r\n# Copyright (C) 2022 NV Access Limited, \u0141ukasz Golonka\r\n# This file may be used under the terms of the GNU General Public License, version 2 or later.\r\n# For more details see: https://www.gnu.org/licenses/gpl-2.0.html\r\n\r\n\"\"\"AppModule for Notepad++.\r\nDo not rename! The executable file for Notepad++ is named `notepad++` and `+` is not a valid character\r\nin Python's import statements.\r\nThis module is mapped to the right binary separately\r\nand the current name makes it possible to expose it from `nvdaBuiltin` for add-on developers.\r\n\"\"\"\r\n\r\nimport ctypes\r\n\r\nimport appModuleHandler\r\nimport NVDAObjects.window.scintilla as ScintillaBase\r\n\r\n\r\nclass CharacterRangeStructLongLong(ctypes.Structure):\r\n\t\"\"\"By default character ranges in Scintilla are represented by longs.\r\n\tHowever long is not big enough for files over 2 GB,\r\n\ttherefore in 64-bit builds of Notepad++ 8.3 and later\r\n\tthese ranges are represented by longlong.\r\n\t\"\"\"\r\n\t_fields_ = [\r\n\t\t('cpMin', ctypes.c_longlong),\r\n\t\t('cpMax', ctypes.c_longlong),\r\n\t]\r\n\r\n\r\nclass ScintillaTextInfoNpp83(ScintillaBase.ScintillaTextInfo):\r\n\t\"\"\"Text info for 64-bit builds of Notepad++ 8.3 and later.\r\n\t\"\"\"\r\n\r\n\tclass TextRangeStruct(ctypes.Structure):\r\n\t\t_fields_ = [\r\n\t\t\t('chrg', CharacterRangeStructLongLong),\r\n\t\t\t('lpstrText', ctypes.c_char_p),\r\n\t\t]\r\n\r\n\r\nclass NppEdit(ScintillaBase.Scintilla):\r\n\r\n\tname = None  # The name of the editor is not useful.\r\n\r\n\tdef _get_TextInfo(self):\r\n\t\tif self.appModule.is64BitProcess:\r\n\t\t\tappVerMajor, appVerMinor, *__ = self.appModule.productVersion.split(\".\")\r\n\t\t\tif int(appVerMajor) >= 8 and int(appVerMinor) >= 3:\r\n\t\t\t\treturn ScintillaTextInfoNpp83\r\n\t\treturn super().TextInfo\r\n\r\n\r\nclass AppModule(appModuleHandler.AppModule):\r\n\r\n\tdef chooseNVDAObjectOverlayClasses(self, obj, clsList):\r\n\t\tif obj.windowClassName == \"Scintilla\" and obj.windowControlID == 0:\r\n\t\t\tclsList.insert(0, NppEdit)\r\n", "path": "source/appModules/notepadPlusPlus.py"}], "after_files": [{"content": "# A part of NonVisual Desktop Access (NVDA)\r\n# Copyright (C) 2022 NV Access Limited, \u0141ukasz Golonka\r\n# This file may be used under the terms of the GNU General Public License, version 2 or later.\r\n# For more details see: https://www.gnu.org/licenses/gpl-2.0.html\r\n\r\n\"\"\"AppModule for Notepad++.\r\nDo not rename! The executable file for Notepad++ is named `notepad++` and `+` is not a valid character\r\nin Python's import statements.\r\nThis module is mapped to the right binary separately\r\nand the current name makes it possible to expose it from `nvdaBuiltin` for add-on developers.\r\n\"\"\"\r\n\r\nimport ctypes\r\n\r\nimport appModuleHandler\r\nimport NVDAObjects.window.scintilla as ScintillaBase\r\n\r\n\r\nclass CharacterRangeStructLongLong(ctypes.Structure):\r\n\t\"\"\"By default character ranges in Scintilla are represented by longs.\r\n\tHowever long is not big enough for files over 2 GB,\r\n\ttherefore in 64-bit builds of Notepad++ 8.3 and later\r\n\tthese ranges are represented by longlong.\r\n\t\"\"\"\r\n\t_fields_ = [\r\n\t\t('cpMin', ctypes.c_longlong),\r\n\t\t('cpMax', ctypes.c_longlong),\r\n\t]\r\n\r\n\r\nclass ScintillaTextInfoNpp83(ScintillaBase.ScintillaTextInfo):\r\n\t\"\"\"Text info for 64-bit builds of Notepad++ 8.3 and later.\r\n\t\"\"\"\r\n\r\n\tclass TextRangeStruct(ctypes.Structure):\r\n\t\t_fields_ = [\r\n\t\t\t('chrg', CharacterRangeStructLongLong),\r\n\t\t\t('lpstrText', ctypes.c_char_p),\r\n\t\t]\r\n\r\n\r\nclass NppEdit(ScintillaBase.Scintilla):\r\n\r\n\tname = None  # The name of the editor is not useful.\r\n\r\n\tdef _get_TextInfo(self):\r\n\t\tif self.appModule.is64BitProcess:\r\n\t\t\tappVerMajor, appVerMinor, *__ = self.appModule.productVersion.split(\".\")\r\n\t\t\t# When retrieving the version, Notepad++ concatenates\r\n\t\t\t# minor, patch, build in major.minor.patch.build to the form of major.minor\r\n\t\t\t# https://github.com/notepad-plus-plus/npp-usermanual/blob/master/content/docs/plugin-communication.md#nppm_getnppversion\r\n\t\t\t# e.g. '8.3' for '8.3', '8.21' for '8.2.1' and '8.192' for '8.1.9.2'.\r\n\t\t\t# Therefore, only use the first digit of the minor version to match against version 8.3 or later.\r\n\t\t\tif int(appVerMajor) >= 8 and int(appVerMinor[0]) >= 3:\r\n\t\t\t\treturn ScintillaTextInfoNpp83\r\n\t\treturn super().TextInfo\r\n\r\n\r\nclass AppModule(appModuleHandler.AppModule):\r\n\r\n\tdef chooseNVDAObjectOverlayClasses(self, obj, clsList):\r\n\t\tif obj.windowClassName == \"Scintilla\" and obj.windowControlID == 0:\r\n\t\t\tclsList.insert(0, NppEdit)\r\n", "path": "source/appModules/notepadPlusPlus.py"}]}