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 607677 - crash in gtk_text_btree_get_chars_changed_stamp
crash in gtk_text_btree_get_chars_changed_stamp
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: General
unspecified
Other All
: Normal critical
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
: 607682 640836 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-01-21 17:07 UTC by m.e.brahier
Modified: 2011-01-30 23:48 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30


Attachments
patch fixing the issue (942 bytes, patch)
2010-12-26 03:01 UTC, José Aliste
none Details | Review

Description m.e.brahier 2010-01-21 17:07:43 UTC
Version: 2.28.3

What were you doing when the application crashed?
modifying an old iuhist.xml from a Windows 98 system to readable format for presentation of historical indications. This xml is in one long line of entries, hence must be chopped to readable formatting. GEdit is not set to auto limit/format line length.
 Thunderbird Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-17.1 Thunderbird/3.0 and GNOME Commander were only other opened programs.


Distribution: openSUSE 11.2 (i586)
Gnome Release: 2.28.2 (null) (SUSE)
BugBuddy Version: 2.28.0

System: Linux 2.6.31.8-0.1-default #1 SMP 2009-12-15 23:55:40 +0100 i686
X Vendor: The X.Org Foundation
X Vendor Release: 10605000
Selinux: No
Accessibility: Disabled
GTK+ Theme: Glider
Icon Theme: gnome
GTK+ Modules: gnomebreakpad

Memory status: size: 81014784 vsize: 81014784 resident: 32768000 share: 16527360 rss: 32768000 rss_rlim: 18446744073709551615
CPU usage: start_time: 1264092113 rtime: 14135 utime: 13112 stime: 1023 cutime:0 cstime: 2 timeout: 0 it_real_value: 0 frequency: 100

Backtrace was generated from '/usr/bin/gedit'

[Thread debugging using libthread_db enabled]
0xffffe430 in __kernel_vsyscall ()

Thread 1 (Thread 0xb67b4750 (LWP 2669))

  • #0 __kernel_vsyscall
  • #1 waitpid
    from /lib/libpthread.so.0
  • #2 g_spawn_sync
    from /usr/lib/libglib-2.0.so.0
  • #3 g_spawn_command_line_sync
    from /usr/lib/libglib-2.0.so.0
  • #4 ??
    from /usr/lib/gtk-2.0/modules/libgnomebreakpad.so
  • #5 ??
    from /usr/lib/gtk-2.0/modules/libgnomebreakpad.so
  • #6 <signal handler called>
  • #7 _gtk_text_btree_get_chars_changed_stamp
    from /usr/lib/libgtk-x11-2.0.so.0
  • #8 gtk_text_iter_get_offset
    from /usr/lib/libgtk-x11-2.0.so.0
  • #9 invalidate_region
    from /usr/lib/libgtksourceview-2.0.so.0
  • #10 gtk_source_context_engine_text_inserted
    from /usr/lib/libgtksourceview-2.0.so.0
  • #11 _gtk_source_engine_text_inserted
    from /usr/lib/libgtksourceview-2.0.so.0
  • #12 gtk_source_buffer_content_inserted
    from /usr/lib/libgtksourceview-2.0.so.0
  • #13 _gtk_marshal_VOID__BOXED_STRING_INT
    from /usr/lib/libgtk-x11-2.0.so.0
  • #14 g_type_class_meta_marshal
    from /usr/lib/libgobject-2.0.so.0
  • #15 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #16 signal_emit_unlocked_R
    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_text_buffer_emit_insert
    from /usr/lib/libgtk-x11-2.0.so.0
  • #20 gtk_text_buffer_insert_interactive
    from /usr/lib/libgtk-x11-2.0.so.0
  • #21 gtk_text_buffer_insert_interactive_at_cursor
    from /usr/lib/libgtk-x11-2.0.so.0
  • #22 gtk_text_view_commit_text
    from /usr/lib/libgtk-x11-2.0.so.0
  • #23 gtk_text_view_key_press_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #24 gtk_source_view_key_press_event
    from /usr/lib/libgtksourceview-2.0.so.0
  • #25 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #26 g_type_class_meta_marshal
    from /usr/lib/libgobject-2.0.so.0
  • #27 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #28 signal_emit_unlocked_R
    from /usr/lib/libgobject-2.0.so.0
  • #29 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #30 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #31 gtk_widget_event_internal
    from /usr/lib/libgtk-x11-2.0.so.0
  • #32 gtk_window_propagate_key_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #33 gedit_window_key_press_event
  • #34 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #35 g_type_class_meta_marshal
    from /usr/lib/libgobject-2.0.so.0
  • #36 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #37 signal_emit_unlocked_R
    from /usr/lib/libgobject-2.0.so.0
  • #38 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #39 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #40 gtk_widget_event_internal
    from /usr/lib/libgtk-x11-2.0.so.0
  • #41 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #42 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #43 gdk_event_dispatch
    from /usr/lib/libgdk-x11-2.0.so.0
  • #44 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #45 g_main_context_iterate
    from /usr/lib/libglib-2.0.so.0
  • #46 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #47 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #48 main
