Problems sproc-ing a pf process...

New Message Reply Date view Thread view Subject view Author view

Robert Kuehne (kuehne++at++deneb.com)
Tue, 09 Apr 1996 12:11:50 -0400


I'm having difficulties attempting to repeatedly launch Performer on a sproc.
My basic goal is this:

  o have the parent application have the ability to launch/destroy
    a performer process at will. Only one pf process will be active
    at any given time.

The problem I'm running into is that although the first sproc works great,
subsequent sprocs do not, complaining that:

PF Warning/Usage(2): pfInit() Already initialized. Must call pfExit()
before reinitialization.
PF Warning/Usage: pfMultiprocess() Must call before pfConfig.
PF Warning/Usage: pfConfig() Cannot config more than once.

and later, when attempting to launch a window:

X Error of failed request: BadAccess

I have attached a small (1k) chunk of sample code which illustrates this
problem.

If anyone has any clues/ideas, I would be very appreciative of any help...
Thanks!

Bob

-- 
Robert P. Kuehne |                                                 |    _ o
kuehne++at++deneb.com |      There was coffee. Life would go on.        |  _ \<,_
Ph: 810.377.6900 |     - William Gibson, The Winter Market -       | (_)/ (_)

/* Compile with: /usr/bin/CC -o go main.c++ -nostdlib -L/lib -L/usr/lib \ -L/usr/lib/Performer/Debug -lpf_ogl -lpfdu_ogl -lpfui \ -lpfutil_ogl -lmpc -limage -lGLw -lGLU -lGL -lXext -lfpe \ -lXmu -lX11 -lm -lmalloc -lC

*/

#include <iostream.h>

#include <Performer/pf.h> #include <Performer/pf/pfChannel.h> #include <Performer/pf/pfPipe.h> #include <Performer/pf/pfPipeWindow.h>

#include <ulocks.h>

void pfdemo( void * ) { cerr << "- beginning pf process" << endl;

pfNotifyLevel( 7 ); pfInit(); pfMultiprocess( PFMP_DEFAULT ); pfConfig(); pfPipe *pipe = pfGetPipe(0); pfPipeWindow *pw = new pfPipeWindow( pipe ); pw->setName("Test"); pw->setWinType(PFWIN_TYPE_X); pw->setMode( PFWIN_NOBORDER, PF_ON ); pw->setOriginSize(0, 0, 100, 60); pw->open();

for ( int ii=0; ii<5; ii++ ) { pfSync(); pfFrame(); }

pw->close(); cerr << "- ending pf process" << endl;

pfExit(); }

void main() { _uerror = _utrace = 1; for ( int ii=0; ii<3; ii++ ) { cerr << "o--" << endl; cerr << "Process #: " << sproc ( pfdemo, PR_SALL, (void*)NULL ) << endl;

sleep( 1 );

cerr << "--o" << endl; } }


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:41 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.