From: Ken Lindsay (kl++at++stokes.arc.nasa.gov)
Date: 02/18/2000 17:22:13
hi,
i made a c++ class which includes a pfNode* for a model, nothing
particularly unusual s'far as i can tell. when i load the model
file and assign the top of it to the pfNode* in the class object,
performer crashes like this:
dbx version 7.2.1.3m Dec 23 1998 01:09:37
PC value from core file (0x3ef2d8f8) is not part of the program.
Assuming return register value (0x3ef2d8f8) usable to locate PC.
Core from signal SIGBUS: Bus error
(dbx) where
> 0 pfBuffer::pf_prepareNewUpdatables(int)(0x64036f60, 0x0, 0x77, 0x1, 0x640012c8, 0x20000, 0x3f6c760c, 0x8) ["/xlv61/performer/work/perf/lib/libpf/pfBuffer.C":750, 0x3ef2d8f8]
1 ::pfSync(0x5fbe2a50, 0x64001370, 0x77, 0x1, 0x640012c8, 0x20000, 0x3f6c760c, 0x8) ["/xlv61/performer/work/perf/lib/libpf/pfProcess.C":3480, 0x3effbdb0]
2 ::main(0x2, 0x7fff2f04, 0x0, 0x0, 0x0, 0x20000, 0x3f6c760c, 0x8) ["/hosts/shannon/u/people/kl/sim/gfx/code/SimpleLoader/simpleLoader.cpp":165, 0x100052c0]
3 __start() ["/xlv55/kudzu-apr12/work/irix/lib/libc/libc_n32_M3/csu/crt1text.s":177, 0x100049c8]
here's the sketch of the class:
class NelAircraft
{
public:
NelAircraft(char *name);
virtual ~NelAircraft(void);
virtual pfNode * getModel(); // top of the model hierarchy
....
private:
pfNode *aircraftModel; // location and heading matrix.
....
}
when i change the load line to the vanilla form:
pfNode *root = pfdLoadFile(argv[1]);
// Attach loaded file to a new pfScene
pfScene *scene = new pfScene;
scene->addChild(root);
it loads and runs fine. when i do it thru the class object:
aircraft = new NelAircraft(argv[1]);
pfNode *root = aircraft->getModel();
// Attach loaded file to a new pfScene
pfScene *scene = new pfScene;
scene->addChild(root);
then performer crashes with the above mentioned
pfBuffer::pf_prepareNewUpdatables unhappiness.
am i missing something basic and obvious here or
is it likely some other part of the code? when
i do a gdiff on the pfPrint(....) generated files
of the two versions of loading, the only differences
i see are in the addresses of the pfObjects. all
the structure seems identical. eg:
2337c2336
< } GeoSet: 0x64092280
--- > } GeoSet: 0x64092090 2339,2342c2338,2341 < [3:1]} pfGeode 212 0x64092bd0 < [2:0]} pfGroup 208 0x64090050 < [1:3]} pfDCS 207 0x6408fdb0 < [0:0]} pfGroup 133 0x640428b0 --- > [3:1]} pfGeode 210 0x640929e0 > [2:0]} pfGroup 206 0x6408fe60 > [1:3]} pfDCS 205 0x6408fbc0 > [0:0]} pfGroup 131 0x64042820any help would be appreciated.
ken
and the getModel function is:
pfNode *NelAircraft::getModel() // get the top of model hierarchy { return aircraftModel; }
-==-
ken "fire a few neurons" lindsay kl++at++mars.arc.nasa.gov NASA Ames Research Center Caelum Research Corp Bldg 269, Room 281 (650) 604 0461 (lab) Mail Stop 269-1 (650) 604 3594 (fax) Moffett Field, CA 94035-1000 (650) 604 3181 (vox)
When inlaws are outlawed, only outlaws will have inlaws
This archive was generated by hypermail 2b29 : Fri Feb 18 2000 - 17:22:24 PST