<div dir="ltr">The issue here I think is why destroy the window on a resize (for offscreen). We have the same code on another platform and I do not think it is needed anymore. Resizing offscreen rendering should just be changing the fbo size. That is probably what we need to fix. Then the problem goes away.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 10, 2018 at 10:37 AM, Allie Vacanti <span dir="ltr"><<a href="mailto:allison.vacanti@kitware.com" target="_blank">allison.vacanti@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Thanks for the report, I've made an issue here so this doesn't get lost in the mailing list archives: <a href="https://gitlab.kitware.com/vtk/vtk/issues/17388" target="_blank">https://gitlab.kitware.com/<wbr>vtk/vtk/issues/17388</a><br><br>From the stack trace, it definitely  looks odd that destroying the window is triggering a render.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 7, 2018 at 11:05 PM, Prabhu Ramachandran <span dir="ltr"><<a href="mailto:prabhu@aero.iitb.ac.in" target="_blank">prabhu@aero.iitb.ac.in</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p><tt>Hi all,</tt></p>
    <p><tt>I am running in</tt><tt>to a very </tt><tt>strange issue
        with resizing</tt><tt> an offscreen window. It took me a few
        days to extract a simple VTK Python script to demonstrate this
        and the result is a rather strange script but shows that it is
        possible to put VTK into a race condition at best or in some
        cases completely mess up the rendering.  This happens on 8.1.1
        or VTK master from yesterday.  I've tried this on Mac OS and
        also on Linux.  This does not happen when offscreen rendering is
        disabled.<br>
      </tt></p>
    <p><tt>The way I have setup the problem is rather unusual so I
        understand if this is not going to be fixed but I thought I
        might as well report it here in case it is of any use.</tt></p>
    <p><tt>I've attached a simple Python script that only requires
        VTK-Python which demonstrates the problem, just run it and it
        will lock up VTK.  I was able to attach to the running process
        and see a backtrace that looks like below:<br>
      </tt></p>
    <p><tt><br>
      </tt></p>
    <p><tt>* thread #1, queue = 'com.apple.main-thread', stop reason =
        signal SIGSTOP<br>
          * frame #0: 0x00000001018a320a
        libsystem_kernel.dylib`mach_ms<wbr>g_trap + 10<br>
            frame #1: 0x00000001018a2724 libsystem_kernel.dylib`mach_ms<wbr>g
        + 60<br>
            frame #2: 0x000000010ba548a7 IOKit`io_connect_method + 369<br>
            frame #3: 0x000000010ba5470e IOKit`IOConnectCallMethod + 244<br>
            frame #4: 0x000000010ba55807 IOKit`IOConnectCallStructMetho<wbr>d
        + 38<br>
            frame #5: 0x000000010fab1721
        IOAccelerator`IOAccelContextSu<wbr>bmitDataBuffersExt2 + 248<br>
            frame #6: 0x00000001187634ba
        libGPUSupportMercury.dylib`gpu<wbr>sSubmitDataBuffers + 156<br>
            frame #7: 0x000000011c5ac332
        AMDRadeonX4000GLDriver`glrATI_<wbr>Hwl_SubmitPacketsWithToken + 154<br>
            frame #8: 0x00000001187640cb
        libGPUSupportMercury.dylib`gpu<wbr>iTestFence + 69<br>
            frame #9: 0x000000011c43339a GLEngine`glGetQueryObject_Core
        + 248<br>
            frame #10: 0x000000011c433260
        GLEngine`glGetQueryObjectiv_Ex<wbr>ec + 35<br>
            frame #11: 0x0000000111ea443f
libvtkOpenGL-8.1.1.dylib`vtkOp<wbr>enGLRenderTimer::GetReusableEl<wbr>apsedSeconds()
        + 63<br>
            frame #12: 0x0000000111e98437
