GNU bug report logs - #14719
24.3; Crashing when setting frames to random colors

Previous Next

Package: emacs;

Reported by: Steve Wainstead <swain <at> socialserve.com>

Date: Tue, 25 Jun 2013 22:12:02 UTC

Severity: normal

Tags: unreproducible

Found in version 24.3

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Steve Wainstead <swainstead <at> emphasys-software.com>
To: Alan Third <alan <at> idiocy.org>
Cc: Steve Wainstead <swain <at> socialserve.com>, 14719 <at> debbugs.gnu.org
Subject: bug#14719: 24.3; Crashing when setting frames to random colors
Date: Mon, 25 Sep 2017 09:30:30 -0400
[Message part 1 (text/plain, inline)]
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.

> On Sep 25, 2017, at 9:22 AM, Alan Third <alan <at> idiocy.org> wrote:
> 
> Steve Wainstead <swain <at> 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 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.
> 
> Hi, sorry it's taken so long for someone to come back to you.
> 
> I can't reproduce this crash, are you still experiencing it?
> -- 
> Alan Third
> 

---
Steve Wainstead
Software Engineer
Socialserve.com by Emphasys Software
(704) 709-2868
swainstead <at> emphasys-software.com

[Message part 2 (text/html, inline)]

This bug report was last modified 7 years and 332 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.