<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Sorry for the many posts, just a last one with a further
      simplified example that removes the need for numpy and numpy
      conversions ... <br>
    </p>
    <p>Best Regards,</p>
    <p>Andrea<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 11/16/2016 6:01 PM, Andrea Borsic
      wrote:<br>
    </div>
    <blockquote
      cite="mid:a6ea3823-cd68-2f3a-60ca-c2dcadf965cb@ne-scientific.com"
      type="cite">I have further simplified the script (it still crashes
      under Ubuntu and not under Windows)
      <br>
      <br>
      Best,
      <br>
      <br>
      Andrea
      <br>
      <br>
      <br>
      On 11/16/2016 5:29 PM, Andrea Borsic wrote:
      <br>
      <blockquote type="cite">Thanks for your test.
        <br>
        <br>
        My hint to the problem is wrong though  - I have realized that
        MaxId is equal to size() - 1 and not NumberOfTuples() -1, so the
        MaxId shown by print() is correct.
        <br>
        <br>
        I will do some more digging,
        <br>
        <br>
        Best and thanks,
        <br>
        <br>
        Andrea
        <br>
        <br>
        <br>
        On 16/11/2016 17:13, Bill Lorensen wrote:
        <br>
        <blockquote type="cite">I get the same error on my Ubuntu14.04
          build.
          <br>
          <br>
          On Wed, Nov 16, 2016 at 10:38 AM, Andrea Borsic
          <br>
          <a class="moz-txt-link-rfc2396E" href="mailto:aborsic@ne-scientific.com"><aborsic@ne-scientific.com></a> wrote:
          <br>
          <blockquote type="cite">Hi All,
            <br>
            <br>
            Apologies for the long hiatus, but I would like to
            understand why the crash
            <br>
            I and Elvis are experiencing is occurring. I am half
            convinced it could be a
            <br>
            bug in the numpy support functions, and wanted to share my
            knowledge so far
            <br>
            in order to hear any possible feedback.
            <br>
            <br>
            I am attaching a new Python script, which is simpler and
            self contained now.
            <br>
            The script builds a vtkUnstructuredGrid with a single
            tetrahedra and
            <br>
            displays it. The script does not crash under Windows, but
            crashes under
            <br>
            Ubuntu 16.04 / VTK 7.1RC2 / OpenGL2
            <br>
            <br>
            The dataset has only 4 points and the only cell of the
            dataset (a
            <br>
            tetrahedra) is described by the list of nodes [0,1,2,3] to
            which is
            <br>
            pre-pended a "4" to indicate that 4 points describe the
            cell, the cell data
            <br>
            is therefore [4,0,1,2,3]. The cell data is automatically
            converted from
            <br>
            numpy to vtk using the vtk numpy support functions.
            <br>
            <br>
            Printing the VTK converted cell_data (line 47) shows the
            output attached
            <br>
            below:
            <br>
            <br>
            In the output the MaxId is 4, but the number of tuples is 1,
            shouldn't the
            <br>
            MaxId therefore be 0 (the shape of the array is (1,5) )? Can
            this be the
            <br>
            source of the problem ?
            <br>
            <br>
            Similarly if a (2x5) numpy array is converted to vtk with
            <br>
            vtk_np.numpy_to_vtkIdTypeArray, the resulting array has a
            MaxId of 9, which
            <br>
            in my opininion should be 1. I will dig some more into the
            <br>
            vtk_np.numpy_to_vtkIdTypeArray function ...
            <br>
            <br>
            Thanks for any comment,
            <br>
            <br>
            Best Regards,
            <br>
            <br>
            Andrea
            <br>
            <br>
            <br>
            Printing cell data
            <br>
            vtkIdTypeArray (000002C3420E7BE0)
            <br>
               Debug: Off
            <br>
               Modified Time: 54
            <br>
               Reference Count: 1
            <br>
               Registered Events: (none)
            <br>
               Name: (none)
            <br>
               Data type: idtype
            <br>
               Size: 5
            <br>
               MaxId: 4
            <br>
               NumberOfComponents: 5
            <br>
               Information: 0000000000000000
            <br>
               Name: (none)
            <br>
               Number Of Components: 5
            <br>
               Number Of Tuples: 1
            <br>
               Size: 5
            <br>
               MaxId: 4
            <br>
               LookupTable: (none)
            <br>
               Array: 000002C342B0EA50
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            On 10/28/2016 4:39 PM, Andrea Borsic wrote:
            <br>
            <blockquote type="cite">Hi Elvis,
              <br>
              <br>
              Thanks for testing this. Actually I started out on Ubuntu
              with your Jumbo
              <br>
              VTK package, and is it was throwing this error, I switched
              to compiling from
              <br>
              source - with the same result.
              <br>
              <br>
              Cheers,
              <br>
              <br>
              Andrea
              <br>
              <br>
              <br>
              <br>
              <blockquote type="cite">I tested your example with the
                7.1.0.rc1 build we use at work (also
                <br>
                Ubuntu 16.04), and I also get an X error, though a
                slightly different
                <br>
                one:
                <br>
                <br>
                X Error of failed request:  BadMatch (invalid parameter
                attributes)
                <br>
                    Major opcode of failed request:  154 (GLX)
                <br>
                    Minor opcode of failed request:  11
                (X_GLXSwapBuffers)
                <br>
                    Serial number of failed request:  2141
                <br>
                    Current serial number in output stream:  2143
                <br>
                <br>
                I can confirm that commenting the interactor
                initialization/start, it
                <br>
                terminates OK.
                <br>
                <br>
                Haven't looked closer at what's happening, but just
                thought I should
                <br>
                share.
                <br>
                <br>
                For brevity, these are the flags we use when configuring
                our build:
                <br>
                <br>
                          -DCMAKE_INSTALL_PREFIX=/opt/VTK7 \
                <br>
                          -DVTK_Group_Qt=ON \
                <br>
                          -DVTK_QT_VERSION=5 \
                <br>
                          -DVTK_Group_Imaging=ON \
                <br>
                          -DVTK_Group_Views=ON \
                <br>
                          -DModule_vtkRenderingFreeTypeFontConfig=ON \
                <br>
                          -DVTK_WRAP_PYTHON=ON \
                <br>
                          -DVTK_PYTHON_VERSION=3 \
                <br>
                          -DPYTHON_EXECUTABLE=/usr/bin/python3 \
                <br>
                          -DPYTHON_INCLUDE_DIR=/usr/include/python3.5 \
                <br>
