Jean BENOIT (101372.3460++at++CompuServe.COM)
05 Sep 96 09:00:53 EDT
I invoke multiprocessing in the source file 'perfly.c' as follows:
Here is the shared memory structure which contains pointers to the shared memory parts
I want to use in my DBASE func :
<< typedef struct
<< {
<< Part_Of_Sea *Sea;
<< List_Str_Gest_Geode *Tete_List; // Tete_List = Chained List of structure Struct_Gestion_Geode
<< pfNode *root; // root = root node of my scene's tree
<< } Struct_DBase;
<<
<< Struct_DBase *Shared;
Before calling pfConfig, I do :
<< Shared = (Struct_DBase*)pfMalloc(sizeof(Struct_DBase), pfGetSharedArena());
<< pfMultiprocess(PFMP_APP_CULL_DRAW|PFMP_FORK_DBASE);
Just After pfConfig, I do:
<< pfDBaseFunc(Create_Sea_DBASE);
... where Create_Sea_DBASE is my callback DBASE func.
... So Create_Sea_DBASE will be invoked by next pfFrame.
Next, I Load my scenegraph's file to the root as follows:
<< Shared->root = pfdLoadFile(MyFile);
Here is the implementation of this callback func:
<<1 void Create_Sea_DBASE(void *data)
<<2 {
<<3 List_Str_Gest_Geode *p, *q;
<<4 Struct_Gestion_Geode *sg;
<<5
<<6 if (Shared->Tete_List==NULL) return;
<<7 printf("Shared->root = %p root = %p\n", Shared->root);
<<8 printf("nb Children = %d\n", pfGetNumChildren(Shared->root));
<<9 p = Shared->Tete_List;
<<10 while (p!=NULL)
<<11 {
<<12 printf("Switch %p\n", (p->Str_Gest_Geode)->Switch);
<<13 if (p->Is_Visible==YES)
<<14 {
<<15 sg = p->Str_Gest_Geode;
<<16 ActionGeode(sg);
<<17 }
<<18 p = p->next;
<<19 }
<<20 p = Shared->Tete_List;
<<21 while (p!=NULL)
<<22 {
<<23 if (p->Is_Visible==YES)
<<24 {
<<25 sg = p->Str_Gest_Geode;
<<26 printf("SwitchVal = %d\n", pfGetSwitchVal(sg->Switch));
<<27 pfSwitchVal(sg->Switch, !pfGetSwitchVal(sg->Switch));
<<28 p->Is_Visible = NO;
<<29 }
<<30 p = p->next;
<<31 }
<<32 pfDBase();
<<33}
After I have launched perfly, Performer stops the execution at line 8 and tells me:
<< PF Notice: Caught SIGCHLD. Exiting due to death of child with pid 8318.
So I haved erased the line 8 and relaunched perfly and Performer stops the execution at line 26 and tells me:
<< PF Notice: Caught SIGCHLD. Exiting due to death of child with pid 8335.
In consequence there are problems in calling pfGetNumChildren(..) and pfGetSwitchVal(..)
in a separate process.
Moreover, I am sure that it is not a problem in building my scenegraph and in my chained Lists' structures
because all this architecture runs correctly in monoprocessing.
So my question is:
Is there a lake of configuration ?
or what can I do to solve this problem which completely blocks me ?
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:30 PDT