From: Yair Kurzion (yair++at++polygon.engr.sgi.com)
Date: 12/01/2003 14:02:35
Bram,
Try pfDelete instead of delete.
-yair
>
> This is a multi-part message in MIME format.
>
> --Multipart_Thu__27_Nov_2003_14:26:04_+0100_09396050
> Content-Type: text/plain; charset=US-ASCII
> Content-Transfer-Encoding: 7bit
>
> Hello,
>
>
> If I create and delete a pfNode, without an intermediate pfFrame call,
> I get crashes.
> On 3.0.1 dual x86 linux it crashes with segm violation,
> on 3.0.2 mips irix onyx/4 it gives a:
> PF Warning/Usage: pfMemory::copy() - NULL source
> PF Fatal/Resource(2): pfStruct::new() Unable to allocate 134217728 byte
>
> Please see the attached minimal program that makes performer crash.
>
> Bram
>
> ------------------------------------------------------------------------------
> Bram Stolk, VR Specialist.
> SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP AMSTERDAM
> email: bram++at++nospam.sara.nl Phone +31-20-5923059 Fax +31-20-6683167
>
> "For the costs of subsidized agriculture in the EU, we can have all 56 million
> European cows fly around the world. First Class." - J. Norberg
> ------------------------------------------------------------------------------
>
> --Multipart_Thu__27_Nov_2003_14:26:04_+0100_09396050
> Content-Type: text/x-c++src;
> name="perfmem.cxx"
> Content-Disposition: attachment;
> filename="perfmem.cxx"
> Content-Transfer-Encoding: 7bit
>
> //
> // perfmem.cxx
> // build with: c++ -o perfmem perfmem.cxx -lpfdu -lpfutil -lpf
> //
> // Illustrates a performer bug: segm violation when creating
> // and deleting a pfNode immediately, without a intermediate pfFrame call.
> //
> // Program received signal SIGSEGV, Segmentation fault.
> // [Switching to Thread 16384 (LWP 21791)]
> // 0x403464f2 in pfBuffer::pf_prepareNewUpdatables(int) ()
> // from /usr/lib/libpf.so.3
> //
>
> #include <Performer/pfdu.h>
> #include <Performer/pf/pfPipeWindow.h>
> #include <Performer/pf/pfScene.h>
> #include <Performer/pf/pfLightSource.h>
> #include <Performer/pf/pfChannel.h>
> #include <Performer/pf/pfPipe.h>
> #include <Performer/pf/pfGroup.h>
>
> int main()
> {
> pfInit();
> pfdInitConverter(".pfb");
> pfConfig();
>
> pfPipe *pipe = pfGetPipe(0);
> pfPipeWindow *win = new pfPipeWindow(pipe);
> win->setName("test");
> win->setSize(400,400);
> win->open();
>
> pfScene *scene = new pfScene();
> scene->addChild(pfdLoadFile("/usr/share/Performer/data/rocket_tux.pfb"));
> pfLightSource *ls = new pfLightSource();
> scene->addChild(ls);
>
> pfChannel *chan = new pfChannel(pipe);
> chan->setScene(scene);
> chan->setViewport(0,1,0,1);
>
> pfSphere sphere;
> scene->getBound(&sphere);
>
> pfMatrix viewmat;
> viewmat.makeIdent();
> viewmat.setRow(3,pfVec3(0, -3*sphere.radius, 0));
> chan->setViewMat(viewmat);
>
> pfFrame();
>
> pfGroup *group = new pfGroup();
>
> #if 1
> // Next line causes segm violation
> delete group;
> #endif
>
> pfFrame();
>
> for (int i=0; i<100; i++)
> {
> pfFrame();
> }
> }
>
>
> --Multipart_Thu__27_Nov_2003_14:26:04_+0100_09396050--
>
> -----------------------------------------------------------------------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> -----------------------------------------------------------------------
> I/ITSEC 2003 Friends of Performer Meeting:
> Wednesday December 03, 6:30-8:30pm, Peabody Hotel, Florida I Ballroom
> -----------------------------------------------------------------------
>
--
\_________ \_____ \__ \__ \_____
\_________ \_____ \__ \__ \_____ Yair Kurzion
\__ \__ \____\__ \__ yair++at++sgi.com
\__ \__ \__ (650) 933-6502
\__ \__ \__
\__ \__ \__
This archive was generated by hypermail 2b29 : Mon Dec 01 2003 - 14:02:46 PST