Subject: FvwmTheme

From: Brad Giaccio <[email-masked]>
Date: Mon, 17 Jan 2000 13:02:10 -0500

Alright I give, I can't manage to track down this core dump at all.  
Here are the vitals 

FvwmTheme: Cause of next X Error.
   Error: 10 (BadAccess)
   Major opcode of failed request:  88 (FreeColors)
   Minor opcode of failed request:  0 
   Resource id of failed request:  0x0 
 Leaving a core dump now

#0  0xfefd9968 in __sigprocmask () from /usr/lib/libthread.so.1
#1  0xfefcf1f0 in _resetsig () from /usr/lib/libthread.so.1
#2  0xfefce93c in _sigon () from /usr/lib/libthread.so.1
#3  0xfefd17b4 in _thrp_kill () from /usr/lib/libthread.so.1
#4  0xff0392e0 in abort () from /usr/lib/libc.so.1
#5  0x1a698 in PrintXErrorAndCoredump (dpy=0x2eb88, error=0xffbeee60, 
    MyName=0x2e588 "FvwmTheme") at XError.c:48
#6  0x14b3c in error_handler (d=0x2eb88, e=0xffbeee60) at FvwmTheme.c:967
#7  0xff237154 in _XError () from /usr/local/X11R6/lib/libX11.so.6.0
#8  0xff235984 in _XReply () from /usr/local/X11R6/lib/libX11.so.6.0
#9  0xff22b640 in XQueryColor () from /usr/local/X11R6/lib/libX11.so.6.0
#10 0x16cf4 in GetHiliteColor (background=9330755) at ColorUtils.c:385
#11 0x16e8c in GetHilite (background=9330755) at ColorUtils.c:443
#12 0x1473c in parse_colorset (line=0x2d365 "") at FvwmTheme.c:835
#13 0x131fc in parse_config_line (line=0x2c768 "") at FvwmTheme.c:187
#14 0x14b14 in parse_config () at FvwmTheme.c:961
#15 0x130f0 in main (argc=6, argv=0xffbef47c) at FvwmTheme.c:119

config 
*FvwmThemeColorset 0 fg black,   bg #8b9dc3 # default color
*FvwmThemeColorset 1 fg black,   bg #43608e # hilight color

If I just have Colorset 0 defined it starts up, as soon as I add the  
second one it dumps.  The FreeColors message made me think that the color 
I was quering got freed but that doesn't make any sense in 24bit.

Now I just tried backing out one revision of ColorUtils.C from 1.16
to 1.15 and that fixes my problems.  Which means there is a problem
with the color cache.  Dominik, as I'm looking at your code I'm getting
confused, if I understand correctlly you are creating a cache for each
function that uses it, instead of sharing the cache.  If thats right
doesn't that kind of negate the usefulness of it.  What you probablly
want is a static cache with file scope not function scope.

If I'm way off please let me know but at the very least swapping
ColorUtils.C out for the previous version fixes my problem.

Brad

-- 
--- There are two kinds of knowledge, you either know the answer or
			you know where to find it
		      -Kane, Johnson, and anonymous
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 18 Jan 2000 00:40:35 +0200

On 17 Jan 2000 13:02:10 -0500, Brad Giaccio wrote:
> 
> Dominik, as I'm looking at your code I'm getting
> function that uses it, instead of sharing the cache.

I am not Dominik, but the results of these functions can't be shared, they
use completely different calculations.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 18 Jan 2000 11:58:05 +0100

> use completely different calculations.

What else can I say?

Bye

Dominik ^_^

-- 
Dominik Vogt, Agilent Technologies, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/464-4596, fax: 07031/464-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Brad Giaccio <[email-masked]>
Date: Tue, 18 Jan 2000 07:23:29 -0500

> > use completely different calculations.

You are both correct, upon looking again the three caches probablly
rarelly contain the same values.

To your other comment Dominik, about freeing colors, I beleive indoing the Theme work and before every place that Allocs a colors Frees it later on.  If you see any area that doesn't let me know and I can take a look.

Brad

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 18 Jan 2000 14:47:26 +0100

> To your other comment Dominik, about freeing colors, I beleive indoing the Theme work and before every place that Allocs a colors Frees it later on.  If you see any area that doesn't let me know an…

:-) You are not serious about that, are you?  Not a single colour that
is allocated in the main module is ever freed again.  FvwmTheme is
the first and only exception I have ever seen.

Bye

Dominik ^_^

---

From: Tim Phipps <[email-masked]>
Date: Tue, 18 Jan 2000 14:07:28 +0000

> the first and only exception I have ever seen.
DestroyPicture() free's the pixels when removing removing the pixmap
from the cache.  It's the reason the version of libXpm went up.

Cheers,
Tim.