[vtkusers] QVTKWidget2 memory leak?

Jonathan Morra jonmorra at gmail.com
Mon Mar 5 14:52:50 EST 2012


Thanks so much for fixing this, however I still think there is a small
memory leak in the render code.  I have noticed that on both QVTKWidget and
QVTKWidget2 using the test that I have included below on Windows 7 32 bit
compiled with VS 2008 the memory still slowly climbs (however it is much
better than before).  This leads me to believe that the error is not
specific to QVTKWidget or QVTKWidget2, but instead somewhere else.

Does anyone else see this or notice this memory leak?

Thanks,
Jon

Here is my test (use either QVTKWidget or QVTKWidget2)

#include <QtGui/QApplication>

#include <QMainWindow>

 #include <QVTKWidget2.h>

#include <vtkImageViewer2.h>

#include <vtkImageData.h>

#include <vtkPointData.h>

#include <vtkGenericOpenGLRenderWindow.h>

 class MyQVTKWidget2 : public QVTKWidget2 {

public:

    MyQVTKWidget2 (vtkImageViewer2 *imageViewer, QWidget *parent = 0)
: QVTKWidget2(parent) {

        this->imageViewer = imageViewer;

    }

     virtual ~MyQVTKWidget2() {

        imageViewer->Delete();

    }

     void mouseMoveEvent(QMouseEvent *) {

        // Comment out this line to see the memory stay constant

        imageViewer->Render();

    }

 private:

    vtkImageViewer2 *imageViewer;

};

 int main(int argc, char *argv[]) {

    QApplication a(argc, argv);

     vtkImageData *imageData = vtkImageData::New();

    imageData->SetExtent(0, 100, 0, 100, 0, 100);

    imageData->SetOrigin(0, 0, 0);

    imageData->SetSpacing(1, 1, 1);

    imageData->AllocateScalars();

    imageData->GetPointData()->GetScalars()->FillComponent(0, 0);

     vtkImageViewer2 *imageViewer = vtkImageViewer2::New();

    imageViewer->SetInput(imageData);

     MyQVTKWidget2 *widget = new MyQVTKWidget2(imageViewer);

    imageViewer->SetRenderWindow(widget->GetRenderWindow());

     QMainWindow mainWindow;

    mainWindow.setGeometry(200, 200, 300, 300);

    mainWindow.setCentralWidget(widget);

    mainWindow.show();

     imageData->Delete();

    return a.exec();

}


On Wed, Feb 29, 2012 at 11:08 AM, Clinton Stimpson <clinton at elemtech.com>wrote:

