Subject: bug#14719: closed (Re: bug#14719: 24.3; Crashing when setting frames to random colors)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 25 Sep 2017 16:54:02 +0000

Your bug report

#14719: 24.3; Crashing when setting frames to random colors

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
14719: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14719
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#14719: 24.3; Crashing when setting frames to random colors
From: Alan Third <[email-masked]>
To: Steve Wainstead <[email-masked]>
Cc: Steve Wainstead <[email-masked]>, [email-masked]
Date: Mon, 25 Sep 2017 17:52:55 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

On Mon, Sep 25, 2017 at 09:30:30AM -0400, Steve Wainstead wrote:
> I’m running 25.2.1 these days and have not experienced it; and I’ve
> 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.

Thanks! I’m closing the bug report.
-- 
Alan Third

Subject: 24.3; Crashing when setting frames to random colors
From: Steve Wainstead <[email-masked]>
To: [email-masked]
Date: Tue, 25 Jun 2013 15:00:09 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

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

;; 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))
  )

(defun sw-randomize-frame-colors ()
  "Change foreground and background colors of the current frame to
random colors."
  (interactive)
  (let 
      (
       (fg-color (sw-make-random-hex-color-string)) 
       (bg-color (sw-make-random-hex-color-string))
       (color-distance #x3fffff)
       )
    (set-foreground-color fg-color)
    (set-background-color bg-color)
    )
  )

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.

Note that color-distance is unused, a feature I've yet to implement.

In GNU Emacs 24.3.1 (x86_64-apple-darwin12.3.0, NS apple-appkit-1187.37)
of 2013-03-20 on swain.socialserve.com
Windowing system distributor `Apple', version 10.3.1187
Configured using:
`configure '--with-ns''

Important settings:
  locale-coding-system: nil
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  display-time-mode: t
  desktop-save-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
y <menu-bar> <options> <menu-set-font> <ns-change-font> 
<ns-change-font> <help-echo> <help-echo> M-x s e SPC 
t SPC f o r e <tab> <return> r e d <return> M-x s e 
t SPC b a c k <tab> <return> r e d <return> M-x s e 
t SPC b a c k g r o u n d SPC c o l o r <return> b 
l a c k <return> M-x s e t SPC f o r e <tab> <return> 
g o l d e n r o d <return> C-e <f1> k <f15> C-x o C-n 
C-e M-b C-x . <return> C-g C-x k <return> <return> 
C-x 1 M-x s e t SPC c u r <tab> <return> c <backspace> 
r e d <return> C-e C-n C-n C-n C-n C-n C-n C-n C-n 
M-x b u g s <tab> C-g M-x r e p o r t - e m a c s - 
b u g <return>

Recent messages:
Using the CPython shell
Local value of py-indent-offset set to 4
Using the CPython shell
Desktop: 9 buffers restored.
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...
Type C-x 1 to delete the help window.
Local value of py-indent-offset set to 4
Using the CPython shell
Mark set
Quit [2 times]

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils find-func etags help-mode vc-git imenu
csv-mode-autoloads package derived diff-mode- two-column edmacro kmacro
python-mode info-look info cl-macs gv easymenu compile cl comint
ansi-color ring byte-opt warnings bytecomp byte-compile cconv advice
help-fns cl-lib advice-preload server time ibuffer desktop paren
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process ns multi-tty
emacs)

---
Steve Wainstead
SocialServe.com