Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I just changed linux distributions and I'm trying to get my Perl/Tk application to work. my old distro used perl 5.6.1 and the new one uses 5.8.0. Anyways, when running the application, I get these error messages after entering the program's MainLoop:

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

Anyone know what might cause errors like this to occur? I say "like this" because when I take out all references to the pixmap, i get another error which looks like the first but instead of complaining about pixmaps, it complains about GC.

The application is Lily: Yet Another New Mail Notification Utility

The error only happens when there is new mail.

Replies are listed 'Best First'.
Re: I am seeking some Tk help
by converter (Priest) on May 17, 2003 at 12:30 UTC

    You're calling exit in child processes, which is actually calling Tk::exit. Tk::exit takes your Tk application down gracefully, and that's what it's trying to do when you call it. Explicitly calling CORE::exit or POSIX::_exit instead of exit in child processes should fix the problem.

    The only time those exit calls will be reached is when your exec calls fail. You should probably replace those exit calls with error handling code so you can find out what's failing and why.

      Thanks converter!

      This indeed was the problem. I can't thank you enought :) ++!

Re: I am seeking some Tk help
by itodd (Acolyte) on May 16, 2003 at 21:18 UTC
    Grr, FYI, I posted this, I just forgot to log in before doing so.