I've attached a patch that should fix the issue. The fix has been
pushed to git and will make it to git-master in near future.

Thomas, I'm not sure if you're using OSMesa, so this may not fix your
issue.  Let me know if this patch doesn't help.

Utkarsh

On Tue, Dec 6, 2011 at 7:05 AM, Utkarsh Ayachit
<[email protected]> wrote:
> Yup, I tracked it down to display lists not being cleaned up correctly
> when using OSMesa. I'm now trying to decide how best to fix the issue.
>
> Utkarsh
>
> On Tue, Dec 6, 2011 at 5:55 AM, Paul Edwards <[email protected]> wrote:
>> Turning off the display lists fixes it for me in pvserver.
>>
>> Regards,
>> Paul
>>
>>
>> On 5 December 2011 20:40, Utkarsh Ayachit <[email protected]>
>> wrote:
>>>
>>> I'm tracking this down. Goodwin, I was able to reproduce the issue
>>> using the steps listed on http://paraview.org/Bug/view.php?id=12424
>>> I'll keep the list updated as I discover things.
>>>
>>> Utkarsh
>>>
>>> On Mon, Dec 5, 2011 at 2:27 PM, Seth Gilchrist <[email protected]> wrote:
>>> > Hi all,
>>> > This seems to be a recurring problem.  Below are some links to previous
>>> > posts in the PV mailing list with the same issue.
>>> >
>>> > It seems to be a fairly widespread bug.  I have tried compiling from the
>>> > git
>>> > and releases and tried all the binaries.  The only way around is to go
>>> > back
>>> > to 3.8 or earlier (one post said they had to go back to 3.6).
>>> >
>>> > Cheers,
>>> > Seth
>>> >
>>> > http://www.paraview.org/pipermail/paraview/2011-October/022868.html
>>> >
>>> > http://www.paraview.org/pipermail/paraview/2011-October/022892.html
>>> >
>>> > http://www.mail-archive.com/[email protected]/msg13286.html
>>> >
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > Powered by www.kitware.com
>>> >
>>> > Visit other Kitware open-source projects at
>>> > http://www.kitware.com/opensource/opensource.html
>>> >
>>> > Please keep messages on-topic and check the ParaView Wiki at:
>>> > http://paraview.org/Wiki/ParaView
>>> >
>>> > Follow this link to subscribe/unsubscribe:
>>> > http://www.paraview.org/mailman/listinfo/paraview
>>> >
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the ParaView Wiki at:
>>> http://paraview.org/Wiki/ParaView
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.paraview.org/mailman/listinfo/paraview
>>
>>
From 0f9080648f1086b8abaecbc8bdfdbf9e58e66451 Mon Sep 17 00:00:00 2001
From: Utkarsh Ayachit <[email protected]>
Date: Tue, 6 Dec 2011 07:30:59 -0500
Subject: [PATCH] Fixed BUG #12424. Display lists were not released correctly.

Display lists were not release correctly when using vtkOSOpenGLRenderWindow.
vtkOSOpenGLRenderWindow never sets Mapped to 1, consequently the display lists
were not being cleared. Fixed the logic.
---
 Rendering/vtkOpenGLDisplayListPainter.cxx |   28 +++++++++++++---------------
 1 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/Rendering/vtkOpenGLDisplayListPainter.cxx b/Rendering/vtkOpenGLDisplayListPainter.cxx
index 72e592d..49c2bfa 100644
--- a/Rendering/vtkOpenGLDisplayListPainter.cxx
+++ b/Rendering/vtkOpenGLDisplayListPainter.cxx
@@ -42,17 +42,13 @@ public:
   // Refers to the build time of the first display list.
   vtkTimeStamp BuildTime;
 
-  void ReleaseAllLists(vtkWindow* win)
+  void ReleaseAllLists()
     {
-    // Checking is win->GetMapped() is causing segfaults on AIX.
-    if (win /*&& win->GetMapped()*/)
+    DisplayListMapType::iterator iter;
+    for (iter = this->DisplayListMap.begin(); iter != this->DisplayListMap.end();
+      iter++)
       {
-      DisplayListMapType::iterator iter;
-      for (iter = this->DisplayListMap.begin(); iter != this->DisplayListMap.end();
-        iter++)
-        {
-        glDeleteLists(iter->second, 1);
-        }
+      glDeleteLists(iter->second, 1);
       }
     this->DisplayListMap.clear();
     }
@@ -100,7 +96,7 @@ void vtkOpenGLDisplayListPainter::ReleaseGraphicsResources(vtkWindow* win)
   if (win && win->GetMapped())
     {
     win->MakeCurrent();
-    this->Internals->ReleaseAllLists(win);
+    this->Internals->ReleaseAllLists();
     }
   this->Internals->DisplayListMap.clear();
   this->Superclass::ReleaseGraphicsResources(win);
@@ -113,11 +109,11 @@ void vtkOpenGLDisplayListPainter::RenderInternal(vtkRenderer *renderer,
                                                  unsigned long typeflags,
                                                  bool forceCompileOnly)
 {
-  if (this->GetMTime() > this->Internals->BuildTime ||
-    (this->LastWindow && (renderer->GetRenderWindow() != this->LastWindow.GetPointer())))
+  // if active render window has changed, then release the old display lists on
+  // the old window, if the old window is still valid.
+  if (this->LastWindow &&
+    (renderer->GetRenderWindow() != this->LastWindow.GetPointer()))
     {
-    // MTime changes when input changes or someother iVar changes, so display
-    // lists are obsolete so we can let go of them.
     this->ReleaseGraphicsResources(this->LastWindow);
     renderer->GetRenderWindow()->MakeCurrent();
     }
@@ -141,6 +137,8 @@ void vtkOpenGLDisplayListPainter::RenderInternal(vtkRenderer *renderer,
   // First check for the cases where all display lists (irrespective of
   // typeflags are obsolete.
   if (
+    // the painter has changed.
+    this->GetMTime() > this->Internals->BuildTime ||
     // Since input changed
     input->GetMTime() > this->Internals->BuildTime  ||
     // actor's properties were modified
@@ -148,7 +146,7 @@ void vtkOpenGLDisplayListPainter::RenderInternal(vtkRenderer *renderer,
     // mapper information was modified
     this->Information->GetMTime() > this->Internals->BuildTime)
     {
-    this->Internals->ReleaseAllLists(this->LastWindow);
+    this->Internals->ReleaseAllLists();
     this->LastWindow = 0;
     }
 
-- 
1.7.2.5

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to