-DPYTHON_LIBRARY=/usr/lib/$(DEB_HOST_MULTIARCH)/libpython3.5m.so \
                <br>
                          -DBUILD_TESTING=OFF \
                <br>
                          -DVTK_USE_SYSTEM_LIBRARIES=ON \
                <br>
                          -DVTK_USE_SYSTEM_LIBPROJ4=OFF \
                <br>
                          -DVTK_USE_SYSTEM_GL2PS=OFF \
                <br>
                          -DCMAKE_BUILD_TYPE=Release
                <br>
                <br>
                Elvis
                <br>
                <br>
                <blockquote type="cite">Best Regards,
                  <br>
                  <br>
                  Andrea
                  <br>
                  <br>
                  <br>
                  <br>
                  On 27/10/2016 23:25, Ken Martin wrote:
                  <br>
                  <br>
                  Hmm, well that means VTK's rendering engine is
                  initializing OK and
                  <br>
                  running.
                  <br>
                  So it could be something specific to the python app.
                  If you run some of
                  <br>
                  the
                  <br>
                  python tests do they work? ala
                  <br>
                  <br>
                  ctest -R Python -I ,,23
                  <br>
                  <br>
                  thats runs 1/23rd of the python tests
                  <br>
                  <br>
                  if those all pass then it must be something specific
                  to your script
                  <br>
                  <br>
                  <br>
                  <br>
                  On Thu, Oct 27, 2016 at 5:16 PM, Andrea Borsic
                  <br>
                  <a class="moz-txt-link-rfc2396E" href="mailto:aborsic@ne-scientific.com"><aborsic@ne-scientific.com></a>
                  <br>
                  wrote:
                  <br>
                  <blockquote type="cite">Hi Ken,
                    <br>
                    <br>
                    The test seems to run fine, I am attaching below the
                    output.
                    <br>
                    <br>
                    Best Regards,
                    <br>
                    <br>
                    Andrea
                    <br>
                    <br>
                    <br>
                    -----------------------
                    <br>
                    <br>
                    <a class="moz-txt-link-abbreviated" href="mailto:andrea@i7-Desktop:/opt/VTK-7.1.0.rc1-bin$">andrea@i7-Desktop:/opt/VTK-7.1.0.rc1-bin$</a> sudo ctest
                    -R VBOPLY -VV
                    <br>
                    UpdateCTestConfiguration  from
                    <br>
                    :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl
                    <br>
                    Parse Config
                    <a class="moz-txt-link-freetext" href="file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl">file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl</a>
                    <br>
                       Add coverage exclude regular expressions.
                    <br>
                       Add coverage exclude: vtk.*TCLInit.cxx
                    <br>
                       Add coverage exclude:
                    vtk[^\.]+(Java|Python|Tcl).cxx
                    <br>
                       Add coverage exclude: .*vtkOpenGLState.*
                    <br>
                       Add coverage exclude: .*Testing.Cxx.*cxx
                    <br>
                       Add coverage exclude: .*Testing.Cxx.*h
                    <br>
                       Add coverage exclude: .*moc_.*cxx
                    <br>
                       Add coverage exclude: .*/Rendering/OpenGL/vtkgl.*
                    <br>
                       Add coverage exclude: .*/Utilities/.*
                    <br>
                       Add coverage exclude: .*/ThirdParty/.*
                    <br>
                       Add coverage exclude: .*vtkOpenGLPolyDataMapper.*
                    <br>
                    SetCTestConfiguration:CMakeCommand:/usr/bin/cmake
                    <br>
                    UpdateCTestConfiguration  from
                    <br>
                    :/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl
                    <br>
                    Parse Config
                    <a class="moz-txt-link-freetext" href="file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl">file:/opt/VTK-7.1.0.rc1-bin/DartConfiguration.tcl</a>
                    <br>
                    Test project /opt/VTK-7.1.0.rc1-bin
                    <br>
                    Constructing a list of tests
                    <br>
                    Done constructing a list of tests
                    <br>
                    Checking test dependency graph...
                    <br>
                    Checking test dependency graph end
                    <br>
                    test 1551
                    <br>
                          Start 1551:
                    vtkRenderingOpenGL2Cxx-TestVBOPLYMapper
                    <br>
                    <br>
                    1551: Test command:
                    <br>
