From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dhruva Newsgroups: gmane.emacs.devel Subject: Re: Emacs (HEAD) crash on M$ (XP) built with MinGW Date: Tue, 21 Oct 2008 11:10:02 +0530 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1224567623 19490 80.91.229.12 (21 Oct 2008 05:40:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Oct 2008 05:40:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Eli Zaretskii" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 21 07:41:22 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ks9ze-0007is-CH for ged-emacs-devel@m.gmane.org; Tue, 21 Oct 2008 07:41:22 +0200 Original-Received: from localhost ([127.0.0.1]:42280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ks9yY-0004dr-SP for ged-emacs-devel@m.gmane.org; Tue, 21 Oct 2008 01:40:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ks9yR-0004dm-Eg for emacs-devel@gnu.org; Tue, 21 Oct 2008 01:40:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ks9yP-0004da-FK for emacs-devel@gnu.org; Tue, 21 Oct 2008 01:40:06 -0400 Original-Received: from [199.232.76.173] (port=58965 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ks9yP-0004dX-5e for emacs-devel@gnu.org; Tue, 21 Oct 2008 01:40:05 -0400 Original-Received: from ti-out-0910.google.com ([209.85.142.187]:23416) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ks9yO-0007V8-LP for emacs-devel@gnu.org; Tue, 21 Oct 2008 01:40:05 -0400 Original-Received: by ti-out-0910.google.com with SMTP id u5so1078060tia.10 for ; Mon, 20 Oct 2008 22:40:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=KaWYW47WjoIVpySrotBuV36/YT/uFz8woBRrP/MGc2w=; b=sQsRa1zjnzP04jE+1oLdGsMsqfsNEwVyJI9Js78q+Y6ZW1964uHN9nWXmgZsG8TC0O Pr0ekMkkR8SOWbbBtt17hzfeQ3Mrq2uhiGiu4f87YStUx47jLSXQAd7Wwfb91dwj+Kaj N/obY3YCQWLyEs+GSdqd9gwQaxgj1Te1i9FXo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=ZyKuOKuSCOD1NAN4ZiAJ/pIwzzWm0TVPbtCYoZBtJN7K73bQ6BFLQyNOWeN3lkbCUB SVwKez+2rcX5DW6vqWjrx/KA63BoBjNit/BhdOdC3oCfNnnLhQZCVb7mlfLAd6Nhb3H9 DsRDMMZ/xD9m8jb0ywT5m1KO8oYjgRGw4Tbt0= Original-Received: by 10.110.46.3 with SMTP id t3mr5577513tit.30.1224567602497; Mon, 20 Oct 2008 22:40:02 -0700 (PDT) Original-Received: by 10.110.93.2 with HTTP; Mon, 20 Oct 2008 22:40:02 -0700 (PDT) In-Reply-To: Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:104717 Archived-At: Hi, I am now able to reproduce (on M$). 1. run emacs with default frame 2. Open a file with font-lock (some mid sized 'C' file) 3. Maximize the frame 4. scroll down using arrow with the cursor in the 1st column 5. On reaching the last line in the visible frame (not file), the crash happens The following patch fixes this crash (but I do not know why it is NULL): diff --git a/src/xdisp.c b/src/xdisp.c index 47ba85f..f9d34c8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -6240,6 +6240,12 @@ next_element_from_string (it) { struct text_pos position; + /* if string is NULL, nothing much we can do */ + if (NULL == it->string) + { + return 0; + } + xassert (STRINGP (it->string)); xassert (IT_STRING_CHARPOS (*it) >= 0); position = it->current.string_pos; -dhruva On Tue, Oct 21, 2008 at 9:12 AM, dhruva wrote: > Hello, > > On Mon, Oct 20, 2008 at 8:11 PM, Eli Zaretskii wrote: >>> Date: Mon, 20 Oct 2008 18:08:15 +0530 >>> From: dhruva >>> >>> I am still seeing the elusive and infrequent crash. I open a 'C' >>> file, maximize the frame and use the page down to scroll down or down >>> arrow. I keep hitting this crash off and now. The tried getting 'xbt' >>> and could not. >> >> xbacktrace will not give you any useful information when the crash is >> inside redisplay, at least not normally, because redisplay is not >> normally triggered by Lisp code. Redisplay is what Emacs normally >> does when it is idle (on the C level). >> >>> (gdb) bt >>> #0 0x0103ca47 in next_element_from_string (it=0x82e1ac) at xdisp.c:6263 >>> #1 0x0103b03e in get_next_display_element (it=0x82e1ac) at xdisp.c:5655 >>> #2 0x0103591d in init_from_display_pos (it=0x82e1ac, w=0x38f0e00, >>> pos=0x3af23e0) at xdisp.c:3035 >> >> Is this optimized build or unoptimized one? If the former, please try > > built with '--no-opt' (disabled optimization) > >> If your xdisp.c is current, and assuming that this is an unoptimized >> build (and so the backtrace is trustworthy), the problem seems to be >> with trying to display something based on some string, which is stored >> at it->string. Could you please see what string is that, and what is >> its contents? That might give us a clue about whodunit. > > Sure, I will look at those more closely. It happens when I open a 'C' file with > global-font-lock enabled. I will try to get stack dumps with all extra > information. -- Contents reflect my personal views only!