<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:x="urn:schemas-microsoft-com:office:excel" 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 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 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";}
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;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</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-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>We have been developing an interface which allows us to
control our simulations on the fly and have used a Qtimer in a custom panel, to
query when new data is available from the server. When data is ready we<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>when the timer is triggered and the server reports that data
is ready, we do a number of bookkepping taks, and then update the pipeline/representation
and other stuff using server manager objects like so...<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:8.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span style='color:maroon'>this</span><span
style='color:olive'>-&gt;</span><span style='color:green'>Reader</span><span
style='color:olive'>-&gt;</span><span style='color:green'>InvokeCommand</span><span
style='color:olive'>(</span><span style='color:blue'>&quot;Modified&quot;</span><span
style='color:olive'>);</span></span></b><span style='font-size:8.0pt;
font-family:"Courier New";color:olive'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:8.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span style='color:maroon'>this</span><span
style='color:olive'>-&gt;</span><span style='color:green'>Reader</span><span
style='color:olive'>-&gt;</span><span style='color:green'>UpdatePropertyInformation</span><span
style='color:olive'>();</span></span></b><span style='font-size:8.0pt;
font-family:"Courier New";color:olive'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:8.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span style='color:maroon'>this</span><span
style='color:olive'>-&gt;</span><span style='color:green'>Reader</span><span
style='color:olive'>-&gt;</span><span style='color:green'>UpdateVTKObjects</span><span
style='color:olive'>();</span></span></b><span style='font-size:8.0pt;
font-family:"Courier New";color:olive'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:8.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span style='color:maroon'>this</span><span
style='color:olive'>-&gt;</span><span style='color:green'>Reader</span><span
style='color:olive'>-&gt;</span><span style='color:green'>UpdatePipeline</span><span
style='color:olive'>();</span></span></b><span style='font-size:8.0pt;
font-family:"Courier New";color:olive'><o:p></o:p></span></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>and finally after more stuff ... trigger a render ...<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span style='font-size:8.0pt'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:8.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span style='color:maroon'>if</span>
<span style='color:olive'>(</span><span style='color:green'>pqActiveObjects</span><span
style='color:olive'>::</span><span style='color:green'>instance</span><span
style='color:olive'>().</span><span style='color:green'>activeView</span><span
style='color:olive'>())</span></span></b><span style='font-size:8.0pt;
font-family:"Courier New";color:olive'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:8.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span style='color:olive'>{</span></span></b><span
style='font-size:8.0pt;font-family:"Courier New";color:olive'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:8.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span
style='color:green'>pqActiveObjects</span><span style='color:olive'>::</span><span
style='color:green'>instance</span><span style='color:olive'>().</span><span
style='color:green'>activeView</span><span style='color:olive'>()-&gt;</span><span
style='color:green'>render</span><span style='color:olive'>();</span></span></b><span
style='font-size:8.0pt;font-family:"Courier New";color:olive'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:8.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span style='color:olive'>}</span></span></b><span
style='font-size:8.0pt;font-family:"Courier New";color:olive'><o:p></o:p></span></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>This has been working fine for some months, but recently, we&#8217;ve
been getting strange errors which look like the paraview client is interacting
with the server manager, at the same time as we are triggering updates. A
classic threading type problem. [We have added another thread to pvserver which
accepts data from the simulation via its own socket communicator, this appears
stable as we can do much stuff without forcing updates in the pvclient gui and
we get no errors, these threads reside only inside pvserver ]<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Within a Qt+ParaView framework, can anyone tell me if it is &#8220;safe&#8221;
to <i>Update pipelines</i> from the server manager within a timer triggered
slot. Is there an existing example of anything similar which updates server
manager objects from a timer &#8211; also forcing renders. I know that rendering
should be triggered from the gui thread only &#8211; should this be removed
from the Qtimer slot.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Any feedback welcome.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Thanks<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>JB<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:Consolas'>--
<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:Consolas'>John
Biddiscombe,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
email:biddisco @ cscs.ch<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:Consolas'><a
href="http://www.cscs.ch/"><span style='color:blue'>http://www.cscs.ch/</span></a><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:Consolas'>CSCS,
Swiss National Supercomputing Centre&nbsp; | Tel:&nbsp; +41 (91) 610.82.07<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:Consolas'>Via
Cantonale, 6928 Manno, Switzerland&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Fax:&nbsp;
+41 (91) 610.82.82<o:p></o:p></span></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>