From: Daniel Williams (dwilli++at++comcast.net)
Date: 03/10/2003 08:11:51
There is a problem deleting pfObjects in Performer 3.0 for Windows; it
doesn't occur under Linux.
Apparently, deleted pfObjects are kept on a free list for subsequent
allocation; when the free list grows past 256 items Performer tries to
realloc it. This is causing an access violation.
Here's how to make it happen:
Start with $(PFROOT)\Src\pguide\libpf\C++\simple.cxx and apply
this patch:
--- oldsimple.cxx Mon Mar 10 10:47:09 2003
+++ simple.cxx Mon Mar 10 10:47:09 2003
++at++++at++ -55,0 +56 ++at++++at++
+#include <Performer/pr/pfMaterial.h>
++at++++at++ -101,0 +103,7 ++at++++at++
+ pfMaterial* array[257];
+ int i;
+ for (i = 0; i < sizeof(array)/sizeof(array[0]); ++i)
+ array[i] = new pfMaterial;
+ for (i = 0; i < sizeof(array)/sizeof(array[0]); ++i)
+ array[i]->checkDelete();
When run it will cause an access violation here:
pfMemory::realloc(unsigned int 4096) line 510
pfMemory::realloc(void * 0x003bf458, unsigned int 4096) line 632
_pfDelId(int 2304, pfType * 0x003bc5d8) line 686
pfMaterial::~pfMaterial() line 51
pfMaterial::`scalar deleting destructor'(unsigned int 1)
pfObject::destroy() line 291
pfMemory::checkDelete() line 926
main(int 2, char * * 0x003b3dd0) line 108
SIMPLE! mainCRTStartup
KERNEL32! 77e97d08()
Obviously this is a contrived example, but the bug makes my paging
application unusable under Windows.
Can somebody replicate this on his/her machine so I know that
it's not my installation? Or confirm from SGI that it's a
Performer bug?
Thanks,
Daniel Williams
Independent Consultant for hire
http://danielwilliams.org
This archive was generated by hypermail 2b29 : Mon Mar 10 2003 - 08:12:45 PST