Skip to content

Crash when user edit the userDefineLang.xml and included more Extension that NP++ can handel #2727

@swinster

Description

@swinster

Description of the Issue

In order to apply a UDL to a couple of hundred file type (numeric, ranging from .1 to .200), I edited direct the underlying userDefineLang.xml file. It was easier to script a generator for the extension, and copy and paste them to the file. Unfortunately, on opening NP++, the application crashed.

Steps to Reproduce the Issue

  1. Edit the userDefineLang.xml. For example, the opening tag in my current XML is:
<NotepadPlus>
    <UserLang name="Pexip" ext="log 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87" udlVersion="2.1">

Adding any more extensions to the list will cause NP++ to crash on open (I was looking to add up to 200)

Expected Behavior

Not to crash.
Ideally, to handle multiple extension via pattern matching (longer term feature).

Actual Behavior

NP++ crashed and would not start. userDefineLang.xml then had to be edited in another text editor to remove the additional extensions, in order for NP++ to start - not straight forward as even opening normal windows Notepad, redirect me to NP++.

Debug Information

Notepad++ v7.2.2 (32-bit)
Build time : Nov 27 2016 - 16:31:07
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS : Windows 10
Plugins : AnalysePlugin.dll AndroidLogger.dll ComparePlugin.dll mimeTools.dll NotepadStarterPlugin.dll NppConverter.dll NppExport.dll NPPJSONViewer.dll PluginManager.dll

FWIW, there is a forum post on this at https://notepad-plus-plus.org/community/topic/12992/user-define-language-extensions-too-many-causes-a-crash-but-not-enough-allowed.

As I note in that post, if you manually keep adding extensions into the Extension box in the UDL dialogue, it will only save back a certain number of these (I got to 87 (see above) with another text extension included). It doesn’t stop you from entering more extensions, only that it saves out a limited set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions