From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Steve Wainstead Newsgroups: gmane.emacs.bugs Subject: bug#14719: 24.3; Crashing when setting frames to random colors Date: Mon, 25 Sep 2017 09:30:30 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_D9CF43F9-A3ED-4623-8FAC-F7B14BD05E1F" X-Trace: blaine.gmane.org 1506353427 18641 195.159.176.226 (25 Sep 2017 15:30:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 25 Sep 2017 15:30:27 +0000 (UTC) Cc: Steve Wainstead , 14719@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 25 17:30:22 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwVKv-0004Zr-IU for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Sep 2017 17:30:21 +0200 Original-Received: from localhost ([::1]:43054 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwVL2-0001zf-RJ for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Sep 2017 11:30:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwVKm-0001sU-Ly for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2017 11:30:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwVKg-0001r8-HQ for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2017 11:30:12 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49980) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dwVKg-0001qy-AZ for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2017 11:30:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dwVKf-0007jU-1A for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2017 11:30:06 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Steve Wainstead Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Sep 2017 15:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14719 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: unreproducible Original-Received: via spool by 14719-submit@debbugs.gnu.org id=B14719.150635337829607 (code B ref 14719); Mon, 25 Sep 2017 15:30:04 +0000 Original-Received: (at 14719) by debbugs.gnu.org; 25 Sep 2017 15:29:38 +0000 Original-Received: from localhost ([127.0.0.1]:58657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwVKD-0007hT-Ex for submit@debbugs.gnu.org; Mon, 25 Sep 2017 11:29:38 -0400 Original-Received: from us-smtp-delivery-157.mimecast.com ([216.205.24.157]:46589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwTT3-000455-Jv for 14719@debbugs.gnu.org; Mon, 25 Sep 2017 09:30:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=EMPHASYSSOFTWARE.onmicrosoft.com; s=selector1-emphasyssoftware-com02b; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ROOcAOUSiE7z4ZmmchrfRQzqfX8LKb+VKKSY/b1XAII=; b=PApgNPFwnFahVLNRhsMJXcU6U7jRFuGMLFwXZxPBlukXKLC44ciuFn2QU82R7zRsBfL6ofPuqinRX4QaE7G9rTn1nm1niI+nTFHALuKFYiy61Mwz7ZB/HCq1mrPTNGcpOmesZXjchEugDvCLn+FjCbPitM90gxKLKR8VxEbIWZo= Original-Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01lp0112.outbound.protection.outlook.com [207.46.163.112]) (Using TLS) by us-smtp-1.mimecast.com with ESMTP id us-mta-99-iIiwKHcQMz-5ayldJwqhbA-1; Mon, 25 Sep 2017 09:30:35 -0400 Original-Received: from [192.168.254.31] (47.206.63.93) by BN6PR05MB3667.namprd05.prod.outlook.com (10.174.94.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.5; Mon, 25 Sep 2017 13:30:33 +0000 In-Reply-To: X-Mailer: Apple Mail (2.3124) X-Originating-IP: [47.206.63.93] X-ClientProxiedBy: CY4PR22CA0039.namprd22.prod.outlook.com (10.172.142.153) To BN6PR05MB3667.namprd05.prod.outlook.com (10.174.94.160) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c4369448-3a93-4559-79fb-08d5041999d4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BN6PR05MB3667; X-Microsoft-Exchange-Diagnostics: 1; BN6PR05MB3667; 3:7g0p6ytyZ1qXxZaIDrH+1m3ES/tmu7Y4hsyfsCfBXu4utzbZ73sIVRhQKXCWR/K3Y0/bgOjYsZo4OIwbxaXZJzxJDL4aabsrhzXuf3e6u5qPTULFrIwQTToQLBlrLm+wulRhs6B3uPW1G9xx4E4cM7ArnjUTu7HhlWaewtEY+WsiJGWbkfutRbk41TU8yFgQjKdXEG+gllh854mkwYHE1xTlEmrd86TyhxTlbfy7ECYRNHMF5ey5ffwa58xwTiuA; 25:59/HM0n0lvXLpcS4+KWAQxDUp7TxXopV+lu47Ik0ZGE+xhpO03QkHYHPMZDB0rsZ8TOJe2/L5VsXa1OlpuvZv2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tDA8muucm X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123558100)(20161123562025)(20161123555025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR05MB3667; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR05MB3667; X-Forefront-PRVS: 04410E544A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6049001)(39830400002)(346002)(376002)(377454003)(24454002)(199003)(189002)(36756003)(50226002)(5660300001)(76176999)(117156002)(57306001)(478600001)(25786009)(236005)(77096006)(6486002)(90366009)(6306002)(101416001)(86362001)(82746002)(53936002)(105586002)(2950100002)(6916009)(106356001)(4326008)(6246003)(53386004)(229853002)(66066001)(6116002)(3846002)(69556001)(84326002)(83716003)(2906002)(50986999)(68736007)(16576012)(316002)(16586007)(16526017)(97736004)(606006)(53546010)(7736002)(8676002)(33656002)(81166006)(8936002)(189998001)(81156014); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR05MB3667; H:[192.168.254.31]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN6PR05MB3667; 23:X4CkvTcV3h/RlrBZB/ZYGKL0Xf0addX6tZoETXEshV39Q/uz8533tR/6UQ8u6DudExNAJQUc86dSAgXr8fwrsnOnDcAEvb8dP7Leodj4oHiZQjz96zK4wtJHe2fflBLFRWPQN6dRKFibQWHa/5xTUTOFrnArSLSv9lEBohr5Yc9NsKPNMGc2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2ixVNfFo8FKDQhSAD+rBfOaH7P8RxJQ864lNas2tCTI5kokcEp5AHjfnBi3b+IDyeVdJ/t8Vu1xMnHBWJAu2yHu+01Hf4okPb87Lu/QXevIfpG757euag==; 24:75mfl+QFL3RuiWQk1Km8NDcEpFvfHC9/YWN/U13RacKWNJTR1yJajxETkKmh+aiNPv3DG5nmKf8FTmFpasJTS2ky1N1u3Isuovm38akoeEE=; 7:g1WH8YPCr8eKoVCygqFicYXpXcT2cvYakkH2YX0ULWCUPp23VtnR5Fn0BUHAxvX9yX9NgseCDaIqUF/ef/uqedN67ygEuCF/XgO89EWaOEVkv6GY0Ktqry1cR294gr3wl3SsTJCPsJfTO2onGf4WbKCorLMrsSBn8LHJjqSd8/pUmSiWxxylORyltSSgmshxLSxq5VtHz4Nws1syajsbrkxmM53JiSnTG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR05MB3667; 20:1KCtzWiYaiQrsgNczLs5ithj/BnxGlTXfy3ajnCeTcoA6BgRO4/+BZ65E/brTrzOcczaUMbpwom1i+HjtLk8ac4BbI3QRTb4AuKmUhh3VeR7l1kHIebhYrU9tk/LNcEOu55Ja/XUQDK/2BmNd2Ei1FAIVcPOO4ecq42Z+bo41x0= X-OriginatorOrg: emphasys-software.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2017 13:30:33.7763 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 18641390-e14c-429b-b963-713659ab4474 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR05MB3667 X-MC-Unique: iIiwKHcQMz-5ayldJwqhbA-1 X-Mailman-Approved-At: Mon, 25 Sep 2017 11:29:36 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:137416 Archived-At: --Apple-Mail=_D9CF43F9-A3ED-4623-8FAC-F7B14BD05E1F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=WINDOWS-1252 I=92m running 25.2.1 these days and have not experienced it; and I=92ve bee= n using the code below once again, so your timing is actually perfect! If I= do see it again I will email you a stack trace from the Crash Reporter. > On Sep 25, 2017, at 9:22 AM, Alan Third wrote: >=20 > Steve Wainstead writes: >=20 >> I have a Lisp function that is run every time I do M-x compile: >>=20 >> ;; choose random colors every time we compile, just for fun >> (defun sw-make-random-hex-color-string () >> "Return a string in the form of #FFFFFF. Choose the number for >> #xffffff randomly using Emacs Lisp's builtin function (random)." >> ;; seed our random number generator: current datetime plus Emacs's >> ;; process ID >> (random t) >> (format "#%06x" (random #xffffff)) >> ) >>=20 >> (defun sw-randomize-frame-colors () >> "Change foreground and background colors of the current frame to >> random colors." >> (interactive) >> (let=20 >> ( >> (fg-color (sw-make-random-hex-color-string))=20 >> (bg-color (sw-make-random-hex-color-string)) >> (color-distance #x3fffff) >> ) >> (set-foreground-color fg-color) >> (set-background-color bg-color) >> ) >> ) >>=20 >> I *think* sometimes the color values come out the same and it causes >> Emacs to crash. I'm not sure because it's almost instantaneous when I >> run compile. >=20 > Hi, sorry it's taken so long for someone to come back to you. >=20 > I can't reproduce this crash, are you still experiencing it? > --=20 > Alan Third >=20 --- Steve Wainstead Software Engineer Socialserve.com by Emphasys Software (704) 709-2868 swainstead@emphasys-software.com --Apple-Mail=_D9CF43F9-A3ED-4623-8FAC-F7B14BD05E1F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=WINDOWS-1252 I=92m runni= ng 25.2.1 these days and have not experienced it; and I=92ve been using the= code below once again, so your timing is actually perfect! If I do see it = again I will email you a stack trace from the Crash Reporter.

= On Sep 25, 2017, at 9:22 AM, Alan Third <alan@idiocy.org> wrote:

Steve Wainstead <swain@socialserve.com> = writes:

I= have a Lisp function that is run every time I do M-x compile:

;; choose random colors every time we compile, just for fu= n
(defun sw-make-random-hex-color-string ()
&n= bsp;"Return a string in the form of #FFFFFF. Choose the number for
  #xffffff randomly using Emacs Lisp's builtin function (r= andom)."
 ;; seed our random number generator: current = datetime plus Emacs's
 ;; process ID
&nb= sp;(random t)
 (format "#%06x" (random #xffffff))
 )

(defun sw-randomize-frame-co= lors ()
 "Change foreground and background colors of th= e current frame to
random colors."
 (inte= ractive)
 (let
    =  (
      (fg-color (sw-ma= ke-random-hex-color-string))
     =  (bg-color (sw-make-random-hex-color-string))
 &nb= sp;    (color-distance #x3fffff)
 &= nbsp;    )
   (set-foregr= ound-color fg-color)
   (set-background-color= bg-color)
   )
 )

I *think* sometimes the color values come out the sa= me and it causes
Emacs to crash. I'm not sure because it's al= most instantaneous when I
run compile.

Hi, sorry it's taken so long for someone to come back t= o you.

I can't reproduce this crash, are you s= till experiencing it?
--
Alan Third


---
Steve Wainstead
Software Engineer
Socialserve.com by Emphasys Software
(= 704) 709-2868
swainstead@emphasys-software.com

--Apple-Mail=_D9CF43F9-A3ED-4623-8FAC-F7B14BD05E1F--