<p dir="ltr">I'm on my way home now, but have you tried running your simplified test under gdb or valgrind to pinpoint the crash?</p>
<p dir="ltr">Elvis<br>
</p>
<div class="gmail_extra"><br><div class="gmail_quote">Den 16 nov. 2016 6:01 em skrev "Andrea Borsic" <<a href="mailto:aborsic@ne-scientific.com">aborsic@ne-scientific.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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 class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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 class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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 href="mailto:aborsic@ne-scientific.com" target="_blank">aborsic@ne-scientific.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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<wbr>, 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 class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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 class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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/VT<wbr>K7 \<br>
          -DVTK_Group_Qt=ON \<br>
          -DVTK_QT_VERSION=5 \<br>
          -DVTK_Group_Imaging=ON \<br>
          -DVTK_Group_Views=ON \<br>
          -DModule_vtkRenderingFreeTypeF<wbr>ontConfig=ON \<br>
          -DVTK_WRAP_PYTHON=ON \<br>
          -DVTK_PYTHON_VERSION=3 \<br>
          -DPYTHON_EXECUTABLE=/usr/bin/p<wbr>ython3 \<br>
          -DPYTHON_INCLUDE_DIR=/usr/incl<wbr>ude/python3.5 \<br>
-DPYTHON_LIBRARY=/usr/lib/$(DE<wbr>B_HOST_MULTIARCH)/<a href="http://libpython3.5m.so" rel="noreferrer" target="_blank">libpython3.<wbr>5m.so</a> \<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 class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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 href="mailto:aborsic@ne-scientific.com" target="_blank">aborsic@ne-scientific.com</a>><br>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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>
andrea@i7-Desktop:/opt/VTK-7.1<wbr>.0.rc1-bin$ sudo ctest -R VBOPLY -VV<br>
UpdateCTestConfiguration  from<br>
:/opt/VTK-7.1.0.rc1-bin/DartCo<wbr>nfiguration.tcl<br>
Parse Config file:/opt/VTK-7.1.0.rc1-bin/Da<wbr>rtConfiguration.tcl<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:CMakeCom<wbr>mand:/usr/bin/cmake<br>
UpdateCTestConfiguration  from<br>
:/opt/VTK-7.1.0.rc1-bin/DartCo<wbr>nfiguration.tcl<br>
Parse Config file:/opt/VTK-7.1.0.rc1-bin/Da<wbr>rtConfiguration.tcl<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-TestVBO<wbr>PLYMapper<br>
<br>
1551: Test command:<br>
/opt/VTK-7.1.0.rc1-bin/bin/vtk<wbr>RenderingOpenGL2CxxTests<br>
"TestVBOPLYMapper" "-D" "/opt/VTK-7.1.0.rc1-bin/Extern<wbr>alData//Testing"<br>
"-T"<br>
"/opt/VTK-7.1.0.rc1-bin/Testin<wbr>g/Temporary" "-V"<br>
<br>
"/opt/VTK-7.1.0.rc1-bin/Extern<wbr>alData/Rendering/OpenGL2/<wbr>Testing/Data/Baseline/TestVBOP<wbr>LYMapper.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</DartM<wbr>easurement><DartMeasurement<br>
name="BaselineImage"<br>
type="text/string">Standard</D<wbr>artMeasurement><DartMeasuremen<wbr>t<br>
name="WallTime" type="numeric/double">0.059715<wbr></DartMeasurement><br>
1551: <DartMeasurement name="CPUTime"<br>
type="numeric/double">0.037073<wbr></DartMeasurement><br>
1/1 Test #1551: vtkRenderingOpenGL2Cxx-TestVBO<wbr>PLYMapper ...   Passed<br>
0.91 sec<br>
<br>
The following tests passed:<br>
      vtkRenderingOpenGL2Cxx-TestVBO<wbr>PLYMapper<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 href="mailto:aborsic@ne-scientific.com" target="_blank">aborsic@ne-scientific.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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>
______________________________<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<br>
<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>
Please keep messages on-topic and check the VTK FAQ at:<br>
<a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/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>
<a href="tel:518%20371%203971" value="+15183713971" target="_blank">518 371 3971</a><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>
<a href="tel:518%20371%203971" value="+15183713971" target="_blank">518 371 3971</a><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>
______________________________<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<br>
<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>
Please keep messages on-topic and check the VTK FAQ at:<br>
<a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtkusers</a><br>
<br>
</blockquote></blockquote>
______________________________<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<br>
<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>
Please keep messages on-topic and check the VTK FAQ at:<br>
<a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtkusers</a><br>
</blockquote>
<br>
<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<br>
<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>
Please keep messages on-topic and check the VTK FAQ at:<br>
<a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtkusers</a><br>
<br>
</blockquote>
<br>
<br>
</blockquote>
<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>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtkusers</a><br>
</blockquote>
<br>
<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>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
<br></blockquote></div></div>