emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs (HEAD) crash on M$ (XP) built with MinGW


From: dhruva
Subject: Re: Emacs (HEAD) crash on M$ (XP) built with MinGW
Date: Tue, 21 Oct 2008 11:28:02 +0530

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 <address@hidden> 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 <address@hidden> wrote:
>> Hello,
>>
>> On Mon, Oct 20, 2008 at 8:11 PM, Eli Zaretskii <address@hidden> wrote:
>>>> Date: Mon, 20 Oct 2008 18:08:15 +0530
>>>> From: dhruva <address@hidden>
>>>>
>>>>  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!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]