[Bf-committers] sequencer crash

Peter Schlaile peter at schlaile.de
Fri Mar 10 20:20:32 CET 2006


Hi,

since I'm the only C++-coder around, I dived into the code:

The interesting part of openexr_api.cpp is starting at line 625:
I commented the code a little bit, to explain the crash:

if (!(flags & IB_test))
{
      FrameBuffer frameBuffer; // here we construct a temporary
                               // FrameBuffer object on the stack
	                       // there is a stl::map in it, that uses the
	                       // heap, which is later globbered...

      // ... here we add Slices to the frameBuffer, that tell readPixels
      // where to write the data...

      // (*)
      // Somewhere in here, most probably we added pointers / sizes that
      // point outside the limits.

      file->setFrameBuffer (frameBuffer);
      // tell the input-object, where
      // we want to write the data

      file->readPixels (dw.min.y, dw.max.y);
      // read the data, probably thereby globbering the malloc-heap

      IMB_rect_from_float(ibuf);

} // here frameBuffer loses scope and is destructed automatically
  // triggering the segmentation fault

To investigate this further:
- First try: please remove file->readPixels and see if it doesn't crash
  anymore. Yes -> then I'm right, we made something wrong with the slices.
  Add it again and ...
- then: There are several frameBuffer.insert - method calls located here
  (*).
  It is probably the best to remove these calls one by one and look,
  when the segfault goes away.

The bug is most probably triggered by a specific openexr-file. It is most
likely a good idea to add some "fprintf-debug"-Statements, that show
xstride, ystride, width, height, dw.min.x, dw.min.y etc.

If that doesn't help, send me an email (or give me an account on the
machine affected / send the openexr-file to me).

Greetings,
Peter




More information about the Bf-committers mailing list