Menu

#86 Crash in x64 builds of latest Notepad++ release

1.12
closed-fixed
nobody
None
Bug
1
2022-06-03
2022-02-09
rdipardo
No

Notepad++ recently committed a breaking change to the typedef of Scintilla's Sci_PositionCR message, which now expands to 8 bytes on x86_64 architecture: https://community.notepad-plus-plus.org/topic/22471/recompile-your-x64-plugins-with-new-header. 8.3 is the first GA release to be compiled with it.

All published versions of AnalysePlugin still use the old typedef:

// trunk/scintilla/include/Sci_Position.h
typedef long Sci_PositionCR;

Calls to the SCI_GETTEXTRANGE API now return 64-bit values in x64 builds of N++. ScintillaEditView::getText makes this call, and tries to store the returned character ranges in a long:

// trunk/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp
void ScintillaEditView::getText(char *dest, size_t start, size_t end) const
{
    Sci_TextRange tr;
    tr.chrg.cpMin = static_cast<long>(start);
    tr.chrg.cpMax = static_cast<long>(end);
    tr.lpstrText = dest;
    execute(SCI_GETTEXTRANGE, 0, reinterpret_cast<LPARAM>(&tr));
}

This code path will cause an access violation that crashes 64-bit N++, as reported here: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11152

Discussion

  • Mattes H.

    Mattes H. - 2022-02-09
    • status: open --> accepted
    • Group: 1.13 --> 1.12
    • Priority: 5 --> 1
     
  • Anonymous

    Anonymous - 2022-05-27

    bro do you even fix?

     
  • Mattes H.

    Mattes H. - 2022-05-29

    yes, on the way.

     
  • Mattes H.

    Mattes H. - 2022-06-03

    Hi All,
    I finally was able to finish 1.13-R49 fixing this bug.
    See https://sourceforge.net/projects/analyseplugin/files/binaries/v01.13-R49/
    Please, let me know when you find any issues.
    regards, Mattes

     
  • Mattes H.

    Mattes H. - 2022-06-03
    • status: accepted --> closed-fixed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB