pfCycleBuffers

New Message Reply Date view Thread view Subject view Author view

Scott McMillan (scott++at++ht.com)
Thu, 10 Oct 1996 18:13:01 -0400 (EDT)


Somebody please tell me where I am going wrong....

My pass-through data (for frame accurate data passing from APP to DRAW) is
getting rather large and from what I understand it actually copies data from
one process to the next. I would like to replace this with pfCycleBuffers,
but so far I have had no success. I have read the examples in the man pages
and I assume I want to follow the libpf example (like in morph.C). Here's
what I am doing:

Global variable:

      pfCycleBuffer *G_cbuf;

In APP, after pfConfig, pfMultiprocess, and pfInit and before the main loop:

      G_cbuf = new(pfGetSharedArena()) pfCycleBuffer(sizeof(myDataStruct));
      myDataStruct *curr_data = (myDataStruct *) G_cycle_buffer->getCurData();

      // initialize curr_data here

      G_cbuf->init(G_cycle_buffer->getData());

In APP, during main sim loop, just before pfFrame:

      curr_data = (myDataStruct *) G_cycle_buffer->getCurData();
      // update data here
      G_cycle_buffer->changed();

In DRAW callback:

      myDataStruct *draw_data (myDataStruct *) G_cycle_buffer->getCurData();
      // do something with the data here

When I run this, I get the following message and a core dump (bus error):

PF Notice: Caught SIGCHLD. Exiting due to death of child with pid 4103.

And dbx reports the following:

PC value from core file (0x40d7f0) is not part of the program.
Assuming return register value (0x40d7f0) usable to locate PC.
Core from signal SIGBUS: Bus error
(dbx) where
> 0 drawChannel(pfChannel*,void*)(0x1807b0d0, 0x0, 0x0, 0x3f800000) ["pfchannels.C":229, 0x40d7f0]
   1 pfChannel::pf_callDrawFunc(void)(0x181a62e0, 0x0, 0x0, 0x3f800000) ["../../../lib/libpf/pfChannel.C":1996, 0x5b33e04c]
   2 doDraw(pfChannel*,pfPipe*,int*)(0x181a62e0, 0x1807fdf0, 0x7fff28d4, 0x3f800000) ["../../../lib/libpf/pfProcess.C":4493, 0x5b379018]
   3 mpDraw(void)(0x0, 0x0, 0x0, 0x3f800000) ["../../../lib/libpf/pfProcess.C":4924, 0x5b37a16c]
   4 pfConfig(0x0, 0x1807ad00, 0x0, 0x3f800000) ["../../../lib/libpf/pfProcess.C":1765, 0x5b37264c]
   5 ::initializePerformer(void)(0x0, 0x0, 0x0, 0x3f800000) ["pfchannels.C":99, 0x40cecc]
   6 main(0x7fff2e98, 0x7fff2f04, 0x0, 0x3f800000) ["main.C":87, 0x409ae0]
   7 __istart() ["crt1tinit.s":13, 0x409740]

Line 229 in drawChannel() is the first line in the DRAW callback snippet above.

Also note: I have a 2 processor IR, I am using PFMP_APPCULL_DRAW,
           and G_cbuf->getConfig() returns 4. (????)

As always, any help is greatly appreciated,
scott

-- 
  Scott McMillan  |       HT Medical, Inc.      | Developing virtual environ-
   scott++at++ht.com   |      http://www.ht.com      | ment medical and surgical
 Ph: 301-984-3706 | 6001 Montrose Rd., Ste. 902 | simulations and surgery
Fax: 301-984-2104 |     Rockville, MD 20852     | simulation creation tools.

======================================================================= 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:45 PDT

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