After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 584803 - Crash when doing a replace all: gedit crashed with SIGSEGV in gtk_text_iter_set_offset()
Crash when doing a replace all: gedit crashed with SIGSEGV in gtk_text_iter_s...
Status: RESOLVED OBSOLETE
Product: gedit
Classification: Applications
Component: general
2.26.x
Other All
: Normal critical
: ---
Assigned To: Gedit maintainers
Gedit maintainers
: 613541 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-06-04 06:53 UTC by Jean-Christophe Berthon
Modified: 2013-12-20 21:53 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
data (162.24 KB, application/x-gzip)
2010-01-31 12:51 UTC, Jaromir Obr
Details

Description Jean-Christophe Berthon 2009-06-04 06:53:00 UTC
Steps to reproduce:
1. Open with Gedit a big text file like an SQL dump from MySQL (I used the export from WordPress blog system)
2. Perform a replace all of something, for example in the case of WordPress, replace the default table prefix which is 'wp_' by something else like 'hello_'
3. Gedit crashes!


Stack trace:
Here is one of the stack trace. For more check the initial bug report on launchpad (see the more information field)

GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(gdb) handle SIG33 pass nostop noprint
Signal        Stop	Print	Pass to program	Description
SIG33         No	No	Yes		Real-time event 33
(gdb) set pagination 0
(gdb) run
Starting program: /usr/bin/gedit 
[Thread debugging using libthread_db enabled]
[New Thread 0x7f1a107197d0 (LWP 9053)]
[New Thread 0x7f1a0341f950 (LWP 9056)]
[New Thread 0x7f1a027f9950 (LWP 9057)]
[Thread 0x7f1a0341f950 (LWP 9056) exited]
[New Thread 0x7f1a0341f950 (LWP 9058)]
[Thread 0x7f1a027f9950 (LWP 9057) exited]

(gedit:9053): GtkSourceView-CRITICAL **: Highlighting a single line took too much time: syntax highlighting will be disabled

(gedit:9053): Gtk-CRITICAL **: gtk_text_buffer_get_iter_at_offset: assertion `GTK_IS_TEXT_BUFFER (buffer)' failed

(gedit:9053): Gtk-CRITICAL **: gtk_text_buffer_move_mark: assertion `GTK_IS_TEXT_MARK (mark)' failed
[New Thread 0x7f1a027f9950 (LWP 9063)]
[Thread 0x7f1a027f9950 (LWP 9063) exited]
[Thread 0x7f1a0341f950 (LWP 9058) exited]

Program received signal SIGSEGV, Segmentation fault.

Thread 139749921757136 (LWP 9053)

  • #0 _gtk_text_btree_get_chars_changed_stamp
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtktextbtree.c line 539
  • #1 gtk_text_iter_make_surreal
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtktextiter.c line 161
  • #2 IA__gtk_text_iter_set_offset
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtktextiter.c line 3981
  • #3 invalidate_region
    at gtksourcecontextengine.c line 1502
  • #4 gtk_source_buffer_real_delete_range
    at gtksourcebuffer.c line 770
  • #5 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #6 ??
    from /usr/lib/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #8 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #9 gedit_document_replace_all
    at gedit-document.c line 1766
  • #10 search_dialog_response_cb
    at gedit-commands-search.c line 460
  • #11 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #12 ??
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #14 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #15 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #16 ??
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #19 gtk_real_button_released
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkbutton.c line 1702
  • #20 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #21 ??
    from /usr/lib/libgobject-2.0.so.0
  • #22 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #23 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #24 gtk_button_button_release
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkbutton.c line 1594
  • #25 _gtk_marshal_BOOLEAN__BOXED
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkmarshalers.c line 84
  • #26 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #27 ??
    from /usr/lib/libgobject-2.0.so.0
  • #28 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #29 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #30 gtk_widget_event_internal
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkwidget.c line 4761
  • #31 IA__gtk_propagate_event
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkmain.c line 2396
  • #32 IA__gtk_main_do_event
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkmain.c line 1601
  • #33 gdk_event_dispatch
    at /build/buildd/gtk+2.0-2.16.1/gdk/x11/gdkevents-x11.c line 2364
  • #34 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #35 ??
    from /usr/lib/libglib-2.0.so.0
  • #36 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #37 IA__gtk_main
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkmain.c line 1205
  • #38 main
    at gedit.c line 679