/opt/VTK-7.1.0.rc1-bin/bin/vtkRenderingOpenGL2CxxTests
                    <br>
                    "TestVBOPLYMapper" "-D"
                    "/opt/VTK-7.1.0.rc1-bin/ExternalData//Testing"
                    <br>
                    "-T"
                    <br>
                    "/opt/VTK-7.1.0.rc1-bin/Testing/Temporary" "-V"
                    <br>
                    <br>
"/opt/VTK-7.1.0.rc1-bin/ExternalData/Rendering/OpenGL2/Testing/Data/Baseline/TestVBOPLYMapper.png"
                    <br>
                    1551: Test timeout computed to be: 3600
                    <br>
                    1551: first render time: 0.132993
                    <br>
                    1551: opengl version 4.5
                    <br>
                    1551: interactive render time: 0.0166377
                    <br>
                    1551: number of triangles: 871414
                    <br>
                    1551: triangles per second: 5.2376e+07
                    <br>
                    1551: <DartMeasurement name="ImageError"
                    <br>
type="numeric/double">0</DartMeasurement><DartMeasurement
                    <br>
                    name="BaselineImage"
                    <br>
type="text/string">Standard</DartMeasurement><DartMeasurement
                    <br>
                    name="WallTime"
                    type="numeric/double">0.059715</DartMeasurement>
                    <br>
                    1551: <DartMeasurement name="CPUTime"
                    <br>
