possible bug in intersection with PFTRAV_IS_PATH

New Message Reply Date view Thread view Subject view Author view

Swaminathan N. (swami++at++evl.uic.edu)
Mon, 14 Jul 1997 17:30:47 -0500 (CDT)


Hullo, I think that I may have discovered a possible bug while intersecting
deeply nested grouping nodes. For instance, adding the following code
to intersect.C results in a core dump with the following partial stack trace.
I can't do a pfFlatten, since I need to preserve the scene graph hierarchy.
Can anyone suggest work arounds?

Thanks
Swami

-- intersect.C --

    // Create group node to hold SCS's; attach it to scene
    pfGroup *root = new pfGroup();
    pfGroup *saveroot = root;
    scene->addChild(root);
    
    pfGroup *group = new pfGroup(), *tmpgrp;
    root->addChild(group);
    // create a chain of 30 pfGroups
    for (loop=0; loop < 30; loop++)
    {
      tmpgrp = new pfGroup;
      group->addChild(tmpgrp);
      group = tmpgrp;
    }
    root = group;

    // Create 10 SCS nodes, spaced equally apart. Make each one
    // a child of 'root', and make 'geode' a child of each SCS
    pfGeode *geode = new pfGeode();
    for (loop=0; loop < 10; loop++)
    {
        mat.makeTrans(0.0f, (float) loop * 10.0f + 10.0f, 0.0f);
        scs[loop] = new pfSCS(mat);
        scs[loop]->addChild(geode);
        root->addChild(scs[loop]);

        // set up SCS's (and their children) for intersections
        scs[loop]->setTravMask(PFTRAV_ISECT, 1, PFTRAV_SELF,
                               PF_SET);
    }
    root = saveroot;

    // further down
    segset.mode = PFTRAV_IS_PRIM|PFTRAV_IS_NORM|PFTRAV_IS_CULL_BACK|PFTRAV_IS_PATH;

-- stack trace --

(dbx) where
> 0 _lfree(0x0, 0x18040000, 0x1, 0x180ee310) ["amalloc.c":799, 0xfa9f788]
   1 _afree(0x180eab40, 0x18040000, 0x1, 0x180ee310) ["amalloc.c":89, 0xfa9f4a8]
   2 pfMemory::operator delete(void*)(0x180eab40, 0x180eab30, 0x1, 0x180ee310) ["../../../lib/libpr/pfMemory.C":193, 0x5ea365b0]
   3 pfMemory::~pfMemory(void)(0x180eab40, 0x180eab30, 0x1, 0x180ee310) ["../../../lib/libpr/pfMemory.C":210, 0x5ea36684]
   4 pfMemory::realloc(unsigned int)(0x180eab40, 0x100, 0x180ee280, 0x180ee310) ["../../../lib/libpr/pfMemory.C":357, 0x5ea37028]
   5 pfMemory::realloc(void*,unsigned int)(0x180eab40, 0x100, 0x1, 0x180ee310) ["../../../lib/libpr/pfMemory.C":469, 0x5ea375e0]
   6 pfList::setNum(int)(0x180eab00, 0x22, 0x1, 0x180ee310) ["../../../lib/libpr/pfList.C":297, 0x5ea32ebc]
   7 pfGeode::pf_discFunc(pfHit*)(0x180eab40, 0x180eab30, 0x1, 0x180ebc80) ["../../../lib/libpf/pfGeode.C":792, 0x5e975020]
   8 pfGeoSet::_pitIsectTri(_prIsectTrav*,pfVec3&,pfVec3&,pfVec3&)(0x7ffb0bd0, 0x180e211c, 0x180e2140, 0x180e214c) ["../../../lib/libpr/pfGeoSet.C":2600, 0x5ea14da8]
   9 pfGeoSet::pr_isect(_prIsectTrav*)(0x180e2290, 0x7ffb0bd0, 0x1, 0x0) ["../../../lib/libpr/pfGeoSet.C":2999, 0x5ea14378]
   10 pfGeoSet::isect(pfSegSet*,pfHit***)(0x180e2290, 0x7ffb4440, 0x7ffb112c, 0x180ee310) ["../../../lib/libpr/pfGeoSet.C":1894, 0x5ea12074]
   11 pfGeode::nb_intersect(_pfIsector*)(0x180979b0, 0x7fff2190, 0x1, 0x1) ["../../../lib/libpf/pfGeode.C":484, 0x5e973f60]
   12 pfSCS::nb_intersect(_pfIsector*)(0x180e14b0, 0x7fff2190, 0x1, 0x180ee310) ["../../../lib/libpf/pfSCS.C":423, 0x5e9a66b0]

 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
v Swaminathan Narayanan ^
v swami++at++evl.uic.edu ^
v Office: 996-3002 ^
v Home: 850-2726 ^
v http://www.evl.uic.edu/swami ^
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

=======================================================================
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:55:36 PDT

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