libvtkOpenGL-8.1.1.dylib`vtkOp<wbr>enGLPolyDataMapper::RenderPiec<wbr>eFinish(vtkRenderer*,
        vtkActor*) + 231<br>
            frame #13: 0x0000000108bca957
        libvtkRendering-8.1.1.dylib`vt<wbr>kPolyDataMapper::Render(vtkRen<wbr>derer*,
        vtkActor*) + 263<br>
            frame #14: 0x0000000111e52d0b
        libvtkOpenGL-8.1.1.dylib`vtkOp<wbr>enGLActor::Render(vtkRenderer*<wbr>,
        vtkMapper*) + 171<br>
            frame #15: 0x0000000108b41143
        libvtkRendering-8.1.1.dylib`vt<wbr>kActor::RenderOpaqueGeometry(v<wbr>tkViewport*)
        + 435<br>
            frame #16: 0x0000000108bd6a47
        libvtkRendering-8.1.1.dylib`vt<wbr>kRenderer::UpdateOpaquePolygon<wbr>alGeometry()
        + 55<br>
            frame #17: 0x0000000111eb1264
        libvtkOpenGL-8.1.1.dylib`vtkOp<wbr>enGLRenderer::UpdateGeometry() +
        1956<br>
            frame #18: 0x0000000111eb0a95
        libvtkOpenGL-8.1.1.dylib`vtkOp<wbr>enGLRenderer::DeviceRender() + 181<br>
            frame #19: 0x0000000108bd5833
        libvtkRendering-8.1.1.dylib`vt<wbr>kRenderer::Render() + 1443<br>
            frame #20: 0x0000000108bd465b
        libvtkRendering-8.1.1.dylib`vt<wbr>kRendererCollection::Render() +
        139<br>
            frame #21: 0x0000000108bdf56c
        libvtkRendering-8.1.1.dylib`vt<wbr>kRenderWindow::DoStereoRender(<wbr>) +
        140<br>
            frame #22: 0x0000000108bde894
        libvtkRendering-8.1.1.dylib`vt<wbr>kRenderWindow::Render() + 596<br>
            frame #23: 0x00000001084b06ba
libvtkRenderingKitPython36D-8.<wbr>1.1.dylib`PyvtkRenderWindow_Re<wbr>nder(_object*,
        _object*) + 138<br>
            frame #24: 0x00000001007ae901
        Python`_PyCFunction_FastCallDi<wbr>ct + 497<br>
            frame #25: 0x00000001008303d7 Python`call_function + 439<br>
            frame #26: 0x000000010082cbb2
        Python`_PyEval_EvalFrameDefaul<wbr>t + 27346<br>
            frame #27: 0x0000000100830e3f
        Python`_PyEval_EvalCodeWithNam<wbr>e + 2447<br>
            frame #28: 0x0000000100826094 Python`PyEval_EvalCodeEx + 100<br>
            frame #29: 0x000000010078f26d Python`function_call + 381<br>
            frame #30: 0x00000001007661f0 Python`PyObject_Call + 96<br>
            frame #31: 0x0000000105025e98
libvtkWrappingPython36Core-8.1<wbr>.1.dylib`vtkPythonCommand::Exe<wbr>cute(vtkObject*,
        unsigned long, void*) + 1240<br>
            frame #32: 0x0000000105272ae5
        libvtkCommon-8.1.1.dylib`vtkSu<wbr>bjectHelper::InvokeEvent(unsig<wbr>ned
        long, void*, vtkObject*) + 1045<br>
            frame #33: 0x0000000111e9dc69
libvtkOpenGL-8.1.1.dylib`vtkOp<wbr>enGLResourceFreeCallback<vtkOp<wbr>enGLPolyDataMapper>::Release()
        + 89<br>
            frame #34: 0x0000000111eab86a
libvtkOpenGL-8.1.1.dylib`vtkOp<wbr>enGLRenderWindow::ReleaseGraph<wbr>icsResources(vtkRenderWindow*)
        + 58<br>
            frame #35: 0x0000000111f1908f
        libvtkOpenGL-8.1.1.dylib`vtkCo<wbr>coaRenderWindow::DestroyWindow<wbr>() +
        95<br>
            frame #36: 0x0000000111f1a986
        libvtkOpenGL-8.1.1.dylib`vtkCo<wbr>coaRenderWindow::SetSize(int, int)
        + 598<br>
            frame #37: 0x0000000111d62dee
libvtkOpenGLKitPython36D-8.1.1<wbr>.dylib`PyvtkCocoaRenderWindow_<wbr>SetSize(_object*,
        _object*) + 494<br>
      </tt></p>
    <p><tt><br>
      </tt></p>
    <p><tt>cheers,</tt></p>
    <p><tt>Prabhu<br>
      </tt></p>
  </div>

<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">https://public.kitware.com/mai<wbr>lman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">https://public.kitware.com/<wbr>mailman/listinfo/vtk-<wbr>developers</a><br>
<br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Ken Martin PhD<div>Distinguished Engineer<br><span style="font-size:12.8px">Kitware Inc.</span><br></div><div>101 East Weaver Street<br>Carrboro, North Carolina<br>
27510 USA<br><br><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication,
including all attachments, contains confidential and legally privileged
information, and it is intended only for the use of the addressee.  Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. If you received this communication in error please notify us
immediately and destroy the original message. 
Thank you.</span></div></div></div></div></div></div></div>
</div>