Bug #19134 2013-09-29 18:17

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
Open
Close date
 
Assigned to
tpetrov
tpetrov 2013-10-01 23:42

Please test latest trunk code also test latest version of Scite or any other scintilll based editor if it exhibits the same problem. If it does report it to the scintilla's maintainers.

tpetrov 2013-10-04 21:34

By the way this doesn't happen on Gentoo 64bit, rev 9378.

Can you try newer build?