Menu

Likely bug - Syntax Highlighting Crash

2009-08-05
2012-11-14
  • Mattia Landoni

    Mattia Landoni - 2009-08-05

    Hi,

    I use N++ mainly to edit and run Stata files (.do, basically text files). Since the latest N++ version, the program crashes whenever I try to open a Stata file. I figured out that the problem doesn't occur if I disable the custom syntax highlighting by deleting userDefineLang.xml. However, if I do that I have no more reason to prefer N++ over Stata's own editor (almost). Please, let me know what I can do to help and fix this problem. It's very important to me. N++ is such an awesome editor...

    The user-provided language file I am talking about is
    http://notepad-plus.sourceforge.net/commun/userDefinedLang/userDefineLang_stata.xml

    Thanks for the attention

    ML

     
    • cchris

      cchris - 2009-08-06

      It is not the first time users report crashes or other weird behaviours, then say they clean reinstalled and that got them rid of the issue.

      My conjecture is this: when upgrading, the installer takes care not to overwrite a number of config files, as they may hold customisation info user is supposed to wish to preserve. If upgrading from an old (6 months?) version, the structure of these files may have changed a bit. Things may become messier if installation was manual from a downloaded archive. It happened to me between two intermediate versions (5.3.1 and 5.4 I believe).

      A further complication may arise if one chose one day to install to %APPDATA% and the next time to Notepad++ folder. In that case, there are conflicting config files, and the wrong file could be picked up.

      The two above account for nearly (all?) the strange behaviour reports I have seen on the forums for the lat 6 months.
      Perhaps some of what I just wrote might be useful on http://sorceforge.net/apps/mediawiki/notepad-plus/index.php?title=Configuration_No_Longer_Works. Comments appreciated before I do that. Perhaps the page itself should change name - that was its title in the now decommissioned older wiki.

      CChris

       
    • cchris

      cchris - 2009-08-05

      I copy/pasted rhe file you posted into my userDefineLang.xml file. If I take any file and, using the Languages menu, highlight it as Stata, nothing wrong takes place.

      Could you try this, and also post the contents of an actual, small .do file, to see if physically opening the file triggers anything bad?

      If copy/pasting blithely, there are some minus sgns that mark indentation. They could cause a crash iirc. Please check, and remove the spurious signs if any.

      CChris

       
      • Mattia Landoni

        Mattia Landoni - 2009-08-05

        Hi Chris and thank you a lot for the quick reply.

        I tried to see if there were any minus signs but I was not able to see any. In fact, there are no indentations whatsoever, tabs or anything. Two remarks:

        1) The program crashes anytime the syntax highlighting engine starts. So even if I open an .xml file it still crashes, provided I am using the user-defined Stata syntax. When I delete userDefineLang.xml, all the inbuilt highlighting works fine.

        2) Stata is the only language I have. So what I did was to download the Stata file and save it as-is in the "%appdata%/Notepad++" folder.

        Here is the content of a simple test file called dotest.do; but, as I said, once Stata syntax is installed, N++ crashes no matter what I open.

        set memory 1g
        sysuse auto
        sum

         
    • Mattia Landoni

      Mattia Landoni - 2009-08-05

      Interesting. So I had initially Notepad 4.8.2; then the auto-update had updated it to 5.3.something. That's when the problem started to show up. Now I manually uninstalled it, and then reinstalled the latest version (5.4.5). The problem is gone! Hallelujah!

      Let me know if you are interested and I can try to reproduce the error.

      Mattia

       
MongoDB Logo MongoDB