Problem with pfTexture LoadFile when forking DBASE

New Message Reply Date view Thread view Subject view Author view

From: phowe++at++csc.com
Date: 07/10/2000 22:26:43


Hello All,

We are having some problems (i.e. bus error, seg fault) under some conditions
when we fork a DBASE process.

One lead we have had is the following warnings from Performer when running our
application, that appear
to be related to the call loadFile from pfTexture.

00:00:18.825: PF Warning: 152318 (Performer) Usage : pfMemory::free()
can't free() non-pfMemory data
00:00:18.848: PF Warning: 152318 (Performer) Usage : pfObject::~pfObject()
 destroying object (0x5846b760) with non-zero ref count
00:00:24.172: PF Warning: 151482 (Performer) Usage : pfTexture::apply() -
bad number of components 0
00:00:24.292: PF Warning: 151482 (Performer) Usage : pfTexture::apply() -
bad number of components 0.

After running cvd and watching the above memory address the following appears to
 be happening. See attached
file callStacks for call stacks.

1. Load the first texture file, the piece of memory gets allocated.

2. Still loading first texture File, memory get used by a getrow function to
    store temporarily a row of texture data, I think, since after the texture
has been
    loaded the image (part of pfTexture) occupies a different area of memory.

3. Load in another number of texture Files, same memory gets used during getrow
call.

4. pfConfig is called, processes forked.

5. Load in another texture File which is larger in size than previous textures.
The
   function pr_load_sgi_image appears to free this memory. I guess this is
because
   it isn't big enough for a row? It then allocates a different region of memory
 to use
   for getrow.

6. The now free memory gets used by another object.

7. The DBASE process loads in a texture. pr_load_sgi_image function seems to
    try to free this memory again. This results in the first warning message
above.

I have the following questions to ask. Is the above a problem or are we doing
something wrong as far
as when we should be loading textures?

I have added some code to simple.C which produces the problem
 (pfMemory::free() can't free() non-pfMemory data) and have included here.

it requires two textures small.rgb and big.rgb which I created with gimp, and an
argument which is a model to load (e.g. esprit.flt).

small.rgb is a 128x128 3 component texture
big.rgb is a 256x256 3 component texture

Any help would be greatly appreciated.

Thanks

Peter Howe

(See attached file: callStacks) (See attached file: simple.C)






New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Jul 10 2000 - 23:20:46 PDT

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