Plug-in "Compare" - bug



  • Hello, dear members and developers!

    Thank you for such great Plug-In.

    I would like to report about a bug:

    If start comparison of two texts (Alt+D.
    And then with duble click (on bar) open a new txt file and than press multiple times Alt+D.There will be error.

    Windows 7 64 bit, last Notepad++

    Win32Exception

    An exception occured. Notepad++ cannot recover and must be shut down.
    The exception details are as follows:
    Code: 0xC0000005
    Type: Access violation
    Exception address: 0x5FA4E951

    ОК


    Microsoft Visual C++ Runtime Library

    Runtime Error!
    Program: C:\Program Files (x86)\Notepad++\notepad++.exe
    R6025

    • pure virtual function call

    ОК



  • Hello @Mi-Me,

    can you try to replicate this being compare the only plugin?
    I tried it several times, even by pressing alt+d for ~30 seconds,
    but didn’t crash my npp 6.8.8 on windows 7 x64.

    Cheers
    Claudia



  • Thank you, Claudia.
    Unfortunately this bug easily reproduced on all computers I have access to… - 4.

    Steps are the following.

    1. Open Notepad++ with “new1”
    2. Write “abcd”
    3. Double click on bar to open “new2”
    4. write “bcde”
    5. Alt+D
    6. Double click on one side to open “new3”…
      – write there
    7. Double click on other side to open “new4”
      –write there something

    And please do steps 6 and 7 in cycle with pressing (holding) periodically Alt+D.

    If it will not help to reproduce this bug - I will write Screen video…

    Thank you in advance.

    Best wishes,
    Michael



  • Hello Michael,

    I did test it like you’d advised but wasn’t able to produce the crash.
    Even you do compare action doesn’t necessarily mean this plugin
    is the cause of the problem it might be that another plugin does
    something in parallel which might result in the crash.

    If you could test with being compare plugin the one and only plugin loaded,
    we can, more or less, be sure that this plugin is the reason of the crash.

    Cheers
    Claudia



  • Dear Claudia,

    please, have a look on the screen-shots and video. There on dropbox: couple of screen-shots and video-file

    The strange behavior of Notepad++, when you start compare New1 (with some text) with blank New2.

    Thank you for your patience and your help.

    Best wishes,
    Michael.



  • Hello Michael and Claudia,

    @Michael,

    The “nul” added to new blank files is a known issue.

    Some questions:

    1. I assume you’re using NPP 6.8.8. Is that correct?
    2. Which Compare version are you using? Can you try other versions?
    3. Have you tried removing any other plugins as Claudia has suggested?
    4. Does the crash occur if the NavBar is closed?
    5. Does it occur if you use Plugins -> Compare -> Compare (i.e. instead of Alt+D)?
    6. It’s not clear if it happens only after typing something in the new file.
    7. What do you mean “pressing (holding) periodically Alt+D”?

    Best regards.



  • Hello Michael,

    yes, confirmed - the trick to crash npp is that one of the files to compare is empty.
    To reproduce the following needs to be done

    Npp gets started with an empty new 1 document.
    Write something into new 1
    open a second empty document (new 2)
    go back to new 1
    press ALT+D

    you see that there is garbage in the new 2 doc, move the mouse to this line -> npp crash

    I guess this isn’t really a use case for compare plugin but it obviously shouldn’t crash npp.

    From generated dump it looks like scintilla is causing the crash.

    ExceptionAddress: 0f79e951 (SciLexer+0x0001e951)
    ExceptionCode: c0000005 (Access violation)
    ExceptionFlags: 00000000
    NumberParameters: 2
    Parameter[0]: 00000001
    Parameter[1]: fffffffc
    Attempt to write to address fffffffc

    But why is it trying to write to this address ??

    By the way, test was made with npp 6.8.8 minimalistic and compare plugin being the only plugin.

    Cheers
    Claudia



  • Hello Yaron,

    regardless whether navbar is active or not, and
    it doesn’t make a difference if using ALT+D or compare via menu,
    crash happens.

    Cheers
    Claudia



  • Hello Claudia,

    Precise and clear as always. :)
    Thank you.

    I can reproduce it with 1.5.6.6 (and earlier versions) but not with 1.5.6.7.
    It’s interesting which of UFO’s modifications makes the difference.
    Could you please try it?

    BTW, NPP crashes in some rare cases when using “Compare to last save”.
    I hardly use that command and haven’t properly tested it.

    Best regards.



  • Hello Yaron,

    you are right, 1.5.6.7 doesn’t crash npp when having an empty doc but
    still fills it with a NUL ( but I saw you already opened an issue for this ).

    To be honest, I use only basic compare functionality ALT+D and ALT+CTRL+D ;-)

    Thank you
    Claudia



  • Hello Claudia,

    Thank you for testing it.
    And many thanks again for your great contribution on the forum. :)

    Best regards.



  • Hello Yaron,

    no problem, btw I would bet that the changes made on the 14th of january
    in compare.cpp line 988 - 1000 fixed it.

    Cheers
    Claudia



  • Hello Claudia,

    As I’ve written before: “Sherlock Holmes!”. Amazing.
    Well, I’m running out of superlatives. :)

    Thank you so much.


Log in to reply