From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Cocoa Emacs crashes when background color is set Date: Fri, 18 Jul 2008 14:15:14 -0400 Message-ID: <87abgft5xp.fsf@stupidchicken.com> References: <86k5fjmi01.fsf@lifelogs.com> <3DB26FC9-EDDC-4E6B-B956-6E0ACD2FD4C2@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1216404902 18002 80.91.229.12 (18 Jul 2008 18:15:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Jul 2008 18:15:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Whetstone Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 18 20:15:50 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KJuUC-0002sb-Ib for ged-emacs-devel@m.gmane.org; Fri, 18 Jul 2008 20:15:20 +0200 Original-Received: from localhost ([127.0.0.1]:57479 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJuTJ-0002K3-Iw for ged-emacs-devel@m.gmane.org; Fri, 18 Jul 2008 14:14:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KJuTE-0002Gf-Bj for emacs-devel@gnu.org; Fri, 18 Jul 2008 14:14:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KJuTC-0002D9-Ma for emacs-devel@gnu.org; Fri, 18 Jul 2008 14:14:19 -0400 Original-Received: from [199.232.76.173] (port=56843 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJuTC-0002Cv-ED for emacs-devel@gnu.org; Fri, 18 Jul 2008 14:14:18 -0400 Original-Received: from cyd.mit.edu ([18.115.2.24]:58821 helo=cyd) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KJuTC-00087b-8I for emacs-devel@gnu.org; Fri, 18 Jul 2008 14:14:18 -0400 Original-Received: by cyd (Postfix, from userid 1000) id 6792857E2D4; Fri, 18 Jul 2008 14:15:15 -0400 (EDT) In-Reply-To: <3DB26FC9-EDDC-4E6B-B956-6E0ACD2FD4C2@gmail.com> (David Whetstone's message of "Fri, 18 Jul 2008 08:25:37 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:100951 Archived-At: David Whetstone writes: >> I checked out Emacs from CVS yesterday, built and installed on Mac >> OS X >> Leopard --with-ns >> >> With emacs -q, this call >> >> (set-background-color "black") >> >> exits the whole application. I can provide detailed tracing next >> week if it can't be replicated by Adrian or anyone else; I won't have >> access to Leopard until then (and yesterday I only had a few minutes, >> sorry this is a very barebones bug report). > > Just so we don't duplicate effort, I've already traced the source of > the problem which I reported this last month before the merge on both > the emacs-app-dev-@lists.sourceforge.net mailing list: Maybe the following patch fixes this (1000% untested). *** trunk/src/nsfns.m.~1.6.~ 2008-07-17 10:49:13.000000000 -0400 --- trunk/src/nsfns.m 2008-07-18 14:13:27.000000000 -0400 *************** *** 400,406 **** face = FRAME_DEFAULT_FACE (f); if (face) { ! col = NS_FACE_BACKGROUND (face); face->background = (EMACS_UINT) [[col colorWithAlphaComponent: alpha] retain]; [col release]; --- 400,406 ---- face = FRAME_DEFAULT_FACE (f); if (face) { ! col = ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f); face->background = (EMACS_UINT) [[col colorWithAlphaComponent: alpha] retain]; [col release];