[Perl/Tk] background programs and Xlib errors w/ Proc::Simple

Brian Jackson <[email protected]> Sun, 11 Feb 2007 16:06:13 -0800
Newsgroups gmane.comp.lang.perl.tk
Organization Action Athletics
Message-ID <[email protected]>
Hi-

I'm in the process of porting my Perl/Tk app from Suse 8.2 and Tk 
800.024 to Suse 10.2 and Tk 804.027.

I'm currently using Proc::Simple to fire off background commands, 
scripts, and sub routines from my application.

All works fine with Tk 800.024, but it barfs with Xlib errors on Tk 
804.027 then the Proc::Simple code/routine finishes running :(

------------------------
Xlib: unexpected async reply (sequence 0x1917)!
X Error of failed request:  BadDrawable (invalid Pixmap or Window 
parameter)
  Major opcode of failed request:  53 (X_CreatePixmap)
  Resource id in failed request:  0x7c0001f
  Serial number of failed request:  6425
  Current serial number in output stream:  6401

or 

X Error of failed request:  RenderBadPicture (invalid Picture parameter)
  Major opcode of failed request:  156 (RENDER)
  Minor opcode of failed request:  7 (RenderFreePicture)
  Picture id in failed request: 0x8600234
  Serial number of failed request:  19569
  Current serial number in output stream:  19547
-------------------------

Now, I've given Proc::Background a whirl, but it doesn't quite seem to 
handle sub routines, only external scripts/commands, but I want to run 
a subroutine as a background process.  And I do not care about exit 
codes or when it finishes.  I'm packing up parameters and just wanting 
to have it abuse the CPU in the background :)

I could convert 1 or 2 of the sub routines into standalone apps/scripts 
and call them with Proc::Background, but one of them I send in a rich 
hash and I wouldn't know how to handle the rich hash coming in.

In my Perl/Tk app, a sub-routine is launched when a button is pressed, 
but during the run of the sub-routine, it does some work, then when it 
hits a certain point, it needs to fire off some processing in the 
background, and then return focus, and redraw the main screen so the 
user can continue onto the next part of the application.

Any help is greatly appreciated,
brian

BTW, this is being posted no comp.lang.perl.tk as well
-- 
Brian Jackson
Action Athletics Sports Photography
[email protected]
http://www.ActionAthletics.com/
--++**==--++**==--++**==--++**==--++**==--++**==--++**==
ptk mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/ptk