type="numeric/double">0.037073</DartMeasurement>
                    <br>
                    1/1 Test #1551:
                    vtkRenderingOpenGL2Cxx-TestVBOPLYMapper ...   Passed
                    <br>
                    0.91 sec
                    <br>
                    <br>
                    The following tests passed:
                    <br>
                          vtkRenderingOpenGL2Cxx-TestVBOPLYMapper
                    <br>
                    <br>
                    100% tests passed, 0 tests failed out of 1
                    <br>
                    <br>
                    Label Time Summary:
                    <br>
                    vtkRenderingOpenGL2    =   0.91 sec (1 test)
                    <br>
                    <br>
                    Total Test time (real) =   0.97 sec
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    On 27/10/2016 18:56, Ken Martin wrote:
                    <br>
                    <br>
                    Can you try running ctest -R VBOPLY -VV and let us
                    know the output?
                    <br>
                    <br>
                    On Thu, Oct 27, 2016 at 12:46 PM, Andrea Borsic
                    <br>
                    <a class="moz-txt-link-rfc2396E" href="mailto:aborsic@ne-scientific.com"><aborsic@ne-scientific.com></a> wrote:
                    <br>
                    <blockquote type="cite">Dear All,
                      <br>
                      <br>
                      I have successfully compiled VTK 7.0.0  under
                      Ubuntu 16.04.1 LTS on a
                      <br>
                      computer with the following hw configuration:
                      <br>
                      <br>
                      Processor: Intel Core i7
                      <br>
                      <br>
                      GPU: NVIDIA GTX Titan Black
                      <br>
                      <br>
                      ---
                      <br>
                      <br>
                      VTK has been configured for:
                      <br>
                      <br>
                      OpenGL 2 back-end
                      <br>
                      <br>
                      Use Qt 5.7
                      <br>
                      <br>
                      Use OpenMP for SMP
                      <br>
                      <br>
                      Wrap Python 3 (ver 3.5.2 on the system)
                      <br>
                      <br>
                      ---
                      <br>
                      <br>
                      A simple python script which displays an
                      unstructured grid and which
                      <br>
                      works fine under Windows, opens (under Ubuntu) a
                      rendering window and
                      <br>
                      crashes with the message below:
                      <br>
                      <br>
                      X Error of failed request:  GLXBadDrawable
                      <br>
                          Major opcode of failed request:  154 (GLX)
                      <br>
                          Minor opcode of failed request:  11
                      (X_GLXSwapBuffers)
                      <br>
                          Serial number of failed request:  111
                      <br>
                          Current serial number in output stream:  111
                      <br>
                      <br>
                      <br>
                      Do you have any hint about this? Should I try the
                      RC 7.1 or switch to
                      <br>
                      the
                      <br>
                      plain OpenGL back-end ?
                      <br>
                      <br>
                      Thanks in advance for any suggestion,
                      <br>
                      <br>
                      Best Regards,
                      <br>
                      <br>
                      Andrea
                      <br>
                      <br>
                      _______________________________________________
                      <br>
                      Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
                      <br>
                      <br>
                      Visit other Kitware open-source projects at
                      <br>
                      <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
                      <br>
                      <br>
                      Please keep messages on-topic and check the VTK
                      FAQ at:
                      <br>
                      <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
                      <br>
                      <br>
                      Search the list archives at:
                      <a class="moz-txt-link-freetext" href="http://markmail.org/search/?q=vtkusers">http://markmail.org/search/?q=vtkusers</a>
                      <br>
                      <br>
                      Follow this link to subscribe/unsubscribe:
                      <br>
