Re: [info-performer] problems loading models in performer windows

New Message Reply Date view Thread view Subject view Author view

From: Alexandre Naaman (naaman++at++laplace.engr.sgi.com)
Date: 01/21/2003 13:38:34


Hi John,

 I wrote a program to do the same:

#include <Performer/pf.h>
#include <Performer/pf/pfScene.h>
#include <Performer/pfdu.h>

int main(int argc,char *argv[])
{
        pfScene *scene = NULL;
        pfNode *node = NULL;
        int i=0;

        pfInit();
        pfConfig();

#define NUM_FILES_TO_LOAD 500

        scene = new pfScene();

        for(i=0; i<NUM_FILES_TO_LOAD; i++) {
                node = pfdLoadFile("esprit.flt");
                pfNotify(PFNFY_NOTICE,PFNFY_PRINT,"loaded file %3d: 0x%x",
                         i,node);
                if(node)
                        scene->addChild(node);
                else
                        break;
        }

        pfNotify(PFNFY_NOTICE,PFNFY_PRINT,"scene has %d children",
                 scene->getNumChildren());

        PFASSERTALWAYS(scene->getNumChildren() == NUM_FILES_TO_LOAD);

        pfExit();

        return 0;
}

and regardless of what I set NUM_FILES_TO_LOAD to, it seems to work fine.

Could you please try setting up the environment such that you're using the
debug libraries and then provide us with a stack trace? Or better yet, a
copy of the program you've written that demonstrates the problem?

Thanks,

Alex.

> Allan,
>
> I made a very simple program that repeatedly loads models with pfdLoadFile,
> and when more than 64 models are loaded, Performer crashes. So it does
> appear to be just based on the number of models loaded.
>
> John
> ----- Original Message -----
> From: "Allan Schaffer" <allan++at++sgi.com>
> To: <info-performer++at++sgi.com>
> Sent: Thursday, January 16, 2003 12:44 PM
> Subject: Re: [info-performer] problems loading models in performer windows
>
>
> > Hi John,
> >
> > John Breedlove wrote:
> > > I have a program that load a large number of models and I can't get it
> to
> > > work in performer windows unless I reduce the number of models that it
> > > loads. To get the program to run in Linux I used to increase the
> > > PFSHAREDARENASIZE environment variable and it would work fine. Is there
> a
> > > similar variable that must be increased in windows? I created an
> > > environment variable of that name but it hasn't helped.
> >
> > Interesting. I'm seeing something that could be this same problem; if I
> > load ~50 copies of esprit.pfb into perfly via the command line, e.g.:
> >
> > % perfly -W 600 esprit.pfb esprit.pfb esprit.pfb [... (47 more)]
> >
> > ..then I get a crash. Probably a string copy overflow somewhere, we'll
> > check it out. But if I run those files through "pfconv" to make just
> > one file or a few files for the command line, it is fine. e.g.:
> >
> > % pfconv esprit.pfb esprit.pfb [... 8 more] 10-esprit.pfb
> > % perfly -W 600 10-esprit.pfb
> > ..worked fine
> >
> > % pfconv 10-esprit.pfb 10-esprit.pfb [... 8 more] 100-esprit.pfb
> > % perfly -W 600 100-esprit.pfb
> > ..worked fine
> >
> > And so on. 1000 was fine also, the machine started swapping a lot so I
> > stopped there.
> >
> > So, if you think this is the same problem, run the files through
> > "pfconv" first to make just one expanded model, as a workaround. And
> > we'll check out what's going on with perfly. This will be ..SCR 878680.
> >
> > Allan
> > --
> > Allan Schaffer allan++at++sgi.com
> > Engr. Manager, Core Rendering 1-650-933-2160
> > Silicon Graphics http://www.sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Jan 21 2003 - 13:38:43 PST

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