Subject: FvwmAuto busted in CVS

From: [email-masked] (Paul D. Smith)
Date: 09 Aug 1999 17:35:34 -0400

I updated CVS this morning and just got around to restarting: FvwmAuto
no longer works.  It's running, but it doesn't bring the active window
to the top anymore.

I tried actually stopping fvwm/X altogether and restarting, and still no
luck.

I used the FvwmAuto app from my last build sometime mid-July and that is
working.

Also every time I start Fvwm I get this error; not sure who's generating
it?

  X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
    Major opcode of failed request:  70 (X_PolyFillRectangle)
    Resource id in failed request:  0x3800013
    Serial number of failed request:  763
    Current serial number in output stream:  779

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
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: Dominik Vogt <[email-masked]>
Date: Tue, 10 Aug 1999 08:33:14 +0200

> I used the FvwmAuto app from my last build sometime mid-July and that is

I'm working on it...

>     Current serial number in output stream:  779

I got this for ages, but I can't figure out what is causing this
message.

Bye

Dominik ^_^

-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-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: Dominik Vogt <[email-masked]>
Date: Tue, 10 Aug 1999 09:25:09 +0200

> no longer works.  It's running, but it doesn't bring the active window

Fixed.

Bye

Dominik ^_^

---

From: Tim Phipps <[email-masked]>
Date: Tue, 10 Aug 1999 14:27:04 +0100

>     Major opcode of failed request:  70 (X_PolyFillRectangle)

That comes from an XFillRectangle. Which modules do you run?

---

From: [email-masked] (Paul D. Smith)
Date: 10 Aug 1999 10:11:19 -0400

%% Tim Phipps <[email-masked]> writes:

  tp> "Paul D. Smith" wrote:

  >> X Error of failed request: BadDrawable (invalid Pixmap or Window
  >> parameter) Major opcode of failed request: 70 (X_PolyFillRectangle)

  tp> That comes from an XFillRectangle. Which modules do you run?

~/.fvwm2rc

 AddToFunc InitFunction
 +	"I" Module FvwmAuto 500
 +	"I" Module FvwmButtons
 +	"I" Module FvwmAnimate

~/.FvwmButtons

  (2x1, Swallow "FvwmPager" "FvwmPager 0 0")

BTW, is it possible to insert some kind of prefix before the error
message, at least the hostname or something?  I'm not too familiar with
how the messages are generated: does X do it "automatically" or is there
some kind of perror() equivalent?  If the latter we could make our own
"error printer" function that printed the name of the module, then the X
error, or something like that.  At least it would help.

---

From: [email-masked] (Paul D. Smith)
Date: 10 Aug 1999 10:43:20 -0400