Thread 1 (Thread 0x7f1a107197d0 (LWP 9053))

  • #0 _gtk_text_btree_get_chars_changed_stamp
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtktextbtree.c line 539
  • #1 gtk_text_iter_make_surreal
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtktextiter.c line 161
  • #2 IA__gtk_text_iter_set_offset
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtktextiter.c line 3981
  • #3 invalidate_region
    at gtksourcecontextengine.c line 1502
  • #4 gtk_source_buffer_real_delete_range
    at gtksourcebuffer.c line 770
  • #5 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #6 ??
    from /usr/lib/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #8 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #9 gedit_document_replace_all
    at gedit-document.c line 1766
  • #10 search_dialog_response_cb
    at gedit-commands-search.c line 460
  • #11 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #12 ??
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #14 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #15 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #16 ??
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #19 gtk_real_button_released
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkbutton.c line 1702
  • #20 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #21 ??
    from /usr/lib/libgobject-2.0.so.0
  • #22 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #23 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #24 gtk_button_button_release
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkbutton.c line 1594
  • #25 _gtk_marshal_BOOLEAN__BOXED
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkmarshalers.c line 84
  • #26 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #27 ??
    from /usr/lib/libgobject-2.0.so.0
  • #28 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #29 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #30 gtk_widget_event_internal
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkwidget.c line 4761
  • #31 IA__gtk_propagate_event
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkmain.c line 2396
  • #32 IA__gtk_main_do_event
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkmain.c line 1601
  • #33 gdk_event_dispatch
    at /build/buildd/gtk+2.0-2.16.1/gdk/x11/gdkevents-x11.c line 2364
  • #34 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #35 ??
    from /usr/lib/libglib-2.0.so.0
  • #36 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #37 IA__gtk_main
    at /build/buildd/gtk+2.0-2.16.1/gtk/gtkmain.c line 1205
  • #38 main
    at gedit.c line 679
The program is running.  Exit anyway? (y or n) 


Other information:
The above stack trace was already uploaded as an attached file on the Launchpad website where this bug was first reported (https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/360591). Here is the initial report:
Binary package hint: gedit

I had just exported my WordPress database as an SQL file. I opened it with gedit and used the replace all feature. I wanted to change the name of the table. WordPress default prefix is wp_ and I decided to change it to wp27_. It took some time, then gedit became darker (so not responding) and then disappeared (crashed).
I opened the file with vim, and in a second 117 substitions were done, no crash.

ProblemType: Crash
Architecture: amd64
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/bin/gedit
Package: gedit 2.26.0-0ubuntu3
ProcCmdline: gedit /home/username/Downloads/magicalw(2).sql
ProcEnviron:
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
Signal: 11
SourcePackage: gedit
StacktraceTop:
 ?? () from /usr/lib/libgtk-x11-2.0.so.0
 ?? () from /usr/lib/libgtk-x11-2.0.so.0
 gtk_text_iter_set_offset ()
 ?? () from /usr/lib/libgtksourceview-2.0.so.0
 ?? () from /usr/lib/libgtksourceview-2.0.so.0
Title: gedit crashed with SIGSEGV in gtk_text_iter_set_offset()
Uname: Linux 2.6.28-11-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare users
Comment 1 Jean-Christophe Berthon 2009-06-14 17:22:35 UTC
I have perform the test with the same data on 3 other platforms since the bug report:
 1. - latest Ubuntu Karmic Koala (future 9.10) 32bit
 2. - latest Ubuntu 9.04 32bit
 3. - latest Ubuntu 8.04.2 LTS 32bit

The crash has been reproduced with platform 1 and 2. However, with platform 3, there was no crash (though the CPU was as high as 100% for several seconds). On platform 3, gedit is in version 2.22.3.

Just as a reminder, the platform used for the initial bug report was Ubuntu 9.04 64bit.
Comment 2 Jaromir Obr 2010-01-31 12:51:50 UTC
Created attachment 152672 [details]
data
Comment 3 Jaromir Obr 2010-01-31 12:52:30 UTC
Another steps to reproduce:
----------------------------------
mira@turion:~$ gedit /usr/share/libgweather/Locations.xml

(gedit:2699): GtkSourceView-CRITICAL **: Highlighting a single line took too much time, syntax highlighting will be disabled

(gedit:2699): Gtk-CRITICAL **: gtk_text_buffer_get_iter_at_offset: assertion `GTK_IS_TEXT_BUFFER (buffer)' failed

(gedit:2699): Gtk-CRITICAL **: gtk_text_buffer_move_mark: assertion `GTK_IS_TEXT_MARK (mark)' failed
Segmentation fault (core dumped)
-----------------------------------

Gedit crashes when it tries to open the text file with long line.
See attached testing file (Location.xml) and backtrace (comment #2)

Used SW:
Ubuntu 10.04 Lucid, amd64
gedit 2.29.5-0ubuntu1
Comment 4 Fabio Durán Verdugo 2010-03-22 01:31:12 UTC
*** Bug 613541 has been marked as a duplicate of this bug. ***
Comment 5 Ignacio Casal Quinteiro (nacho) 2011-12-21 21:39:59 UTC
Is this fixed already?
Comment 6 Fabio 2012-03-15 14:20:44 UTC
can be closed?
Comment 7 Sébastien Wilmet 2013-12-20 21:53:09 UTC
gedit 3.10 has a new implementation for the search and replace (in GtkSourceView), so I think this bug can be closed.

Feel free to reopen the bug if it still occurs with gedit 3.10 or above.