From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Newsgroups: gmane.emacs.bugs Subject: bug#3605: Crash in ns_index_color (nsterm.m:1305) Date: Wed, 21 Oct 2009 17:05:20 -0700 Message-ID: <518da0610910211705u68dcd37ai8ce815cc7a035b3e@mail.gmail.com> Reply-To: Mike , 3605@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1256171292 19072 80.91.229.12 (22 Oct 2009 00:28:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Oct 2009 00:28:12 +0000 (UTC) To: 3605@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 22 02:28:01 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N0lX3-0007kW-Ua for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Oct 2009 02:27:58 +0200 Original-Received: from localhost ([127.0.0.1]:32937 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0lX3-0007yC-5G for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Oct 2009 20:27:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0lWT-0007jr-2F for bug-gnu-emacs@gnu.org; Wed, 21 Oct 2009 20:27:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0lWO-0007hW-4R for bug-gnu-emacs@gnu.org; Wed, 21 Oct 2009 20:27:20 -0400 Original-Received: from [199.232.76.173] (port=46589 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0lWO-0007hP-0O for bug-gnu-emacs@gnu.org; Wed, 21 Oct 2009 20:27:16 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:37373) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N0lWN-0008I0-CZ for bug-gnu-emacs@gnu.org; Wed, 21 Oct 2009 20:27:15 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9M0RCr3023279; Wed, 21 Oct 2009 17:27:12 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n9M0F4DN021529; Wed, 21 Oct 2009 17:15:04 -0700 Resent-Date: Wed, 21 Oct 2009 17:15:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Mike Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , owner@emacsbugs.donarmstrong.com 2Resent-Date: Thu, 22 Oct 2009 00:15:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3605 X-Emacs-PR-Package: emacs,ns X-Emacs-PR-Keywords: Original-Received: via spool by 3605-submit@emacsbugs.donarmstrong.com id=B3605.125616992720701 (code B ref 3605); Thu, 22 Oct 2009 00:15:04 +0000 Original-Received: (at 3605) by emacsbugs.donarmstrong.com; 22 Oct 2009 00:05:27 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail-yw0-f179.google.com (mail-yw0-f179.google.com [209.85.211.179]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9M05QTN020698 for <3605@emacsbugs.donarmstrong.com>; Wed, 21 Oct 2009 17:05:27 -0700 Original-Received: by ywh9 with SMTP id 9so6450258ywh.19 for <3605@emacsbugs.donarmstrong.com>; Wed, 21 Oct 2009 17:05:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=z9nxXlwcoaO8iOTEsPIzn9ieklwzIATZ/5Gsr0C1EqI=; b=NW4LkXq5FSZyw8KXoe1Q4KWqMjaWgWowjm4JkOOthe6viqwk3tePDFq+u5Mku2nhcW m3JlnJ29unV5sEpGgu0AEsciu+YDeR2/05Zg20xTGsWexG5Ry0Wdpeli1nmFDbCa58A4 UBrCP8bZ4++oHh+8S8fAVYkzbIXVOfLB7ONvM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=j73NpIBs/Ju+RPHm/W616pH+PELy5IDEoJv1CDEh286/BJcOP45JXv17yzRbxzSxfG DkAHyumjQHZdDe4s3JRmp52jT5MPFtw/ZoDTokEEt8Pv+qpnfQbwapbqMY3YThsS96ez 8PuNadJ/0J1LXrcUrNTqRP4oD4DI9DvofPqfs= Original-Received: by 10.150.76.36 with SMTP id y36mr14294134yba.44.1256169920535; Wed, 21 Oct 2009 17:05:20 -0700 (PDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 21 Oct 2009 20:27:20 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32162 Archived-At: I spent some more time looking at this, and I think I've found the problem: ns_defined_color needs to block input around its calls to ns_get_color and (at least) ns_index_color. ns_get_color calls UNBLOCK_INPUT after allocating an autorelease NSColor. Because the outer autorelease pool is flushed every time through the event loop, sometimes the color gets freed before ns_index_color has a chance to retain it. As a reliable test case, try loading the color palette from http://www.emacswiki.org/cgi-bin/wiki/palette.el