Robert Webb (robertw++at++wormald.COM.AU)
Thu, 11 May 1995 12:48:32 +1000 (EST)
Every now and then my code core dumps, with a trace something like this (and
no I'm not just asking you to find the bug for me!):
0 pfGetGSetBBox(gset = 0x186e9020, box = (nil)) ...
1 pfGSetIsectMask(gset = 0x186e9020, mask = 0, setMode = 48, bitOp = 1) ...
2 pfGeode::setTravMask(long,unsigned long,long,long)(this = 0x186e8dc0,
which = 0, mask = 0, setMode = 48, bitOp = 1) ...
3 pfGroup::setTravMask(long,unsigned long,long,long)(this = 0x186e9870,
which = 0, mask = 0, setMode = 48, bitOp = 1) ...
4 pfNodeTravMask(_node = 0x186e9870, which = 0, mask = 0, setMode = 48,
bitOp = 1) ...
> 5 MyFunc(0x435d4c, 0x18c6f750, 0x7053e0, 0x2, 0x1000df74) ...
6 ...
The call I have to pfNodeTravMask looks like this:
pfNodeTravMask(node, PFTRAV_ISECT, 0x0, PFTRAV_SELF|PFTRAV_DESCEND, PF_SET );
That is, I am trying to turn off all intersection traversal for this node
and below. However I can't see why this call should lead Performer to
internally call pfGetGSetBBox()? And I especially can't see why Performer
would pass it an argument of "box = (nil)", since this is what I believe to
be causing the core dump. From the man page:
void pfGetGSetBBox(pfGeoSet *gset, pfBox *box);
...
pfGetGSetBBox copies the current bounding box into bbox.
(I assume 'bbox' refers to the argument just called 'box' - a man-page bug)
So from this it seems to make sense that it may core dump if not passed any
memory to fill in.
I am calling pfNodeTravMask() before any sensible data has been put in the
the GeoSets below it, but I don't see why that should matter for this call.
I will rearrange my code, but would still like to know why calling
pfNodeTravMask() leads to a call to pfGetGSetBBox(.., NULL).
Also, when I call pfNodeTravMask() with PFTRAV_SELF|PFTRAV_DESCEND, how is
this different from just using PFTRAV_SELF? I believe that when the
intersection traversal comes across a node with a mask of 0x0, the node and
all it's children are skipped immediately, so why does it matter whether the
children's masks are also 0x0 or not (ie why use PFTRAV_DESCEND)?
Thanks,
Rob.
------------------------------------------------------------------------------
Robert Webb. robertw++at++wormald.com.au
------------------------------------------------------------------------------
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:29 PDT