<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-AU" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">I have used the bootstrap method to build cctbx with my own Python (in a virtual environment). I setup my virtual environment, then source $CCTBX/build/setpaths.sh (bash).<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I am currently trying to turn a detector image (uint16) read in with fabio, which results in a numpy ndarray, and then turn that into a scitbx flex array. Since I&#8217;ve had problems doing this in my system, I&#8217;ve written a little script that
 reproduces the problem:<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">**********<o:p></o:p></p>
<p class="MsoNormal">import fabio<o:p></o:p></p>
<p class="MsoNormal">file=fabio.open('testcrystal_1_001.img') # adsc detector image<o:p></o:p></p>
<p class="MsoNormal">file.data[0]<o:p></o:p></p>
<p class="MsoNormal">from scitbx.array_family import flex<o:p></o:p></p>
<p class="MsoNormal">flex.int(file.data[3071]) # this is a 3072x3072 image. For some reason, row 0 causes no problems.<o:p></o:p></p>
<p class="MsoNormal">**********<o:p></o:p></p>
<p class="MsoNormal">At the end of this email is the stack trace I get.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Has anybody had similar issues? I first saw this when I was trying to convert the entire image into a flex array, but now I&#8217;ve seen it with only one row [3071], while still working for [0:1500], so it doesn&#8217;t seem like a simple memory issue.
 Any help would be appreciated.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Jun Aishima<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">**********<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">show_stack(1): &lt;stdin&gt;(1) &lt;module&gt;<o:p></o:p></p>
<p class="MsoNormal">libc backtrace (23 frames, most recent call last):<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /home/aishimaj/spotter/bin/python() [0x414199]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /lib64/libc.so.6(__libc_start_main&#43;0xfd) [0x366d21ed5d]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /home/aishimaj/spotter/bin/python(Py_Main&#43;0xb22) [0x4150b2]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /home/aishimaj/spotter/bin/python(PyRun_AnyFileExFlags&#43;0x6b) [0x4ce82b]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /home/aishimaj/spotter/bin/python(PyRun_InteractiveLoopFlags&#43;0x4e) [0x4ce01e]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /home/aishimaj/spotter/bin/python(PyRun_InteractiveOneFlags&#43;0x1ff) [0x4cdd9f]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /home/aishimaj/spotter/bin/python(PyEval_EvalCode&#43;0x32) [0x4ad362]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /home/aishimaj/spotter/bin/python(PyEval_EvalCodeEx&#43;0x877) [0x4ad257]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /home/aishimaj/spotter/bin/python(PyEval_EvalFrameEx&#43;0x6a0b) [0x4aa8bb]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /home/aishimaj/spotter/bin/python(PyObject_Call&#43;0x47) [0x419ba7]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /home/aishimaj/spotter/bin/python() [0x46df9f]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /home/aishimaj/spotter/bin/python() [0x47623f]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /home/aishimaj/spotter/bin/python(PyObject_Call&#43;0x47) [0x419ba7]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /home/aishimaj/spotter/bin/python() [0x42296f]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /home/aishimaj/spotter/bin/python(PyObject_Call&#43;0x47) [0x419ba7]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /beamline/phenix/bootstrap/build/lib/libboost_python.so(&#43;0x2d088) [0x7f5561101088]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /beamline/phenix/bootstrap/build/lib/libboost_python.so(boost::python::handle_exception_impl(boost::function0&lt;void&gt;)&#43;0x43) [0x7f5561112013]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /beamline/phenix/bootstrap/build/lib/libboost_python.so(&#43;0x2fe08) [0x7f5561103e08]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /beamline/phenix/bootstrap/build/lib/libboost_python.so(boost::python::objects::function::call(_object*, _object*) const&#43;0xef) [0x7f55611031ff]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /beamline/phenix/bootstrap/build/lib/scitbx_array_family_flex_ext.so(boost::python::objects::signature_py_function_impl&lt;boost::python::detail::caller&lt;scitbx::af::versa&lt;int, scitbx::af::flex_grid&lt;scitbx::af::small&lt;long, 10ul&gt; &gt; &gt;* (*)(boost::python::numeric::array
 const&amp;), boost::python::detail::constructor_policy&lt;boost::python::default_call_policies&gt;, boost::mpl::vector2&lt;scitbx::af::versa&lt;int, scitbx::af::flex_grid&lt;scitbx::af::small&lt;long, 10ul&gt; &gt; &gt;*, boost::python::numeric::array const&amp;&gt; &gt;, boost::mpl::v_item&lt;void,
 boost::mpl::v_item&lt;boost::python::api::object, boost::mpl::v_mask&lt;boost::mpl::vector2&lt;scitbx::af::versa&lt;int, scitbx::af::flex_grid&lt;scitbx::af::small&lt;long, 10ul&gt; &gt; &gt;*, boost::python::numeric::array const&amp;&gt;, 1&gt;, 1&gt;, 1&gt; &gt;::operator()(_object*, _object*)&#43;0x52)
 [0x7f555ed68452]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /beamline/phenix/bootstrap/build/lib/scitbx_array_family_flex_ext.so(scitbx::af::boost_python::flex_int_from_numpy_array(boost::python::numeric::array const&amp;)&#43;0x29) [0x7f555f039f79]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /beamline/phenix/bootstrap/build/lib/scitbx_array_family_flex_ext.so(scitbx::af::versa&lt;int, scitbx::af::flex_grid&lt;scitbx::af::small&lt;long, 10ul&gt; &gt; &gt; scitbx::af::boost_python::versa_flex_from_numpy_array&lt;int&gt;(boost::python::numeric::array
 const&amp;)&#43;0x1c87) [0x7f555f0415c7]<o:p></o:p></p>
<p class="MsoNormal">&nbsp; /lib64/libc.so.6() [0x366d2326a0]<o:p></o:p></p>
<p class="MsoNormal">Segmentation fault (Python and libc call stacks above)<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;This crash may be due to a problem in any imported<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Python module, including modules which are not part<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of the cctbx project. To disable the traps leading<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to this message, define these environment variables<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (e.g. assign the value 1):<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BOOST_ADAPTBX_FPE_DEFAULT<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BOOST_ADAPTBX_SIGNALS_DEFAULT<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This will NOT solve the problem, just mask it, but<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; may allow you to proceed in case it is not critical.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><b><span style="font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#7F7F7F;mso-fareast-language:EN-AU">Jun Aishima | Post Doc - MX | Australian Synchrotron
<br>
</span></b><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#7F7F7F;mso-fareast-language:EN-AU">p: (03) 8540 4114&nbsp;| f: (03) 8540 4200
<br>
<a href="mailto:jun.aishima@synchrotron.org.au"><span style="color:#7F7F7F;text-decoration:none">jun.aishima@synchrotron.org.au</span></a> |
<a href="www.synchrotron.org.au"><span style="color:#7F7F7F;text-decoration:none">www.synchrotron.org.au</span></a><br>
800 Blackburn Road, Clayton, Victoria 3168</span><span style="mso-fareast-language:EN-AU"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>