[Top][All Lists]

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

Re: C-g crash in C-x C-f (OSX Lion)

From: Eli Zaretskii
Subject: Re: C-g crash in C-x C-f (OSX Lion)
Date: Sat, 17 Dec 2011 10:32:49 +0200

> From: Andreas Schwab <address@hidden>
> Cc: Carsten Mattner <address@hidden>,  address@hidden
> Date: Fri, 16 Dec 2011 22:24:26 +0100
> Eli Zaretskii <address@hidden> writes:
> > How come the x coordinate of an event could be passed to
> > ns_string_to_symbol as a string, no matter how it is type-cast??
> Because Fx_own_selection_internal put it there.
> (Get your barf bag ready!)

Thanks for the heads-up, I needed that bag.

So the question now is why that string comes out as NULL.  This
happens in this code in x-own-selection-internal:

  pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (selection_name)];

and the value of pb gets later put into the event's x member:

  /* XXX An evil hack, but a necessary one I fear XXX */
    struct input_event ev;
    ev.modifiers = 0;
    ev.code = 0;
    *(EMACS_INT*)(&(ev.x)) = (EMACS_INT)pb; // FIXME: BIG UGLY HACK!!
    *(EMACS_INT*)(&(ev.y)) = (EMACS_INT)NSStringPboardType;
    ns_handle_selection_request (&ev);

Now, this part of the backtrace:

  #4  0x00285202 in Fx_own_selection_internal (selection_name=27744162,
  selection_value=39954401) at nsselect.m:425
          ev = {
            kind = SELECTION_REQUEST_EVENT,
            code = 0,
            part = 1771886,
            modifiers = 0,
            x = 0,
            y = -1396380776,
            timestamp = 1,
            padding = {0x4, 0x1a6ba22},
            frame_or_window = 27783754,
            arg = 27703842
          pb = (id) 0x0

indicates that pb comes out as NULL and gets put into ev.x as zero.
So the question is: what is selection_name, whose value is 27744162,
and which caused symbol_to_nsstring to return NULL?

Carsten, if you still have the crashed session, please go to the stack
frame showing the call to Fx_own_selection_internal (in the above
case, this is frame #4), by typing "frame N" at the GDB prompt (where
N is the number of the frame), and then type these commands:

  (gdb) p selection_name
  (gdb) xtype

I expect the last command to say "Lisp_Symbol", in which case please

  (gdb) xsymbol

to show what symbol is that.

If the crashed session is no longer available, make it crash as soon
as possible and then do the above.

reply via email to

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