Performer Notice: Caught SIGCHLD. Exiting due to death of child with pid 1680.

New Message Reply Date view Thread view Subject view Author view

Jon Christensen (jmc++at++UCSD.EDU)
Fri, 27 Sep 1996 10:54:39 -0700


Hi Tawfek,

This looks like a bug that we and a few others have also
encountered -- it appears that pfuGLXWinopen() is broken under
Performer 2.0.2 and IRIS GL.

In our case, we worked around this by taking the plunge and porting
to OpenGL. The other options would appear to be using (1)
Performer 2.0 and waiting for a fix (2.2?), or (2) avoiding this
input model (e.g., do what 'perfly' does by default, not what it
does when invoked as 'perfly -x').

Good luck,
Jon Christensen

>>>> Tawfek Mukhtar writes:

tm> I am trying to write a very short program that is composed of two objects.
tm> One of it will orbit the other object.
tm> Initially the view will be at x = 0, y = -10 z =0 and h = 0,p=0,r=0.
tm> I would like to implement the capability of changing the view such that if I
tm> press a key than I will be able to see the static object from the perspective
tm> of the orbiting object.
tm> Anyway the program compile fine but every time I tried to change the view I
tm> got
tm> "Performer Notice: Caught SIGCHLD. Exiting due to death of child with pid
tm> 1680."
tm> I have included the program with this mail. Can anyone help me with this ?

tm> Thanks

tm> --PART-BOUNDARY=.19603171516.ZM1695.rndtm.com.my
tm> X-Zm-Content-Name: movingcam2.c
tm> Content-Description: Text
tm> Content-Type: text/plain ; name="movingcam2.c" ; charset=us-ascii

tm> #include <X11/Xlib.h>

tm> #include <math.h>
tm> #include <Performer/pf.h>

tm> #include "pfsgi.h"
tm> #include "pfutil.h"

tm> static void openPipeline(pfPipe * pipe);
tm> static void processInput(void);
tm> static void drawFrame(pfChannel * chan, void * data);
tm> void changeView(void);

tm> typedef struct
tm> {
tm> pfCoord currentView;
tm> pfCoord orbitingView;
tm> int dynamicView;
tm> } SharedData;

tm> SharedData * shared;

tm> pfuEvent events;
tm> int quit = 0;
tm> float header = 0.0f;
tm> float orbitRadius = 8.0f;
tm> static int dynamicView = 0;
tm> pfSCS * objectPosInOrbit;
tm> pfDCS * orbitRot;

tm> int main(void)
tm> {
tm> pfScene * scene;
tm> pfNode * object;
tm> pfNode * rotatingObject;
tm> pfMatrix matrix;
tm> pfCoord initView;
    
tm> pfPipe * pipe;
     
tm> pfChannel * channel;
tm> float time;
tm> float maxTime;
tm> void * arena;
     
     
tm> pfInit();
tm> arena = pfGetSharedArena();
tm> shared = (SharedData *)pfMalloc(sizeof(SharedData), arena);
tm> pfConfig();
tm> pfuInitUtil();
     
      
tm> pipe = pfGetPipe(0);
tm> channel = pfNewChan(pipe);
tm> pfChanDrawFunc(channel, drawFrame);
tm> pfuInitInput(pipe, PFUINPUT_X);
     
tm> pfInitPipe(pipe, openPipeline);
     
tm> object = LoadFile("tree.flt", NULL);
tm> /*
tm> * so tree will be at the center of the scene
tm> */
tm> scene = pfNewScene();
tm> pfAddChild(scene, object);
     
tm> /*
tm> * we are going to make an object that will orbit the tree
tm> */
tm> rotatingObject = LoadFile("box.flt", NULL);
tm> pfMakeTransMat(matrix, orbitRadius, 0.0f, 0.0f);
tm> objectPosInOrbit = pfNewSCS(matrix);
tm> pfAddChild(objectPosInOrbit, rotatingObject);
tm> orbitRot = pfNewDCS();
tm> pfAddChild(orbitRot, objectPosInOrbit);
tm> pfAddChild(scene, orbitRot);
tm> pfSetVec3(initView.xyz,0.0f, -10.0f, 0.0f);
tm> pfSetVec3(initView.hpr, 0.0f, 0.0f, 0.0f);
tm> pfCopyVec3(shared->currentView.xyz, initView.xyz);
tm> pfCopyVec3(shared->currentView.hpr, initView.hpr);
tm> pfChanFOV(channel, 60.0f, 60.0f);
tm> pfChanScene(channel, scene);
tm> pfInitClock(0.0f);
     
tm> while (!quit)
tm> {
tm> pfSync();
tm> time = pfGetTime();
tm> header = 10.0f*time;
tm> pfDCSRot(orbitRot, header, 0.0f, 0.0f);
tm> pfChanView(channel, shared->currentView.xyz, shared->currentView.hpr);
tm> pfFrame();
tm> pfuGetEvents(&events);
tm> processInput();
tm> }

tm> pfuExitInput();
tm> pfuExitUtil();
tm> pfExit();
tm> exit(0);
     
tm> }

