Bug report submitted via discuss mailing list
by Randal Koene:
Replacing selected text causes program to segfault.
Continuous line wrapping produces erroneous <nl>
These bugs occur only for very specific files. The
file must be an HTML file and it must have a single
line. The bug was not replicated for longer HTML
texts. It was also not replicated for plain text. I
did not test all language modes. The bug occurs with
pre-existing files, not with HTML text typed into a
The bug does *not* appear with NEdit installed
without a personalized .nedit file. With my existing
.nedit (used previously with nedit-5.1) file, the
bug *does* occur. Some further testing shows that
the bug occurs only with my (highly customized)
.nedit when default text fonts are set to the
It does not occur, if bold, italic and bolditalic
fonts are assigned with the "fill from primary"
button in the default text fonts selection widget.
If I set the fonts accordingly in an uncustomized
.nedit file no bug occurs. For the purpose of
replication I have included the problematic .nedit
file as an attachment to this email.
A good example is the following:
bash$ echo '<P>' > somefile.html
bash$ nedit somefile.html
Then select ALL the text in the file and press
backspace. At that point the program should
disappear. A segmentation fault is produced.
Note: The bug can be avoided by performing the
backspace erasure of the text in the following way:
(1) switch the language mode to "plain"
(2) select and erase the text
This is *not* restricted to erasure with backspace.
Selecting all the text with the mouse and then
pressing a key (e.g. space) to replace it, or using
the cut keys (ctrl+x) causes the same crash. The
same is true if the text is selected by choosing
"select all" from the edit menu.
The second bug, which occurs when continuous line
wrapping mode is on and editing an existing file
such that the cursor nears the end of the line, also
appears to be caused by the font settings. For the
purpose of replication, I have also included a short
HTML text as an attachment, for which the bug
occurs. Open the text with nedit (using the .nedit
file supplied). Go to the end of the line that reads
"incurred if the phase relationship is not
present.". Then type on. Once you near the border of
the window, the next line should change to
"</CODE><nl><UL>", where <nl> is a non-printable
character representing a newline. If you type
another character at that point, all text below the
cursor location is erased. This looks like another
bounds checking problem that could lead to a
segmentation fault. Again, it is related to the use
of the default fonts in the customized .nedit file.
The version of NEdit is 5.2, installed from the
binary distribution file nedit-5.2-linux-x86.tar.Z
with file size 1268195 bytes and checksum (cksum)
3276223212, as obtained from the www.nedit.org site.
Log in to post a comment.