Subject: Re: bug#9723: 24.0.50; Emacs Clipboard crash

From: Eli Zaretskii <[email-masked]>
Date: Tue, 24 Jan 2012 00:30:32 -0500

> From: Joseph Jones <[email-masked]>
> CC: "[email-masked]" <[email-masked]>
> Date: Mon, 23 Jan 2012 18:23:10 -0800
> 
> OK, it crashed for me again using the latest version from the link below.

This is not the same crash as what you had when this bug was opened.
It's something entirely different.  It is clearly related to the
display engine, see below.

> This time I wasn't doing anything other than running a compile. I was disconnected from the machine and when I connected remotely this is what I found.

Sorry, I don't understand: what does it mean "disconnected from the
machine"?  Are you running Emacs through a remote desktop of some kind
(mstsc.exe or some such)?  If so, this definitely warrants a separate
bug report.  In any case, please describe in more detail what happened
around the crash.

> Program received signal SIGTRAP, Trace/breakpoint trap.
> [Switching to Thread 10208.0x2420]
> 0x7d61002e in strchr () from C:\WINDOWS\system32\ntdll.dll
> (gdb) bt
> #0  0x7d61002e in strchr () from C:\WINDOWS\system32\ntdll.dll
> #1  0x0114f10a in w32_abort () at w32fns.c:7210
> #2  0x010ea4c8 in adjust_glyph_matrix (w=0x3903a00, matrix=0x38ed500, x=0, y=0, dim=...) at dispnew.c:493

This is an assertion violation here:

      left = margin_glyphs_to_reserve (w, dim.width, w->left_margin_cols);
      right = margin_glyphs_to_reserve (w, dim.width, w->right_margin_cols);
      xassert (left >= 0 && right >= 0);

I hope you still have this crash in the debugger; if so, please tell
what are the values of `left' and `right' (in thread #1 and in frame
#2).

It's likely that display dimensions cannot be figured out for a
disconnected remote session.  This is what this crash is about.

Can you reproduce this problem at will, by deliberately disconnecting
and then reconnecting?