Menu

#2136 SciTE 4.2.1 / Mac OS crash on assert when inserting C preprocessor directive

Bug
closed-fixed
nobody
5
2019-12-07
2019-11-01
Isiledhel
No

Assertion failed: (sc.state == (SCE_C_PREPROCESSOR|inactiveFlag)), function Lex, file /Users/neil/merc/scintilla/lexers/LexCPP.cxx, line 1311.

How to trigger:

  1. Open empty file (make sure C/C++ language is active).
  2. type : #else
  3. assert is caught before hitting return

I also experienced same assert trigger with these sequences (but I cannot reproduce when filling this report so some steps must be missing)

  1. working on a C file
  2. type : #endif (no matching #if or #else)
  3. assert is caught upon hitting return

  4. working on a C file

  5. position at the begining of a comment line ( // something )
  6. hit return to insert a new line
  7. assert is caught upon hitting #

Discussion

  • Neil Hodgson

    Neil Hodgson - 2019-11-01
    • labels: --> scintilla, macos
    • status: open --> open-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2019-11-01

    The asserts should not have been enabled for releases and that will be fixed in the next release.

    These are situations that are invalid by the C language rules, #else must follow a #if, so the correct behaviour (whether to show the following code as active) is uncertain.

     
  • Neil Hodgson

    Neil Hodgson - 2019-12-07
    • status: open-fixed --> closed-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2019-12-07

    The asserts should not have been compiled in for releases and that should be fixed in the next release.

    These are situations that are invalid by the C language rules, #else must follow a #if, so the correct behaviour is uncertain.

     

Log in to post a comment.

MongoDB Logo MongoDB