tm> static void openPipeline(pfPipe * pipe)

tm> {
tm> pfuGLXWindow * win;
tm> Display * XDpy;
tm> void * arena;
     
tm> XDpy = (Display *)pfuOpenXDisplay(0);
tm> win = pfuGLXWinopen((pfuXDisplay*)XDpy, pipe, "Rotatable view", 100, 500, 100, 500);
tm> pfInitGLXGfx(pipe, (void*)XDpy, win->xWin, win->glWin, win->overWin, PFGLX_AUTO_RESIZE);
    
tm> }

tm> static void processInput(void)

tm> {
     
tm> long i, j, key, count;
tm> long dev, val, numDevs;
tm> pfuEvent * pfevents;
     
tm> pfevents = &(events);
     
tm> /*get the number of devices that produce events*/
     
tm> numDevs = pfevents->numDevs;
     
tm> /*process events for each device*/
tm> for (j = 0; j < numDevs; j++)
tm> {
tm> /*process the current device */
tm> dev = pfevents->devQ[j];
tm> /* check if device (dev) is not processed yet */
tm> if (pfevents->devCount[dev] > 0) /* greater 0 means not processed */
tm> {
tm> switch(dev) /*what device is this*/
tm> {
tm> case PFUDEV_KEYBD: /*we got keyboard here*/
tm> /*a number of key have been pressed*/
tm> for ( i = 0; i < pfevents->numKeys; i++)
tm> {
tm> key = pfevents->keyQ[i];/*get the first key*/
tm> if (count = pfevents->keyCount[key])
tm> {
tm> if (count > 1)
tm> count = PF_MAX2((int)(count*(pfGetFrameRate()/60.0f)), 1);
tm> switch(key){
tm> case 27 : quit = 1;
tm> break;
tm> case 'c': shared->dynamicView = 1;
tm> fprintf(stdout, "ON\n");
tm> /*pfGetNodeBSphere(orbitRot, &boxBSphere, PFN_BMODE_DYNAMIC);
tm> fprintf(stdout, "centerX = %f\n", boxBSphere.center[0]);
tm> fprintf(stdout, "centerY = %f\n", boxBSphere.center[1]);
tm> fprintf(stdout, "centerZ = %f\n", boxBSphere.center[2]);
tm> fprintf(stdout, "radius = %f\n", boxBSphere.radius);*/
tm> break;
tm> case 'C': shared->dynamicView = 0;
tm> fprintf(stdout, "OFF\n");
tm> break;
tm> case 'R': pfSetVec3(shared->currentView.xyz, 0.0f, -10.0f, 0.0f);
tm> pfSetVec3(shared->currentView.hpr, 0.0f, 0.0f, 0.0f);
tm> break;
tm> default : break;
tm> }
tm> }
tm> }
pfevents-> devCount[dev] = 0;
tm> break;
tm> default : pfevents->devCount[dev] = 0;
tm> break;/* we don't care this device, chuck off*/
                 
tm> }
             
tm> }
          
tm> }
     
pfevents-> numDevs = 0;
     
tm> }

tm> static void drawFrame(pfChannel * chan, void * data)

tm> {
tm> /*do something like setting the view point here by calling the function*/
     
tm> pfClearChan(chan);
     
tm> if (shared->dynamicView)
tm> changeView();
tm> pfDraw();
tm> }

tm> void changeView(void)

tm> {
tm> pfSphere boxBSphere;
tm> pfGetNodeBSphere(orbitRot, &boxBSphere, PFN_BMODE_DYNAMIC);
tm> fprintf(stdout, "centerX = %f\n", boxBSphere.center[0]);
tm> fprintf(stdout, "centerY = %f\n", boxBSphere.center[1]);
tm> fprintf(stdout, "centerZ = %f\n", boxBSphere.center[2]);
tm> fprintf(stdout, "radius = %f\n", boxBSphere.radius);
tm> pfSetVec3(shared->orbitingView.xyz, boxBSphere.center[0], boxBSphere.center[1], boxBSphere.center[2]);
tm> pfSetVec3(shared->orbitingView.hpr, 90.0f + header, 0.0f, 0.0f);
tm> pfCopyVec3(shared->currentView.xyz, shared->orbitingView.xyz);
tm> pfCopyVec3(shared->currentView.hpr, shared->orbitingView.hpr);
tm> }

tm> --PART-BOUNDARY=.19603171516.ZM1695.rndtm.com.my--

tm> =======================================================================
tm> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
tm> Submissions: info-performer++at++sgi.com
tm> Admin. requests: info-performer-request++at++sgi.com
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


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:53:39 PDT

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