GNOME Bugzilla – Bug 677696
Segfault when staging individual hunks
Last modified: 2013-06-06 11:16:15 UTC
Created attachment 215934 [details] [review] patch that fixes the issue for Adrian Knoth On Debian bug #674001 Adrian Knoth <adi@drcomp.erfurt.thur.de> reported: Recently (maybe after the introduction of GTK3 in Debian), gitg has started to crash when staging individual hunks. Here's the backtrace. Obviously, the iter variable is not set. Without carefully reading the source code, I came up with the attached patch that fixes the issue for me, but maybe the upstream author wants to have a look and propose a better solution, if any. Program received signal SIGSEGV, Segmentation fault. 0x00007ffff76ed660 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 (gdb) bt
+ Trace 230329
1399 if (!view->priv->diff_enabled) 1400 { 1401 return FALSE; 1402 } 1403 1404 ensure_scan (view, gtk_text_iter_get_line (iter)); 1405 1406 Region *region = find_current_region (view, gtk_text_iter_get_line (iter)); 1407 1408 while (region && region->type == GITG_DIFF_ITER_TYPE_HUNK) (gdb) p iter $1 = (const GtkTextIter *) 0x8021f8 (gdb) p view $2 = (GitgDiffView *) 0x818110 (gdb) p *iter $3 = {dummy1 = 0x0, dummy2 = 0x0, dummy3 = 0, dummy4 = 0, dummy5 = 0, dummy6 = 0, dummy7 = 0, dummy8 = 0, dummy9 = 0x0, dummy10 = 0x0, dummy11 = 0, dummy12 = 0, dummy13 = 0, dummy14 = 0x0} -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.2.2 (SMP w/8 CPU cores; PREEMPT) Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages gitg depends on: ii dbus-x11 1.5.12-1 ii dconf-gsettings-backend [gsettings-backend] 0.12.1-1 ii git 1:1.7.10-1 ii gsettings-desktop-schemas 3.4.2-1 ii libatk1.0-0 2.4.0-2 ii libc6 2.13-32 ii libcairo-gobject2 1.12.2-2 ii libcairo2 1.12.2-2 ii libdconf0 0.12.1-1 ii libgdk-pixbuf2.0-0 2.26.1-1 ii libglib2.0-0 2.32.3-1 ii libgtk-3-0 3.4.2-1 ii libgtksourceview-3.0-0 3.4.2-1 ii libpango1.0-0 1.30.0-1 gitg recommends no packages. gitg suggests no packages. -- no debconf information
Please close this bug report. It turned out that the problem was introduced by defective patch to replace deprecated "gdk_window_get_pointer". No action is required as newer versions of `gitg` are not affected. Thanks.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.