<a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</a>
                      <br>
                    </blockquote>
                    <br>
                    <br>
                    <br>
                    -- <br>
                    Ken Martin PhD
                    <br>
                    Chairman & CFO
                    <br>
                    Kitware Inc.
                    <br>
                    28 Corporate Drive
                    <br>
                    Clifton Park NY 12065
                    <br>
                    518 371 3971
                    <br>
                    <br>
                    This communication, including all attachments,
                    contains confidential
                    <br>
                    and
                    <br>
                    legally privileged information, and it is intended
                    only for the use of
                    <br>
                    the
                    <br>
                    addressee.  Access to this email by anyone else is
                    unauthorized. If you
                    <br>
                    are
                    <br>
                    not the intended recipient, any disclosure, copying,
                    distribution or
                    <br>
                    any
                    <br>
                    action taken in reliance on it is prohibited and may
                    be unlawful. If
                    <br>
                    you
                    <br>
                    received this communication in error please notify
                    us immediately and
                    <br>
                    destroy the original message.  Thank you.
                    <br>
                    <br>
                    <br>
                  </blockquote>
                  <br>
                  -- <br>
                  Ken Martin PhD
                  <br>
                  Chairman & CFO
                  <br>
                  Kitware Inc.
                  <br>
                  28 Corporate Drive
                  <br>
                  Clifton Park NY 12065
                  <br>
                  518 371 3971
                  <br>
                  <br>
                  This communication, including all attachments,
                  contains confidential and
                  <br>
                  legally privileged information, and it is intended
                  only for the use of
                  <br>
                  the
                  <br>
                  addressee.  Access to this email by anyone else is
                  unauthorized. If you
                  <br>
                  are
                  <br>
                  not the intended recipient, any disclosure, copying,
                  distribution or any
                  <br>
                  action taken in reliance on it is prohibited and may
                  be unlawful. If you
                  <br>
                  received this communication in error please notify us
                  immediately and
                  <br>
                  destroy the original message.  Thank you.
                  <br>
                  <br>
                  <br>
                  <br>
                  _______________________________________________
                  <br>
                  Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
                  <br>
                  <br>
                  Visit other Kitware open-source projects at
                  <br>
                  <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
                  <br>
                  <br>
                  Please keep messages on-topic and check the VTK FAQ
                  at:
                  <br>
                  <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
                  <br>
                  <br>
                  Search the list archives at:
                  <a class="moz-txt-link-freetext" href="http://markmail.org/search/?q=vtkusers">http://markmail.org/search/?q=vtkusers</a>
                  <br>
                  <br>
                  Follow this link to subscribe/unsubscribe:
                  <br>
                  <a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</a>
                  <br>
                  <br>
                </blockquote>
              </blockquote>
              _______________________________________________
              <br>
              Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
              <br>
              <br>
              Visit other Kitware open-source projects at
              <br>
              <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
              <br>
              <br>
              Please keep messages on-topic and check the VTK FAQ at:
              <br>
              <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
              <br>
              <br>
              Search the list archives at:
              <a class="moz-txt-link-freetext" href="http://markmail.org/search/?q=vtkusers">http://markmail.org/search/?q=vtkusers</a>
              <br>
              <br>
              Follow this link to subscribe/unsubscribe:
              <br>
              <a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</a>
              <br>
            </blockquote>
            <br>
            <br>
            _______________________________________________
            <br>
            Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
            <br>
            <br>
            Visit other Kitware open-source projects at
            <br>
            <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
            <br>
            <br>
            Please keep messages on-topic and check the VTK FAQ at:
            <br>
            <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
            <br>
            <br>
            Search the list archives at:
            <a class="moz-txt-link-freetext" href="http://markmail.org/search/?q=vtkusers">http://markmail.org/search/?q=vtkusers</a>
            <br>
            <br>
            Follow this link to subscribe/unsubscribe:
            <br>
            <a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</a>
            <br>
            <br>
          </blockquote>
          <br>
          <br>
        </blockquote>
        <br>
        _______________________________________________
        <br>
        Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
        <br>
        <br>
        Visit other Kitware open-source projects at
        <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
        <br>
        <br>
        Please keep messages on-topic and check the VTK FAQ at:
        <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
        <br>
        <br>
        Search the list archives at:
        <a class="moz-txt-link-freetext" href="http://markmail.org/search/?q=vtkusers">http://markmail.org/search/?q=vtkusers</a>
        <br>
        <br>
        Follow this link to subscribe/unsubscribe:
        <br>
        <a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</a>
        <br>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the VTK FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>

Search the list archives at: <a class="moz-txt-link-freetext" href="http://markmail.org/search/?q=vtkusers">http://markmail.org/search/?q=vtkusers</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>