[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: |
Jan Djärv |
Subject: |
Re: C-g crash in C-x C-f (OSX Lion) |
Date: |
Sat, 17 Dec 2011 14:50:16 +0100 |
17 dec 2011 kl. 13:03 skrev Eli Zaretskii:
>> From: Jan Djärv <address@hidden>
>> Date: Sat, 17 Dec 2011 10:46:31 +0100
>> Cc: Andreas Schwab <address@hidden>,
>> address@hidden,
>> address@hidden
>>
>>
>> 17 dec 2011 kl. 09:32 skrev Eli Zaretskii:
>>
>>> 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?
>>
>> My guess is that symbol_to_nsstring does not return NULL, but
>> NSPasteboard pasteboardWithName: does.
>>
>> NSPasteboard knows only of a few specific pasteboards ("General",
>> "Selection", "Secondary", etc.) so if isn't one of those, it returns NULL.
>
> I'm way out of my league here, since I don't really know Objective C,
> but isn't this code in symbol_to_nsstring:
>
> if (EQ (sym, QCLIPBOARD)) return NSGeneralPboard;
> if (EQ (sym, QPRIMARY)) return NXPrimaryPboard;
> if (EQ (sym, QSECONDARY)) return NXSecondaryPboard;
> if (EQ (sym, QTEXT)) return NSStringPboardType;
> return [NSString stringWithUTF8String: SDATA (XSYMBOL (sym)->xname)];
>
> return _something_ that is not NULL even if the symbol is not one of
> the 4 explicitly mentioned?
Yes, but that something is then passed to NSPasteboard pasteboardWithName. It
is that function that returns NULL.
I.e. if symbol_to_nsstring returns NSStringPboardType or whatever the last line
returns.
But the point is that for selection purposes only the first three should be
possible. Also, the NS-code should not crash, but just ignore the bad selection
type.
Jan D.
- 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 <=
- 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), 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