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:28: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 1224568825 22488 80.91.229.12 (21 Oct 2008 06:00:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Oct 2008 06:00:25 +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 08:01:24 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 1KsAJ1-0008SV-V7 for ged-emacs-devel@m.gmane.org; Tue, 21 Oct 2008 08:01:24 +0200 Original-Received: from localhost ([127.0.0.1]:53331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KsAHw-00020L-GR for ged-emacs-devel@m.gmane.org; Tue, 21 Oct 2008 02:00:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KsAFr-0001HP-PE for emacs-devel@gnu.org; Tue, 21 Oct 2008 01:58:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KsAFq-0001Ga-2j for emacs-devel@gnu.org; Tue, 21 Oct 2008 01:58:07 -0400 Original-Received: from [199.232.76.173] (port=59424 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KsAFp-0001GV-Qf for emacs-devel@gnu.org; Tue, 21 Oct 2008 01:58:05 -0400 Original-Received: from ti-out-0910.google.com ([209.85.142.189]:27243) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KsAFp-0001HO-5Z for emacs-devel@gnu.org; Tue, 21 Oct 2008 01:58:05 -0400 Original-Received: by ti-out-0910.google.com with SMTP id u5so1083254tia.10 for ; Mon, 20 Oct 2008 22:58:03 -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=qXoiQ3ugJHWx51Fx+UZrtFG19lLyt7spnZHcHxeT6sc=; b=Qd/KvxoVGS43Vw3hU1xiPRLCHzsDIHdmAQ1Zt1CSsbbwVEKagLoNN6+l/XzlfDxdX6 Dn/mbZbs1JOBr40gvj7tt2bM8tZ7XJVnhDH9yMzNf+3z1gCy3E+DxhDEpYQquahdpqvy LSTxGU+qYT8DPGVSuDGoYTTLR6/QzVQDDfs7Y= 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=SRucoB983cOSSg1H5yBRDXS7O1gtM+YFDNLDQt9NW1H/ZIv8C9LXPP3HoR1v9F3o0X DhzLp3UY81MGuGlHF/Va3hw+xJozgpT6IX17zPJFt772L9yIdVyKRDjJV2TAypqCnwgf FxwsJod8rBwIiwCnjjh6pbVXzTCu7P7wUnVj0= Original-Received: by 10.110.84.2 with SMTP id h2mr5617833tib.0.1224568683016; Mon, 20 Oct 2008 22:58:03 -0700 (PDT) Original-Received: by 10.110.93.2 with HTTP; Mon, 20 Oct 2008 22:58: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:104719 Archived-At: Hi, This seems better, the compiler does not warn. Should we add some logging to help debugging here. Since I have absolutely no idea about display engine, I am not sure what information could help developers debug this issue. My changes silently swallow the problem through defensive programming without finding the root cause. This patch positively fixes the crash though! diff --git a/src/xdisp.c b/src/xdisp.c index 47ba85f..2b1b306 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 0/NULL, nothing much we can do */ + if (!(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 11:10 AM, dhruva wrote: > 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. -- Contents reflect my personal views only!