[Paraview-developers] Crash in vtkTkRenderWidget on exiting (in my modified version of ParaView)

Stanton, Eric T etstant at sandia.gov
Wed May 11 15:38:52 EDT 2005


I was able to recreate the crash in vtkPVWindow::Configure() by opening
the error and timer log windows and then exiting ParaView. Thus the
problem appeared to be not (soley atleast) from Lookmarks code. I added
the following to the top of vtkPVWindow's destructor (I borrowed the
idea from vtkPVRenderView's destructor). 

  this->Superclass::PrepareForDelete();

  // I was getting intermittent crashes in Configure so make sure that
after the Interactor is released, Configure cannot be called
  // Configure
  if(this->MainView)
    {
    this->Script("bind %s <Configure> {}", 
                this->MainView->GetVTKWidget()->GetWidgetName(),
this->GetTclName());
    }

That seemed to work alright but then I was getting memory leaks. I
noticed that also in vtkPVWindow's destructor there were two different
places where

  if (this->SourceLists)
    {
    this->SourceLists->Delete();
    this->SourceLists = NULL;
    }

resides. But the first one is not preceded by 

  this->DeleteAllSources();

like the second one is. Thus I think the pvsources that were being
created were not deleted properly probably causing the leaks. So I got
rid of the first chunk and found out I had to move the second one before

  if (this->MainView)
    {
    this->MainView->Close();
    this->MainView->SetParentWindow(NULL);
    this->MainView->Delete();
    this->MainView = NULL;
    }

since GetPVRenderView() is called in DeleteAllSources() code.

I'll commit these changes shortly unless someone sees an error in my
logic.


Thanks,

Eric Stanton
Sandia National Laboratories
Data Analysis and Visualization


 

> -----Original Message-----
> From: 
> paraview-developers-bounces+etstant=sandia.gov at paraview.org 
> [mailto:paraview-developers-bounces+etstant=sandia.gov at paravie
> w.org] On Behalf Of Stanton, Eric T
> Sent: Tuesday, May 10, 2005 12:41 PM
> To: Berk Geveci; Utkarsh Ayachit
> Cc: paraview-developers at public.kitware.com
> Subject: RE: [Paraview-developers] Crash in vtkTkRenderWidget 
> on exiting (in my modified version of ParaView)
> 
> THanks for the pointers. I updated the source and now, its crashing in
> vtkPVWindow::Configure() after vtkPVWindow's destructor has 
> been reached so vtkPVWindow->Interactor has been set to null. 
> Again, its only some of the time which is unnerving. 
> 
> I checked and don't seem to be maintaining any reference to 
> RenderModuleProxy. 
> 
> If you know of anything else I might try let me know. 
> Otherwise, it might be time to rollback my modifications.
> 
> THanks,
> 
> --Eric
> 
> 
> > -----Original Message-----
> > From: Berk Geveci [mailto:berk.geveci at gmail.com]
> > Sent: Tuesday, May 10, 2005 5:00 AM
> > To: Utkarsh Ayachit
> > Cc: Stanton, Eric T; paraview-developers at public.kitware.com
> > Subject: Re: [Paraview-developers] Crash in vtkTkRenderWidget on 
> > exiting (in my modified version of ParaView)
> > 
> > I made some changes to the cleanup code of paraview. This 
> should fix 
> > some issues. I don't know if this is the same thing though.
> > 
> > -Berk
> > 
> > On 5/9/05, Utkarsh Ayachit <utkarsh.ayachit at kitware.com> wrote:
> > > Not necessarily sure that the line 747 crash is for the
> > same reason,
> > > however, if the RenderModuleProxy if not getting destroyed when 
> > > vtkPVApplication.cxx (line 1409) releases the proxy (with a
> > > SetRenderModuleProxy(0) call), it usually leads to errors
> > while exiting.
> > > 
> > > Ensure that everyone maintaining a reference to the
> > RenderModuleProxy
> > > let's go of the proxy before vtkPVApplication::RemoveWindow
> > gets called.
> > > 
> > > vtkPVWindow has a PrepareForDelete method where one can 
> enforce the 
> > > releasing of the render module proxy.
> > > 
> > > Hopefully, this will help.
> > > 
> > > Utkarsh.
> > > 
> > > Stanton, Eric T wrote:
> > > > I'm making changes/improvements to the Lookmark Manager code but
> > > > *sometimes* when I exit ParaView, I get an access violation in 
> > > > vtkTkRenderWidget at line 747.
> > > >
> > > > I've been chasing this bug around for a while and can't
> > figure out
> > > > what I changed to cause this behavior.
> > > >
> > > > The problem is that I don't understand the error and so
> > don't know
> > > > what to look for in debugging my code. If someone could
> > help me with
> > > > this I'd be most grateful.
> > > >
> > > > Thanks,
> > > >
> > > > Eric Stanton
> > > > Sandia National Laboratories
> > > > Data Analysis and Visualization
> > > > 505-284-4422
> > > >
> > > > _______________________________________________
> > > > Paraview-developers mailing list
> > > > Paraview-developers at paraview.org
> > > > http://public.kitware.com/mailman/listinfo/paraview-developers
> > > >
> > > _______________________________________________
> > > Paraview-developers mailing list
> > > Paraview-developers at paraview.org
> > > http://public.kitware.com/mailman/listinfo/paraview-developers
> > >
> > 
> > 
> 
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
> 
> 



More information about the Paraview-developers mailing list