[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: |
Carsten Mattner |
Subject: |
Re: C-g crash in C-x C-f (OSX Lion) |
Date: |
Sat, 17 Dec 2011 16:39:24 +0100 |
On Sat, Dec 17, 2011 at 9:32 AM, Eli Zaretskii <address@hidden> wrote:
>> 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.kind = SELECTION_REQUEST_EVENT;
> 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
> type
>
> (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.
New session same #4 for that call
(gdb) frame 4
#4 0x00285202 in Fx_own_selection_internal (selection_name=27744162,
selection_value=78814449) at nsselect.m:425
425 ns_handle_selection_request (&ev);
Current language: auto; currently objective-c
(gdb) p selection_name
$1 = 27744162
(gdb) xtype
Undefined command: "xtype". Try "help".
(gdb) xsymbol
Undefined command: "xsymbol". Try "help".
(gdb)
Could gdb be too old for xsymbol/xtype commands? Are those aliases?
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 8 20:32:45 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
Apple prefers lldb and I have that ready and also could build
lldb from svn trunk if there's a reason to do so.
- Re: C-g crash in C-x C-f (OSX Lion), (continued)
- Re: C-g crash in C-x C-f (OSX Lion), Andreas Schwab, 2011/12/16
- Re: C-g crash in C-x C-f (OSX Lion), Stephen J. Turnbull, 2011/12/16
- Re: C-g crash in C-x C-f (OSX Lion), Óscar Fuentes, 2011/12/16
- Re: C-g crash in C-x C-f (OSX Lion), Eli Zaretskii, 2011/12/17
- Re: C-g crash in C-x C-f (OSX Lion), Jan Djärv, 2011/12/17
- Re: C-g crash in C-x C-f (OSX Lion), Eli Zaretskii, 2011/12/17
- Re: C-g crash in C-x C-f (OSX Lion), Jan Djärv, 2011/12/17
- Re: C-g crash in C-x C-f (OSX Lion),
Carsten Mattner <=
- Re: C-g crash in C-x C-f (OSX Lion), Carsten Mattner, 2011/12/17
- Re: C-g crash in C-x C-f (OSX Lion), Jan Djärv, 2011/12/17
- Re: C-g crash in C-x C-f (OSX Lion), Carsten Mattner, 2011/12/17
- Re: C-g crash in C-x C-f (OSX Lion), Carsten Mattner, 2011/12/17
- Re: C-g crash in C-x C-f (OSX Lion), Jan Djärv, 2011/12/17
- Re: C-g crash in C-x C-f (OSX Lion), Carsten Mattner, 2011/12/17
- Re: C-g crash in C-x C-f (OSX Lion), Jan Djärv, 2011/12/17
- Re: C-g crash in C-x C-f (OSX Lion), Carsten Mattner, 2011/12/17
- Re: C-g crash in C-x C-f (OSX Lion), Jan Djärv, 2011/12/17
- Re: C-g crash in C-x C-f (OSX Lion), Carsten Mattner, 2011/12/17