GNOME Bugzilla – Bug 741955
crash in insert_action
Last modified: 2015-01-02 22:33:40 UTC
gnome-builder-0.1.0-0.23.git.b99b365.fc22.x86_64 gtksourceview3-3.15.3-0.1.git.37cbc00.fc22.x86_64 Tried to press some keys. I'm using vim mode.
+ Trace 234452
Thread 1 (Thread 0x7ff88dceba40 (LWP 25499))
Are you able to reproduce it or did that just happen once? Does this happen with any key?
(In reply to comment #1) > Are you able to reproduce it or did that just happen once? Does this happen > with any key? this happened once. I can't reproduce =(
Igor, do you use an input method by chance?
Since this is in gtksourceundomanagerdefault.c, I'm going to CC swilmet. It very well might be caused by something we are doing, but he might be able to venture a guess.
The problem comes maybe from this commit: https://git.gnome.org/browse/gtksourceview/commit/?id=da48829adc339a6751be29f102d0c6cdc687e61a GLib >= 2.43.1 is required. Which GLib version do you have? Are you on Fedora 22 (rawhide?) or Fedora 21 with some packages from 22 (from the COPR)?
(In reply to comment #5) > The problem comes maybe from this commit: > https://git.gnome.org/browse/gtksourceview/commit/?id=da48829adc339a6751be29f102d0c6cdc687e61a > > GLib >= 2.43.1 is required. Which GLib version do you have? Are you on Fedora > 22 (rawhide?) or Fedora 21 with some packages from 22 (from the COPR)? [brain@x1carbon ~]$ rpm -q glib2 glib2-2.43.2-1.fc22.x86_64
(In reply to comment #3) > Igor, do you use an input method by chance? I think no.
Did you see warning or critical messages in the terminal? Or did you run Builder graphically? In the latter case I don't think it's possible to see the messages (ideally it should be available in a log or the journal).
If GLib >= 2.43.1 was used, then I don't know what caused the crash. By re-checking the code in GtkSourceView (in the undo manager) everything looks fine, and the code is well covered by unit tests. Are you sure the GLib package was not updated recently (after the crash)? Because it would clearly explain the crash. The only thing that comes to my mind is a weak pointer not removed, but it's unlikely (and it would cause lots of other strange crashes in low-level stuff, unless the weak pointer not removed is hard to reproduce and is executed in a short timeframe).
The backtrace is a bit strange, some frames are missing. Frame #4, insert_action(), should have been called from insert_text_cb(), but insert_text_cb() is missing in the backtrace. Maybe the debuginfo is not synced with the binaries?
Did the crash happen after loading a file? Was it the _first_ key pressed in Vim insertion mode? (the key pressed was 'M'). There is maybe an explanation, if the following functions are called in that order: - gtk_text_buffer_begin_user_action() - gtk_source_buffer_begin_not_undoable_action() (beginning of file loading) - gtk_source_buffer_end_not_undoable_action() (end of file loading) - insert text in the buffer -> assertion fails - gtk_text_buffer_end_user_action()
(In reply to comment #10) > The backtrace is a bit strange, some frames are missing. Frame #4, > insert_action(), should have been called from insert_text_cb(), but > insert_text_cb() is missing in the backtrace. > > Maybe the debuginfo is not synced with the binaries? debuginfo from gnome-builder or from gtksourceview or from ...? debuginfo for gnome-builder and gtksourceview3 100% the same version. (In reply to comment #11) > Did the crash happen after loading a file? Was it the _first_ key pressed in > Vim insertion mode? (the key pressed was 'M'). I'm not sure > > There is maybe an explanation, if the following functions are called in that > order: > - gtk_text_buffer_begin_user_action() > - gtk_source_buffer_begin_not_undoable_action() (beginning of file loading) > - gtk_source_buffer_end_not_undoable_action() (end of file loading) > - insert text in the buffer -> assertion fails > - gtk_text_buffer_end_user_action() I think I had some files opened. I've created new or opened exist file and written some text. after I pressed escape and pressed some keys. Random keys.
GtkSourceView:ERROR:gtksourceundomanagerdefault.c:543:insert_action: assertion failed: (group != NULL) Used builder from git. Just switched back to gnome-builder from another window and tried to write some text.
It should be fixed now: https://git.gnome.org/browse/gtksourceview/commit/?id=357993e69183a62c1f46a384181d2d2864a0862f I'll backport the commit to the gnome-3-14 branch. I didn't manage to reproduce the bug in Builder, but I've reproduced the same error with unit tests.
Thanks for tracking this down! For Builder, we should be good with the master version since most people are building from jhbuild (and our Copr repo has a gtksourceview package from git).