%% [email-masked] (Paul D. Smith) writes:

  pds> BTW, is it possible to insert some kind of prefix before the error
  pds> message, at least the hostname or something?
                             `------'
Doh!  "program name"------------'

---

From: Brad Giaccio <[email-masked]>
Date: Tue, 10 Aug 1999 10:46:17 -0400

> error, or something like that.  At least it would help.

Unfortunatelly, they are x errors not ones we can easilly handle, the
easiest thing to do would be to start up Buttons, Animate, and Pager one
by one and whatch to see which one causes the error then send us the
config for that Module.

-- 
--- 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: [email-masked] (Paul D. Smith)
Date: 10 Aug 1999 11:24:39 -0400

%% Brad Giaccio <[email-masked]> writes:

  bg> Unfortunatelly, they are x errors not ones we can easilly handle,
  bg> the easiest thing to do would be to start up Buttons, Animate, and
  bg> Pager one by one and whatch to see which one causes the error then
  bg> send us the config for that Module.

It's FvwmAuto.  Having that as the only module, I get the error on
restart.  If I comment it out and uncomment all my other modules so they
start, I don't get the error.  If I uncomment FvwmAuto again and
restart, I get the error.

Obviously there is no config for this module; I start it with:

  AddToFunc InitFunction

  AddToFunc RestartFunction
  +	"I" Module FvwmAuto 500

---

From: Brad Giaccio <[email-masked]>
Date: Wed, 11 Aug 1999 06:25:53 -0400

>   +	"I" Module FvwmAuto 500

I'm sorry but that can't be and I can prove it.  
cd to modules/FvwmAuto
rm FvwmAuto
gcc  -g -O2  -o FvwmAuto  FvwmAuto.o -L../../libs -lfvwm

it links with no X libraries at all because it makes no X calls. It just
sends messages to fvwm.

Dominik you mentioed the same problem can you give narrowing down your
config a try?

---

From: Ben Winslow <[email-masked]>
Date: Wed, 11 Aug 1999 06:41:13 -0400

> Dominik you mentioed the same problem can you give narrowing down your

Well, I can't seem to reproduce the problem with any of the
aformentioned modules.  I don't suppose one of you could send me your
fvwm2rc?  (I'm rather good at debugging things, but I have to be able to
produce the bug first :)

-- 
Ben Winslow / [email-masked] / |Rain| / freshmeat news squad

Knowledge is of no value unless you put it into practice.
- Heber J. Grant

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 12 Aug 1999 03:06:25 +0300 (IDT)

> it links with no X libraries at all because it makes no X calls. It just

This is not a strict prove. FvwmAuto uses libfvwm.a, which makes X calls.
I agree however that this is not the case. FvwmAuto may be a non-X app,
but it sends the raise command. So the problem may be in the stack code.

Speaking about this, FvwmAuto with non-zero argument seems not to work for
me (tried with the second/third arguments too). Zero first argument works
always. And I don't forget to KillModule between tries.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 12 Aug 1999 20:34:54 +0200

> Dominik you mentioed the same problem can you give narrowing down your

It's the window mentioned in the error message I see is a sub window
of xclock:

  X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
    Major opcode of failed request:  70 (X_PolyFillRectangle)
    Resource id in failed request:  0x3000002
    Serial number of failed request:  466
    Current serial number in output stream:  473

  X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
    Major opcode of failed request:  70 (X_PolyFillRectangle)
    Resource id in failed request:  0x2c00005
    Serial number of failed request:  38
    Current serial number in output stream:  38

  X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
    Major opcode of failed request:  65 (X_PolyLine)
    Resource id in failed request:  0x340000a
                                    ^^^^^^^^^

    Serial number of failed request:  59
    Current serial number in output stream:  66

(The first two messages are generated before several restarts, so the window
id's do not match.)

Output of xwininfo -tree on the root window:

  0x3000009 "FvwmXclock": ("FvwmXclock" "XClock")  46x53+345+1  +347+808
       1 child:
       0x300000a (has no name): ()  46x53+0+0  +347+808
       ^^^^^^^^^

The xclock is swallowed inside FvwmButtons with:

*FvwmButtons(6x5, Swallow(Kill, UseOld) FvwmXclock `Exec exec xclock -name FvwmXclock -geometry 40x40+2000+2000 -padding 1 -analog -chime -bg CBACK`, Action(Mouse1) beep)

(The button size is 9x11 pixels).

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [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: Mon, 16 Aug 1999 07:07:36 -0400

> *FvwmButtons(6x5, Swallow(Kill, UseOld) FvwmXclock `Exec exec xclock -name FvwmXclock -geometry 40x40+2000+2000 -padding 1 -analog -chime -bg CBACK`, Action(Mouse1) beep)

Just trying to verify here if you set bg to an actual color do you still get the error message?

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 16 Aug 1999 13:25:45 +0200

> Just trying to verify here if you set bg to an actual color do you still get the error message?

CBACK *is* an actual colour defined with rgb:xx/xx/xx. That's part of my
FvwmCpp setup. The problem only occurs when xclock is swallowed.

Bye

Dominik ^_^

---

From: Brad Giaccio <[email-masked]>
Date: Tue, 17 Aug 1999 06:59:45 -0400

> > > *FvwmButtons(6x5, Swallow(Kill, UseOld) FvwmXclock `Exec exec xclock -name FvwmXclock -geometry 40x40+2000+2000 -padding 1 -analog -chime -bg CBACK`, Action(Mouse1) beep)
 
Well I just tried 
DestroyModuleConfig AButtons*
*AButtons(Swallow(Kill, UseOld) FvwmXclock `Exec exec xclock -name FvwmXclock -geometry 40x40+2000+2000 -padding 1 -analog -chime -bg rgb:50/50/20`, Action(Mouse1) beep)
FvwmButtons AButtons

and it comes up fine [40x40 you sure do like your clock small], that is
not including anything you commited on the 16th.  Is it possible that
some of the colorset stuff you are doing is giving this?

Brad

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 17 Aug 1999 14:58:05 +0200

> some of the colorset stuff you are doing is giving this?

No, I'm getting this error for over a year now.

Bye

Dominik ^_^

---

From: Brad Giaccio <[email-masked]>
Date: Wed, 18 Aug 1999 06:47:04 -0400

> > > > >        0x300000a (has no name): ()  46x53+0+0  +347+808

I just noticed that in FvwmIconMan we catch these X errors right after we do the XOpenDisplay we can but 
XSetErrorHandler (handle_error);    

where handle_error is 
static int handle_error (Display *d, XErrorEvent *ev)
{
  ConsoleMessage ("X Error:\n");
  ConsoleMessage ("         error code: %d\n", ev->error_code);
  ConsoleMessage ("         request code: %d\n", ev->request_code);
  ConsoleMessage ("         minor code: %d\n", ev->minor_code);
  ConsoleMessage ("Leaving a core dump now\n");
  abort();
  return 0;
}

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 19 Aug 1999 04:09:20 +0200

>   ConsoleMessage ("Leaving a core dump now\n");

I like the idea of forcing a coredump. All modules should do it this
way. It's a big help for debugging.

Bye

Dominik ^_^

---

From: [email-masked] (Paul D. Smith)
Date: 19 Aug 1999 12:30:05 -0400

%% Dominik Vogt <[email-masked]> writes:

  dv> I like the idea of forcing a coredump. All modules should do it this
  dv> way. It's a big help for debugging.

The coredump should be optional, perhaps enabled only during debugging
or something.  Quite often a module can ignore and recover from an X
error (I get this on restart, but there's no other affect to me system
that I can determine) so I think forcing it to dump core is not a good
idea for user versions.

Also, I agree all modules should install the same handler.  When the
mythical InitModule() function is written and put into libfvwm.a, it
could do that (then the module can replace the function after
InitModule(), if it wants to).

---

From: Tim Phipps <[email-masked]>
Date: Thu, 19 Aug 1999 17:44:07 +0100

> InitModule(), if it wants to).

Some modules silently ignore some errors for very good reasons
(FvwmScroll ignores BadWindow on Reparent) so having a common handler
would require all modules to ignore those errors. We might end up
ignoring too much.
Cheers,
Tim.
--
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: [email-masked] (Paul D. Smith)
Date: 19 Aug 1999 13:40:26 -0400

>> InitModule(), if it wants to).

  tp> Some modules silently ignore some errors for very good reasons
  tp> (FvwmScroll ignores BadWindow on Reparent) so having a common handler
  tp> would require all modules to ignore those errors. We might end up
  tp> ignoring too much.

That's why I said that the module can replace the function... do I not
understand what's going on?  I know next to nothing about X error
handling.

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 19 Aug 1999 23:03:11 +0200

> that I can determine) so I think forcing it to dump core is not a good

No, I meant to force a coredump only when we would exit anyway. I have
written a function that does it (libs/XError.c (PrintXErrorAndCoredump()))
and put it in all modules that were using a private X error handler.

Bye

Dominik ^_^

---

From: Steve Robbins <[email-masked]>
Date: Fri, 20 Aug 1999 00:44:33 -0400 (EDT)

On 19 Aug 1999, Paul D. Smith wrote:

> mythical InitModule() function is written [...]

What else would the mythical InitModule do?  

Parse cmdline arguments?  How about "ParseModuleArgs"?  It's been sitting
in libfvwm for a few months now.  Has anyone used it?