>
> Its on master now.
>
> If you still have leaking problems, it seems you'll have to look into it
> further, because I don't see any increase of memory usage after 30 seconds
> or
> more.  I did see an increase before this patch that went into master.
>
> Clint
>
> On Monday, February 27, 2012 04:54:56 pm Jonathan Morra wrote:
> > Can you please let me know when it's on master.
> >
> > On Mon, Feb 27, 2012 at 3:46 PM, Clinton Stimpson
> <clinton at elemtech.com>wrote:
> > > Ha, our emails crossed....  Yeah, I'll submit it for inclusion in
> master.
> > >
> > > Clint
> > >
> > > On Monday, February 27, 2012 04:43:24 pm you wrote:
> > > > Are you going to merge this back to master?
> > > >
> > > > On Mon, Feb 27, 2012 at 10:04 AM, Jonathan Morra <jonmorra at gmail.com
> >
> > >
> > > wrote:
> > > > > OK I got your branch working and tested it with my test program.
>  The
> > > > > memory still rises, but much slower now.  It would appear that you
> > > > > have made the memory leak smaller but it is still there.  Please
> let
> > > > > me know if you'd like me to do more testing.
> > > > >
> > > > > On Mon, Feb 27, 2012 at 8:46 AM, Clinton Stimpson
> > >
> > > <clinton at elemtech.com>wrote:
> > > > >> Either of these should work...
> > > > >>
> > > > >> # to add to existing git repo / with existing build tree
> > > > >> git remote add clintonstimpson git://
> > >
> > > github.com/clintonstimpson/VTK.git
> > >
> > > > >> git fetch clintonstimpson
> > > > >> git checkout -b qvtk2-context clintonstimpson/qvtk2-context
> > > > >>
> > > > >> # a new clone
> > > > >> git clone git://github.com/clintonstimpson/VTK.git
> > > > >> git checkout -b qvtk2-context origin/qvtk2-context
> > > > >>
> > > > >> Clint
> > > > >>
> > > > >> On Monday, February 27, 2012 09:23:49 am Jonathan Morra wrote:
> > > > >> > I tried to run both git checkout qvtk2-context and git pull
> origin
> > > > >> > qvtk2-context and neither of them succeeded.  Is there something
> > >
> > > else
> > >
> > > > >> > I have to do?
> > > > >> >
> > > > >> > On Mon, Feb 27, 2012 at 8:13 AM, Clinton Stimpson
> > > > >>
> > > > >> <clinton at elemtech.com>wrote:
> > > > >> > > No, there is a qvtk2-context branch.
> > > > >> > >
> > > > >> > > On Monday, February 27, 2012 09:11:20 am you wrote:
> > > > >> > > > Is this on the master branch?
> > > > >> > > >
> > > > >> > > > On Mon, Feb 27, 2012 at 8:10 AM, Clinton Stimpson
> > > > >> > >
> > > > >> > > <clinton at elemtech.com>wrote:
> > > > >> > > > > Here you go.
> > > > >> > > > >
> https://github.com/clintonstimpson/VTK/commits/qvtk2-context
> > > > >> > > > >
> > > > >> > > > > Clint
> > > > >> > > > >
> > > > >> > > > > On Monday, February 27, 2012 09:04:09 am Clinton Stimpson
> > >
> > > wrote:
> > > > >> > > > > > Yes... give me a moment to put it in github.
> > > > >> > > > > >
> > > > >> > > > > > Clint
> > > > >> > > > > >
> > > > >> > > > > > On Friday, February 24, 2012 06:45:19 pm you wrote:
> > > > >> > > > > > > In order to make sure that I'm getting the patch
> correct
> > > > >> > > > > > > could you
> > > > >> > > > >
> > > > >> > > > > make a
> > > > >> > > > >
> > > > >> > > > > > > branch on VTK that I can pull?
> > > > >> > > > > > >
> > > > >> > > > > > > On Fri, Feb 24, 2012 at 5:41 PM, Jonathan Morra <
> > > > >> > >
> > > > >> > > jonmorra at gmail.com>
> > > > >> > >
> > > > >> > > > > wrote:
> > > > >> > > > > > > > OK it would appear that the patch program I used
> > > > >> > > > > > > > didn't work
> > > > >> > > > >
> > > > >> > > > > perfectly.
> > > > >> > > > >
> > > > >> > > > > > > > I manually applied the rest of the patch and got
> > > > >>
> > > > >> compilation to
> > > > >>
> > > > >> > > > > happen.
> > > > >> > > > >
> > > > >> > > > > > > > I still see the memory moving up, but it is
> happening
> > >
> > > more
> > >
> > > > >> > > slowly.
> > > > >> > >
> > > > >> > > > > > > > On Fri, Feb 24, 2012 at 5:26 PM, Jonathan Morra
> > > > >> > > > >
> > > > >> > > > > <jonmorra at gmail.com>wrote:
> > > > >> > > > > > > >> Just to clarify, I tried a clean and build and this
> > >
> > > still
> > >
> > > > >> > > > > > > >> happened.
> > > > >> > > > > > > >>
> > > > >> > > > > > > >> On Fri, Feb 24, 2012 at 5:06 PM, Jonathan Morra
> > > > >> > > > > >
> > > > >> > > > > > <jonmorra at gmail.com>wrote:
> > > > >> > > > > > > >>> OK, I think I've figured out how to apply the
> patch.
> > >
> > >  I
> > >
> > > > >> have
> > > > >>
> > > > >> > > > > > > >>> a
> > > > >> > > > >
> > > > >> > > > > build
> > > > >> > > > >
> > > > >> > > > > > > >>> error that I've included below
> > > > >> > > > > > > >>>
> > > > >> > > > > > > >>> >Linking...
> > > > >> > > > > > > >>>
> > > > >> > > > > > > >>> 1>   Creating library
> > > > >> > > > >
> > > > >> > > > > C:\MVS\VTK\bin\x86\bin\RelWithDebInfo\QVTK.lib
> > > > >> > > > >
> > > > >> > > > > > > >>> and object
> > > > >> > > > > > > >>> C:\MVS\VTK\bin\x86\bin\RelWithDebInfo\QVTK.exp
> > > > >> > > > > > > >>> 1>QVTKWidget2.obj : error LNK2001: unresolved
> > > > >> > > > > > > >>> external
> > > > >>
> > > > >> symbol
> > > > >>
> > > > >> > > > > > > >>> "protected: virtual void __thiscall
> > > > >> > > > >
> > > > >> > > > > QVTKWidget2::initializeGL(void)"
> > > > >> > > > >
> > > > >> > > > > > > >>> (?initializeGL at QVTKWidget2@@MAEXXZ)
> > >
> > > > >> > > > > > > >>> 1>C:\MVS\VTK\bin\x86\bin\RelWithDebInfo\QVTK.dll :
> > > fatal
> > >
> > > > >> > > > > > > >>> error LNK1120: 1 unresolved externals
> > > > >> > > > > > > >>> 1>Build log was saved at
> > > > >>
> > > > >>
> "file://c:\MVS\VTK\bin\x86\GUISupport\Qt\QVTK.dir\RelWithDebInfo\Bui
> > > > >> l
> > > > >>
> > > > >> > > > > > > >>> dL og.htm" 1>QVTK - 2 error(s), 0 warning(s)
> > > > >> > > > > > > >>> 2>------ Skipped Build: Project: INSTALL,
> > >
> > > Configuration:
> > > > >> > > > > > > >>> RelWithDebInfo Win32 ------
> > > > >> > > > > > > >>> 2>Project not selected to build for this solution
> > > > >> > > > > > > >>> configuration
> > > > >> > > > > > > >>>
> > > > >> > > > > > > >>> On Fri, Feb 24, 2012 at 4:38 PM, Jonathan Morra
> > > > >> > > > > >
> > > > >> > > > > > <jonmorra at gmail.com>wrote:
> > > > >> > > > > > > >>>> How do I apply a patch on Windows?  I tried using
> > > > >> > >
> > > > >> > > TortoiseMerge,
> > > > >> > >
> > > > >> > > > > but
> > > > >> > > > >
> > > > >> > > > > > > >>>> couldn't get it to work.
> > > > >> > > > > > > >>>>
> > > > >> > > > > > > >>>>
> > > > >> > > > > > > >>>> On Fri, Feb 24, 2012 at 4:17 PM, Clinton Stimpson
> > > > >> > > > > > > >>>> <clinton at elemtech.com
> > > > >> > > > > > > >>>>
> > > > >> > > > > > > >>>> > wrote:
> > > > >> > > > > > > >>>>> Can you test the attached patch on Windows for
> me?
> > > > >> > > > > > > >>>>> Because I'm on Linux.
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> Thanks,
> > > > >> > > > > > > >>>>> Clint
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> On Friday, February 24, 2012 03:25:13 pm
> Jonathan
> > > > >> > > > > > > >>>>> Morra
> > > > >> > >
> > > > >> > > wrote:
> > > > >> > > > > > > >>>>> > OK, here is a small example that shows the
> > >
> > > problem.
> > >
> > > > >>  I'm
> > > > >>
> > > > >> > > > > > > >>>>> > monitoring
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> the
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> > memory using task manager.  When the render
> line
> > >
> > > is
> > >
> > > > >> > > commented
> > > > >> > >
> > > > >> > > > > out
> > > > >> > > > >
> > > > >> > > > > > > >>>>> > the memory stays constant as you mouse over
> the
> > > > >> > > > > > > >>>>> > image.
> > > > >> > > > >
> > > > >> > > > >  However,
> > > > >> > > > >
> > > > >> > > > > > > >>>>> > if that
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> line
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> > is uncommented then then memory climbs
> rapidly.
> > >
> > >  The
> > >
> > > > >> > > program
> > > > >> > >
> > > > >> > > > > > > >>>>> > crashes
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> when
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> > you exit, but that doesn't concern me right
> now,
> > >
> > > I'm
> > >
> > > > >> > > focused
> > > > >> > >
> > > > >> > > > > > > >>>>> > on the
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> memory
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> > leak.
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> > Thanks
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> > #include <QtGui/QApplication>
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> > #include <QMainWindow>
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >  #include <QVTKWidget2.h>
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> > #include <vtkImageViewer2.h>
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> > #include <vtkImageData.h>
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> > #include <vtkPointData.h>
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> > #include <vtkGenericOpenGLRenderWindow.h>
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >  class MyQVTKWidget2 : public QVTKWidget2 {
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> > public:
> > > > >> > > > > > > >>>>> >     MyQVTKWidget2 (vtkImageViewer2
> *imageViewer,
> > > > >>
> > > > >> QWidget
> > > > >>
> > > > >> > > > > *parent
> > > > >> > > > >
> > > > >> > > > > > > >>>>> >     = 0)
> > > > >> > > > > > > >>>>> > :
> > > > >> > > > > > > >>>>> > : QVTKWidget2(parent) {
> > > > >> > > > > > > >>>>> > :
> > > > >> > > > > > > >>>>> >         this->imageViewer = imageViewer;
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >     }
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >      virtual ~MyQVTKWidget2() {
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >         imageViewer->Delete();
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >     }
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >      void mouseMoveEvent(QMouseEvent *) {
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >         // Comment out this line to see the
> > > > >> > > > > > > >>>>> >         memory
> > > > >>
> > > > >> stay
> > > > >>
> > > > >> > > > > constant
> > > > >> > > > >
> > > > >> > > > > > > >>>>> >         imageViewer->Render();
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >     }
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >  private:
> > > > >> > > > > > > >>>>> >     vtkImageViewer2 *imageViewer;
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> > };
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >  int main(int argc, char *argv[]) {
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >     QApplication a(argc, argv);
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >      vtkImageData *imageData =
> > >
> > > vtkImageData::New();
> > >
> > > > >> > > > > > > >>>>> >     imageData->SetExtent(0, 100, 0, 100, 0,
> > > > >> > > > > > > >>>>> >     100);
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >     imageData->SetOrigin(0, 0, 0);
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >     imageData->SetSpacing(1, 1, 1);
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >     imageData->AllocateScalars();
> > > > >> > >
> > > > >> > > imageData->GetPointData()->GetScalars()->FillComponent(0,
> > > > >> > >
> > > > >> > > > > 0);
> > > > >> > > > >
> > > > >> > > > > > > >>>>> >      vtkImageViewer2 *imageViewer =
> > > > >> > > > > > > >>>>> >      vtkImageViewer2::New();
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >     imageViewer->SetInput(imageData);
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >      MyQVTKWidget2 widget(imageViewer);
> > > > >>
> > > > >> imageViewer->SetRenderWindow(widget.GetRenderWindow()
> > > > >>
> > > > >> > > > > > > >>>>> >     );
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >      QMainWindow mainWindow;
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >     mainWindow.setGeometry(200, 200, 300,
> 300);
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >     mainWindow.setCentralWidget(&widget);
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >     mainWindow.show();
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >      imageData->Delete();
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> >     return a.exec();
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> > }
> > > > >> > > > > > > >>>>> >
> > > > >> > > > > > > >>>>> > On Fri, Feb 24, 2012 at 1:36 PM, Jonathan
> Morra
> > > > >> > > > > > > >>>>> > <jonmorra at gmail.com>
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> wrote:
> > > > >> > > > > > > >>>>> > > I will spend some time and try and put
> > > > >> > > > > > > >>>>> > > together
> > >
> > > a
> > >
> > > > >> small
> > > > >>
> > > > >> > > > > > > >>>>> > > self
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> contained
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> > > test.
> > > > >> > > > > > > >>>>> > >
> > > > >> > > > > > > >>>>> > > On Fri, Feb 24, 2012 at 1:29 PM, Clinton
> > >
> > > Stimpson
> > >
> > > > >> > > > > > > >>>>> <clinton at elemtech.com>wrote:
> > > > >> > > > > > > >>>>> > >> On Friday, February 24, 2012 02:19:59 pm
> > >
> > > Jonathan
> > >
> > > > >> > > > > > > >>>>> > >> Morra
> > > > >> > > > >
> > > > >> > > > > wrote:
> > > > >> > > > > > > >>>>> > >> > I have recently converted my app from
> using
> > > > >> > > > > > > >>>>> > >> > QVTKWidget to
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> QVTKWidget2
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> > >> > so that I could paint on the QVTKWidget2
> > >
> > > (which
> > >
> > > > >> > > > > > > >>>>> > >> > I was able to successfully do).  After
> this
> > > > >> > > > > > > >>>>> > >> > conversion my
> > > > >> > >
> > > > >> > > app
> > > > >> > >
> > > > >> > > > > > > >>>>> > >> > started to leak memory terribly.  I
> > > > >> > > > > > > >>>>> > >> > followed the
> > > > >> > >
> > > > >> > > memory
> > > > >> > >
> > > > >> > > > > > > >>>>> > >> > leak around, and found
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> the
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> > >> > culprit is the following line
> > > > >> > > > > > > >>>>> > >> >
> > > > >> > > > > > > >>>>> > >> > glTexImage2D(GL_TEXTURE_2D, 0,
> > >
> > > internalFormat,
> > >
> > > > >> > > > > > > >>>>> > >> >                    xsize, ysize, 0,
> format,
> > > > >> > > > > > > >>>>> > >> >
> > > > >> > > > > > > >>>>> > >> >                    GL_UNSIGNED_BYTE,
> > > > >> > > > > > > >>>>> > >> >                    static_cast<const
> GLvoid
> > > > >> > > > > > > >>>>> > >> >                    *>(data));
> > > > >> > > > > > > >>>>> > >> >
> > > > >> > > > > > > >>>>> > >> > Which is in the following function
> > > > >> > > > > > > >>>>> > >> >
> > > > >> > > > > > > >>>>> > >> >
> > > > >> > > > > > > >>>>> > >> > void
> > >
> > > vtkOpenGLImageSliceMapper::RenderTexturedPolygo
> > >
> > > > >> > > > > > > >>>>> > >> > n(
> > > > >> > > > > > > >>>>> > >> >
> > > > >> > > > > > > >>>>> > >> >   vtkRenderer *ren, vtkImageProperty
> > >
> > > *property,
> > >
> > > > >> > > > > > > >>>>> > >> >   vtkImageData *input, int extent[6],
> bool
> > > > >> > > > > > > >>>>> > >> >   recursive)
> > > > >> > > > > > > >>>>> > >> >
> > > > >> > > > > > > >>>>> > >> > I am using a build that I got from git on
> > > > >> > > > > > > >>>>> > >> > January
> > > > >> > >
> > > > >> > > 10th.
> > > > >> > >
> > > > >> > > > > > > >>>>> > >> > I have
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> a 64
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> > >> > bit Windows 7 machine, but have built VTK
> > >
> > > with
> > >
> > > > >> > > Microsoft
> > > > >> > >
> > > > >> > > > > > > >>>>> > >> > Visual Studios 2008 32 bit.
> > > > >> > > > > > > >>>>> > >> >
> > > > >> > > > > > > >>>>> > >> >
> > > > >> > > > > > > >>>>> > >> > This bug is manifested everytime I call
> > >
> > > render
> > >
> > > > >> on a
> > > > >>
> > > > >> > > > > > > >>>>> > >> > QVTKWidget2
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> that I
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> > >> > have placed a vtkImageViewer2 in.  This
> is
> > > > >> > > > > > > >>>>> > >> > a very critical bug
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> for us
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> > >> > as now our program runs out of memory
> very
> > > > >>
> > > > >> quickly
> > > > >>
> > > > >> > > > > > > >>>>> > >> > because
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> there are
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> > >> > situations where render is called on
> every
> > > > >> > > > > > > >>>>> > >> > mouse move
> > > > >> > > > >
> > > > >> > > > > which
> > > > >> > > > >
> > > > >> > > > > > > >>>>> means the
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> > >> > program will die extremely fast.  Any
> help
> > > > >> > > > > > > >>>>> > >> > would
> > > > >>
> > > > >> be
> > > > >>
> > > > >> > > > > > > >>>>> > >> > appreciated.
> > > > >> > > > > > > >>>>> > >>
> > > > >> > > > > > > >>>>> > >> Ok, I see the cause of the problem.
> > > > >> > > > > > > >>>>> > >>
> > > > >> > > > > > > >>>>> > >> QVTKWidget2::Start() calls OpenGLInit(),
> > > > >> > > > > > > >>>>> > >> which
> > > > >>
> > > > >> resets
> > > > >>
> > > > >> > > the
> > > > >> > >
> > > > >> > > > > > > >>>>> > >> context creation time and the
> > > > >> > > > > > > >>>>> > >> vtkOpenGLImageSliceMapper reloads them
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> thinking
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> > >> its a new context.
> > > > >> > > > > > > >>>>> > >>
> > > > >> > > > > > > >>>>> > >> It would helpful if you can provide a
> minimal
> > > > >> > > > > > > >>>>> > >> test case
> > > > >> > >
> > > > >> > > to
> > > > >> > >
> > > > >> > > > > > > >>>>> demonstrate
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> > >> this.
> > > > >> > > > > > > >>>>> > >>
> > > > >> > > > > > > >>>>> > >> --
> > > > >> > > > > > > >>>>> > >> Clinton Stimpson
> > > > >> > > > > > > >>>>> > >> Elemental Technologies, Inc
> > > > >> > > > > > > >>>>> > >> Computational Simulation Software, LLC
> > > > >> > > > > > > >>>>> > >> www.csimsoft.com
> > > > >> > > > > > > >>>>>
> > > > >> > > > > > > >>>>> --
> > > > >> > > > > > > >>>>> Clinton Stimpson
> > > > >> > > > > > > >>>>> Elemental Technologies, Inc
> > > > >> > > > > > > >>>>> Computational Simulation Software, LLC
> > > > >> > > > > > > >>>>> www.csimsoft.com
> > > > >> > > > >
> > > > >> > > > > --
> > > > >> > > > > Clinton Stimpson
> > > > >> > > > > Elemental Technologies, Inc
> > > > >> > > > > Computational Simulation Software, LLC
> > > > >> > > > > www.csimsoft.com
> > > > >> > >
> > > > >> > > --
> > > > >> > > Clinton Stimpson
> > > > >> > > Elemental Technologies, Inc
> > > > >> > > Computational Simulation Software, LLC
> > > > >> > > www.csimsoft.com
> > > > >>
> > > > >> --
> > > > >> Clinton Stimpson
> > > > >> Elemental Technologies, Inc
> > > > >> Computational Simulation Software, LLC
> > > > >> www.csimsoft.com
> > >
> > > --
> > > Clinton Stimpson
> > > Elemental Technologies, Inc
> > > Computational Simulation Software, LLC
> > > www.csimsoft.com
>
> --
> Clinton Stimpson
> Elemental Technologies, Inc
> Computational Simulation Software, LLC
> www.csimsoft.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120305/7e6caaff/attachment.htm>


More information about the vtkusers mailing list