From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: C-g crash in C-x C-f (OSX Lion) Date: Sat, 17 Dec 2011 14:50:16 +0100 Message-ID: References: <4EEB48B2.9090602@swipnet.se> <83liqc1tac.fsf@gnu.org> <83fwgk1atk.fsf@gnu.org> <838vmb1tu6.fsf@gnu.org> <128B9047-74A3-4AA4-82F4-764CF8D0A2F6@swipnet.se> <8362hf1k3c.fsf@gn u.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1324129834 24465 80.91.229.12 (17 Dec 2011 13:50:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 17 Dec 2011 13:50:34 +0000 (UTC) Cc: schwab@linux-m68k.org, carstenmattner@googlemail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 17 14:50:28 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rbueh-0008Bj-HR for ged-emacs-devel@m.gmane.org; Sat, 17 Dec 2011 14:50:28 +0100 Original-Received: from localhost ([::1]:40189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rbueh-0003BB-65 for ged-emacs-devel@m.gmane.org; Sat, 17 Dec 2011 08:50:27 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:53593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rbuee-0003B6-SK for emacs-devel@gnu.org; Sat, 17 Dec 2011 08:50:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rbued-0007sp-MW for emacs-devel@gnu.org; Sat, 17 Dec 2011 08:50:24 -0500 Original-Received: from mailout.melmac.se ([62.20.26.67]:60244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rbued-0007rw-AZ for emacs-devel@gnu.org; Sat, 17 Dec 2011 08:50:23 -0500 Original-Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id E609F9CA8 for ; Sat, 17 Dec 2011 14:50:17 +0100 (CET) Original-Received: (qmail 15897 invoked by uid 89); 17 Dec 2011 13:49:41 -0000 Original-Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 17 Dec 2011 13:49:41 -0000 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 0DE507FA058; Sat, 17 Dec 2011 14:50:17 +0100 (CET) In-Reply-To: <8362hf1k3c.fsf@gnu.org> X-Mailer: Apple Mail (2.1251.1) X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 62.20.26.67 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146770 Archived-At: 17 dec 2011 kl. 13:03 skrev Eli Zaretskii: >> From: Jan Dj=E4rv >> Date: Sat, 17 Dec 2011 10:46:31 +0100 >> Cc: Andreas Schwab , >> carstenmattner@googlemail.com, >> emacs-devel@gnu.org >>=20 >>=20 >> 17 dec 2011 kl. 09:32 skrev Eli Zaretskii: >>=20 >>> Now, this part of the backtrace: >>>=20 >>> #4 0x00285202 in Fx_own_selection_internal = (selection_name=3D27744162, >>> selection_value=3D39954401) at nsselect.m:425 >>> ev =3D { >>> kind =3D SELECTION_REQUEST_EVENT, >>> code =3D 0, >>> part =3D 1771886, >>> modifiers =3D 0, >>> x =3D 0, >>> y =3D -1396380776, >>> timestamp =3D 1, >>> padding =3D {0x4, 0x1a6ba22}, >>> frame_or_window =3D 27783754, >>> arg =3D 27703842 >>> } >>> pb =3D (id) 0x0 >>>=20 >>> 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? >>=20 >> My guess is that symbol_to_nsstring does not return NULL, but=20 >> NSPasteboard pasteboardWithName: does. >>=20 >> NSPasteboard knows only of a few specific pasteboards ("General", = "Selection", "Secondary", etc.) so if isn't one of those, it returns = NULL. >=20 > 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: >=20 > 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)]; >=20 > 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.