[Geany-devel] Crash when pasting a Zero-width space

Harold Aling geany at xxxxx
Tue Jun 26 11:04:13 UTC 2012


On Tue, Jun 26, 2012 at 12:16 PM, Lex Trotman <elextr at gmail.com> wrote:
> On 26 June 2012 20:09, Harold Aling <geany at sait.nl> wrote:
>> On Tue, Jun 26, 2012 at 12:05 PM, Lex Trotman <elextr at gmail.com> wrote:
>>> On 26 June 2012 20:01, Thomas Martitz
>>> <thomas.martitz at student.htw-berlin.de> wrote:
>>>> Am 26.06.2012 11:53, schrieb Harold Aling:
>>>>
>>>>> Updated to Geany 1.23 (git >= 40da14b)
>>>>>
>>>>> 1. Create a new document (ctrl-n)
>>>>> 2. Copy/paste "mA" (already has a zero-width space in the middle)
>>>>> 3. Press 'home'
>>>>> 4. Press 'delete'
>>>>> 5. Crash -> 100% CPU
>>>>
>>>>
>>>> Works for me. No crash and no 100% CPU usage.
>>>>
>>>>
>>>>> Geany also counts that character as 3 positions instead of 1.
>>>>
>>>>
>>>> Depending on your POV, this is the correct behavior (the pos field actually
>>>> shows the byte offset since the start of the file, hence it's 0-based also).
>>>
>>> Yes, the column count only counts it as one though pos counts as 3.
>>> Pos is bytes, thats a scintilla definition.
>>>
>>> I would guess its something about the Ubuntu specials, just for comparison
>>>
>>> 08:47:15: Geany INFO            : Geany 1.23 (git >= 8187268), en_AU.UTF-8
>>> 08:47:15: Geany INFO            : GTK 2.24.10, GLib 2.30.2
>>>
>>>  (From the help->debug messages GUI :)
>>>
>>> Whats yours say?
>>
>> 11:59:08: Geany INFO            : Geany 1.23 (git >= 40da14b), en_US.UTF-8
>> 11:59:08: Geany INFO            : GTK 2.24.10, GLib 2.32.3
>
> Oh, I'm missing a commit, never mind not relevant.
>
> Yeah, that looks ok, your file is UTF-8 which is fine, the difference
> in Glib shouldn't affect it, all I can think of is that its Ubuntu
> specific, they are known to add patches to GTK, so maybe its one of
> those?
>
> Can you run Geany under gdb and get a backtrace?

1. $ gdb geany
(gdb) run
Starting program: /usr/local/bin/geany
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

(geany:22407): Gtk-WARNING **: Unable to locate theme engine in
module_path: "pixmap",
[New Thread 0x7fffe5325700 (LWP 22412)]

2. Crash Geany using the steps above -> (geany:22407):
GProject-CRITICAL **: on_doc_activate: assertion `doc != NULL &&
doc->file_name != NULL' failed

3. ctrl-c (to get the gdb prompt)

4. (gdb) bt
#0  0x0000000000550b39 in SelectionPosition::SetPosition(int) ()
#1  0x000000000052bdfb in
Editor::MovePositionOutsideChar(SelectionPosition, int, bool) const ()
#2  0x000000000052bd75 in Editor::MovePositionOutsideChar(int, int,
bool) const ()
#3  0x0000000000536f77 in Editor::DrawBlockCaret(Surface*, ViewStyle&,
LineLayout*, int, int, int, int, PRectangle, ColourAllocated) ()
#4  0x0000000000537edc in Editor::DrawCarets(Surface*, ViewStyle&,
int, int, PRectangle, LineLayout*, int) ()
#5  0x0000000000538c2b in Editor::Paint(Surface*, PRectangle) ()
#6  0x0000000000500e6f in ScintillaGTK::ExposeTextThis(_GtkWidget*,
_GdkEventExpose*) ()
#7  0x0000000000500f55 in ScintillaGTK::ExposeText(_GtkWidget*,
_GdkEventExpose*, ScintillaGTK*) ()
#8  0x00007ffff78d6dd8 in ?? () from
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#9  0x00007ffff662cca2 in g_closure_invoke () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff663dd71 in ?? () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff6645d7e in g_signal_emit_valist () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff6646242 in g_signal_emit () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007ffff79f1191 in ?? () from
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#14 0x00007ffff78d5587 in gtk_main_do_event () from
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#15 0x00007ffff7531604 in ?? () from
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#16 0x00007ffff75315b3 in ?? () from
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#17 0x00007ffff752c5a3 in ?? () from
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#18 0x00007ffff752e741 in gdk_window_process_all_updates () from
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#19 0x00007ffff752e7a9 in ?? () from
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#20 0x00007ffff750bd56 in ?? () from
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#21 0x00007ffff636fd53 in g_main_context_dispatch () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffff63700a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007ffff637049a in g_main_loop_run () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff78d42f7 in gtk_main () from
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#25 0x00000000004df1fc in main (argc=1, argv=0x7fffffffe298) at
../src/main.c:1155
(gdb)


-H-



More information about the Devel mailing list