A debugging session is active.

	Inferior 1 [process 2669] will be detached.

Quit anyway? (y or n) [answered Y; input not from terminal]


---- Critical and fatal warnings logged during execution ----

** GtkSourceView **: Highlighting a single line took too much time, syntax highlighting will be disabled 
** GtkSourceView **: first_update_callback: assertion `ce->priv->buffer != NULL' failed 
Output of custom script "/usr/lib/gedit-2/gedit-bugreport.sh":
Active plugins:
  - time
  - externaltools
  - filebrowser
  - spell
  - docinfo
  - modelines
  - sort

No plugin installed in $HOME.

Module versions:
  - glib                  
  - gtk+                  
  - gtksourceview         
  - pygobject             
  - pygtk                 
  - pygtksourceview       
  - enchant               
  - iso-codes             

Python module versions:
  - python                2.6.2
  - pygtk                 2.16.0 (GTK+ 2.18.5)





----------- .xsession-errors (1225 sec old) ---------------------
Nautilus-Share-Message: spawn arg "net"
Nautilus-Share-Message: spawn arg "usershare"
Nautilus-Share-Message: spawn arg "info"
Nautilus-Share-Message: end of spawn args; SPAWNING
Nautilus-Share-Message: returned from spawn: SUCCESS: 
Nautilus-Share-Message: exit code 255
Nautilus-Share-Message: ------------------------------------------
Nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: usershares are currently disabled
(gnome-settings-daemon:1531): GLib-GObject-CRITICAL **: g_param_spec_flags: assertion `G_TYPE_IS_FLAGS (flags_type)' failed
(gnome-settings-daemon:1531): GLib-GObject-CRITICAL **: g_object_class_install_property: assertion `G_IS_PARAM_SPEC (pspec)' failed
Failed to play sound: File or data not found
--------------------------------------------------
Comment 1 Ignacio Casal Quinteiro (nacho) 2010-01-21 17:35:53 UTC
*** Bug 607682 has been marked as a duplicate of this bug. ***
Comment 2 Pedro Villavicencio 2010-10-19 17:48:07 UTC
we have a similar bug report here: https://bugs.edge.launchpad.net/gedit/+bug/663309
Comment 3 Akhil Laddha 2010-12-16 06:51:30 UTC
This bug was reported against a GNOME version that is now not supported anymore. GNOME developers are no longer working on that version, so unfortunately there will not be any bug fixes for the version that you use. By upgrading to a newer version of GNOME you could receive bug fixes and new functionality. You may need to upgrade your Linux distribution to obtain a newer version of GNOME.

The current stable GNOME is 2.32.1.
Please check if the problem you reported here still occurs with a recent version of GNOME by reporting back which exact version you tested against

Thank you for reporting this bug and we are sorry it could not be fixed for your version.
Without feedback this report will be closed as INCOMPLETE in 6 weeks.
Comment 4 José Aliste 2010-12-18 13:18:06 UTC
This bug is NOT incomplete. If you look in the downstream bug, you will see that it has been reported on gedit 2.30, which is the last stable version of Gedit atm.
Comment 5 Akhil Laddha 2010-12-20 04:01:15 UTC
Sorry, i didn't look at downstream bug.
Comment 6 José Aliste 2010-12-26 02:56:30 UTC
Changing components as the bug is in GtkSourceview. Patch in next comment.
Comment 7 José Aliste 2010-12-26 03:01:30 UTC
Created attachment 177057 [details] [review]
patch fixing the issue

The crash occurs when text_deleted in the contextengine calls invalidate region even when the highlighting is disabled (and then the buffer pointer is null). 

the attached patch fixes the issue.
Comment 8 Paolo Borelli 2010-12-26 12:43:03 UTC
Review of attachment 177057 [details] [review]:

Thanks for the analysis, looks like a good catch to me!

about the patch, I'd try to be consistent with with text_inserted which does

	/* Happens when highlighting is disabled */
	if (ce->priv->buffer == NULL)
	{
		return;
	}

since it would be strange that in one case we explicitely check the buffer and in the other we rely on the "disabled" flag.
Comment 9 José Aliste 2010-12-26 14:06:26 UTC
I pushed a new patch reviewed by Paolo on IRC in 
commit abef41da8c541c814bf631f69c92e0c431c610ad 
that fixes this bug.
Comment 10 José Aliste 2011-01-30 23:48:28 UTC
*** Bug 640836 has been marked as a duplicate of this bug. ***