From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: C-g crash in C-x C-f (OSX Lion) Date: Fri, 16 Dec 2011 23:11:19 +0200 Message-ID: <83fwgk1atk.fsf@gnu.org> References: <4EEB48B2.9090602@swipnet.se> <83liqc1tac.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1324069887 23965 80.91.229.12 (16 Dec 2011 21:11:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 16 Dec 2011 21:11:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Carsten Mattner Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 16 22:11:24 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 1Rbf3q-0005Xb-Rf for ged-emacs-devel@m.gmane.org; Fri, 16 Dec 2011 22:11:23 +0100 Original-Received: from localhost ([::1]:47064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rbf3q-0006yZ-4X for ged-emacs-devel@m.gmane.org; Fri, 16 Dec 2011 16:11:22 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:42868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rbf3n-0006yT-Uw for emacs-devel@gnu.org; Fri, 16 Dec 2011 16:11:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rbf3m-000074-Vv for emacs-devel@gnu.org; Fri, 16 Dec 2011 16:11:19 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:40293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rbf3m-00006z-Ly for emacs-devel@gnu.org; Fri, 16 Dec 2011 16:11:18 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LWB00200EP61000@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Fri, 16 Dec 2011 23:11:17 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.127.39.203]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LWB002RREUR1200@a-mtaout23.012.net.il>; Fri, 16 Dec 2011 23:11:17 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.175 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:146751 Archived-At: > Date: Fri, 16 Dec 2011 21:19:19 +0100 > From: Carsten Mattner > Cc: emacs-devel@gnu.org >=20 > > #0 =A00x9adc5d50 in strlen () > > #1 =A00x001e7601 in intern (str=3D0x0) at lread.c:3707 > > #2 =A00x00283efb in ns_string_to_symbol (t=3D0x0) at nsselect.m:8= 6 > > #3 =A00x002847ab in ns_handle_selection_request (event=3D0xbfffef= 88) at > > nsselect.m:247 > > > > vs the below with with the terminal frontend. > > > > Next I will not load evil-mode and see what happens. >=20 > Can these crashes happen due to enabled assertions? No. Emacs crashes because it tries to compute the length of a string specified by a NULL pointer. It looks like this happens due to a selection request, but when that request is handled, Emacs tries to intern a name that is a NULL string. I don't know enough about the NS build and the code in nsselect.m to reason why this could happen. In particular, I don't understand this portion of the code: static void ns_handle_selection_request (struct input_event *event) { // FIXME: BIG UGLY HACK!!! id pb =3D (id)*(EMACS_INT*)&(event->x); ... selection_name =3D ns_string_to_symbol ([(NSPasteboard *)pb name]= ); 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?? This certainly isn't related to enabled assertions.