Bug #19133 2013-09-29 14:55
zopper
(C/C++ lang) Crash on some characters in "#if " macro
When in a C/C++ file macro #if is created, then typing some characters in its expression (currently it seems to be any non-ascii) cause a crash with an error message in terminal:
codeblocks: ./src/scintilla/lexlib/CharacterSet.h:83: bool CharacterSet::Contains(int) const: Expectation val >= 0 failed.
It is not important if the character is typed, pasted from clipboard, if it is or isn't the first character right after the #if.
Other macros don't seems to be affected by this bug. At least all I have tried.
I found this error when I mistyped. Usually it should not be a big problem (who use non-ascii chars in macros) but it can be done by mistake and cause lost of all unsaved work.
Steps to reproduce:
1. Create a C file
2. Create a #if macro
3. On the same line, type or paste any non-ascii character, for example: , č, or open Wikipedia and copy something from "languages" column
(4. Have a wish :-) )
Version: Release 12.11 rev 8629 (2012-11-28 11:40:31) gcc 4.8.1 Linux/unicode - 64 bit
Currently I cannot test it on Windows to see if it is affected also.
- Category
- Application::Crash
- Group
- Platform:Linux
- Status
- Closed
- Close date
- 2013-10-01 23:42
- Assigned to
History
Latest trunk seems to be OK, every character I have tried is written OK.
Scite also do not crash, although it is generally (not only in the macro) showing only "?" instead of non-ascii.