From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#15365: 24.3.50; Segfault when calling vc-git-log-edit-toggle-amend Date: Fri, 13 Sep 2013 16:18:13 +0300 Message-ID: <83zjrghnca.fsf@gnu.org> References: <8761u5rl5c.fsf@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1379078357 1348 80.91.229.3 (13 Sep 2013 13:19:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Sep 2013 13:19:17 +0000 (UTC) Cc: 15365@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 13 15:19:19 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VKTHK-0004qD-9j for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Sep 2013 15:19:18 +0200 Original-Received: from localhost ([::1]:47000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKTHJ-0007ms-SC for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Sep 2013 09:19:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKTHA-0007ml-Ig for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2013 09:19:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKTH4-00039r-CQ for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2013 09:19:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52933) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKTH4-00039i-8n for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2013 09:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VKTH3-0007Nb-Mc for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2013 09:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Sep 2013 13:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15365 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15365-submit@debbugs.gnu.org id=B15365.137907831728310 (code B ref 15365); Fri, 13 Sep 2013 13:19:01 +0000 Original-Received: (at 15365) by debbugs.gnu.org; 13 Sep 2013 13:18:37 +0000 Original-Received: from localhost ([127.0.0.1]:32988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKTGc-0007MV-VK for submit@debbugs.gnu.org; Fri, 13 Sep 2013 09:18:35 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:37674) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKTGZ-0007MH-WD for 15365@debbugs.gnu.org; Fri, 13 Sep 2013 09:18:33 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MT200K00FLWS900@a-mtaout22.012.net.il> for 15365@debbugs.gnu.org; Fri, 13 Sep 2013 16:18:25 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MT200KKBFMORT10@a-mtaout22.012.net.il>; Fri, 13 Sep 2013 16:18:25 +0300 (IDT) In-reply-to: <8761u5rl5c.fsf@yandex.ru> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:78338 Archived-At: > From: Dmitry Gutov > Date: Fri, 13 Sep 2013 14:55:27 +0300 > > Edit a file in a Git repository, then press > > C-x v v, then C-c C-e Too bad this requires to commit to a git repo. If you cannot find a recipe that doesn't need that, please show values of variables involved in this abort. The relevant code fragment is this: /* If window start is unchanged, we can reuse the whole matrix as is, after adjusting glyph positions. No need to compute the window end again, since its offset from Z hasn't changed. */ r0 = MATRIX_FIRST_TEXT_ROW (current_matrix); if (CHARPOS (start) == MATRIX_ROW_START_CHARPOS (r0) + Z_delta && BYTEPOS (start) == MATRIX_ROW_START_BYTEPOS (r0) + Z_delta_bytes /* PT must not be in a partially visible line. */ && !(PT >= MATRIX_ROW_START_CHARPOS (row) + Z_delta && MATRIX_ROW_BOTTOM_Y (row) > window_text_bottom_y (w))) { /* Adjust positions in the glyph matrix. */ if (Z_delta || Z_delta_bytes) { struct glyph_row *r1 = MATRIX_BOTTOM_TEXT_ROW (current_matrix, w); increment_matrix_positions (w->current_matrix, MATRIX_ROW_VPOS (r0, current_matrix), MATRIX_ROW_VPOS (r1, current_matrix), Z_delta, Z_delta_bytes); } /* Set the cursor. */ row = row_containing_pos (w, PT, r0, NULL, 0); if (row) set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0); else emacs_abort (); return 1; } So the values of PT, Z, and Z_BYTE are important. Also, the following GDB commands can tell important details: (gdb) pmtxrows current_matrix Note that you need to be in the call-stack frame of this code, frame #3 according to the backtrace you show, to be able to reference these variables. Thanks. > (gdb) xbacktrace > "redisplay_internal (C function)" (0xbf6108) > (gdb) > > (For all I know, the above may be not accurate, because I loaded the > src/.gdbinit file only after Emacs started up, worked and crashed.) It is accurate. However, if you start GDB from the Emacs's src directory, you will be free of that doubt.