From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#9006: 24.0.50; Abort in unshow_buffer/kill-buffer Date: Mon, 11 Jul 2011 22:04:35 +0200 Message-ID: <87hb6sr3cc.fsf@escher.fritz.box> References: <877h7wxqjv.fsf@escher.fritz.box> <4E1429F3.1010305@gmx.at> <87oc17xlmu.fsf@escher.fritz.box> <4E156D17.8020804@gmx.at> <871uy2qvv6.fsf@escher.fritz.box> <4E15D520.4030809@gmx.at> <87mxgobcj6.fsf@escher.fritz.box> <4E1814F7.4060002@gmx.at> <87r55zekei.fsf@escher.fritz.box> <4E18510F.7070506@gmx.at> <87wrfrmnbv.fsf@escher.fritz.box> <87sjqfmm2n.fsf@escher.fritz.box> <4E1969EE.7040201@gmx.at> <87d3hiqvos.fsf@escher.fritz.box> <4E19A979.3070805@gmx.at> <87zkklx4gl.fsf@escher.fritz.box> <4E1B4B7F.8090500@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1310414737 22682 80.91.229.12 (11 Jul 2011 20:05:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 11 Jul 2011 20:05:37 +0000 (UTC) Cc: 9006@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 11 22:05:33 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QgMjV-00049t-3P for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Jul 2011 22:05:33 +0200 Original-Received: from localhost ([::1]:43133 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgMjU-0005fW-1F for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Jul 2011 16:05:32 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:57817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgMj5-0005df-EZ for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2011 16:05:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgMj1-0000qu-NC for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2011 16:05:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59726) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgMj1-0000qm-72 for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2011 16:05:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QgMj0-0002no-85; Mon, 11 Jul 2011 16:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Jul 2011 20:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9006 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9006-submit@debbugs.gnu.org id=B9006.131041469110749 (code B ref 9006); Mon, 11 Jul 2011 20:05:02 +0000 Original-Received: (at 9006) by debbugs.gnu.org; 11 Jul 2011 20:04:51 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgMio-0002nI-FC for submit@debbugs.gnu.org; Mon, 11 Jul 2011 16:04:51 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1QgMil-0002n4-Fi for 9006@debbugs.gnu.org; Mon, 11 Jul 2011 16:04:49 -0400 Original-Received: (qmail invoked by alias); 11 Jul 2011 20:04:36 -0000 Original-Received: from i59F57B84.versanet.de (EHLO escher.home) [89.245.123.132] by mail.gmx.net (mp004) with SMTP; 11 Jul 2011 22:04:36 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX19+DHtTQ5Z+mGy6gAdomNWHOEuSNmZCO6y8D58yZY gnuEToCt1FLQsv Original-Received: by escher.home (Postfix, from userid 1000) id BBD795F920; Mon, 11 Jul 2011 22:04:35 +0200 (CEST) In-Reply-To: <4E1B4B7F.8090500@gmx.at> (martin rudalics's message of "Mon, 11 Jul 2011 21:14:07 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 11 Jul 2011 16:05:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:48642 Archived-At: On Mon, 11 Jul 2011 21:14:07 +0200 martin rudalics wrote: >> I applied the patch and rebuilt Emacs, then started with my >> initializations under gdb. Emacs came up fine, then I type C-h C-a and >> it aborted in unshow_buffer; the backtrace is almost identical to the >> one I posted previously. > > Why am I not surprised? Though, it doesn't abort here. Puzzling; I discovered today that I also get the abort with that patch just by starting emacs -Q, evalling (with-temp-buffer (vertical-motion 1)), then typing C-h C-a. >> Then I started Emacs again, started Gnus, as >> with your first suggested patch with set_marker_both (w->buffer, BEG, >> BEGV) > > I suppose you mean set_marker_both (w->pointm, w->buffer, BEG, BEGV) > here. Yes, sorry for the typo. >> the display was unstable (unselected window at first blank, then >> blank fringe), then tried `h' and it worked a few times but the response >> was slow, and then (after `h' not C-g) Emacs aborted in unshow_buffer; >> backtrace below. Just out of curiosity (since I don't understand the >> code), I rebuilt again with the following call (old_buffer instead of >> w->buffer): >> >> set_marker_both >> (w->pointm, old_buffer, BUF_PT (current_buffer), BUF_PT_BYTE (current_buffer)); >> >> This did not cause an abort with C-h C-a nor with h in Gnus, but it >> showed the same problem of point in the non-selected window jumping to >> point-min, despite not passing BEG and BEGV. > > The strange thing about this is that when old_buffer is not the current > buffer, this will set the marker in the wrong buffer which should cause > an abort. But as I stated earlier I'm still completely lost here :-( > > Anyway, I attached another patch. Things are getting more and more > complicated because I have zero experience working with markers in C. I applied it and rebuilt, and so far things look good: display is normal, C-h C-a works fine, and in Gnus both h and and C-x o don't move point in the non-selected buffer. In short, this looks like a good fix -- thanks! I'll keep running under gdb and let you know if anything surprising happens. Bar that, I think you should install this, unless someone has a good reason to object. Steve Berman