<div dir="ltr">Hi Marcus,<div><br></div><div>thank you for your report! Please send us the link to the wiki page of your project. If you haven't yet set it up, please do it right away. It is very important for taking track of the progresses of your work. Thank you and happy hacking!</div><div><br></div><div>Margherita</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 29, 2015 at 9:53 PM, Marcus Santos <span dir="ltr"><<a href="mailto:mvcs@me.com" target="_blank">mvcs@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><p style="border:0px;font-family:Lato,sans-serif;margin:0px 0px 1.7em;outline:0px;padding:0px;vertical-align:baseline;color:rgb(68,68,68);line-height:30px"><span style="font-size:14px"><strong style="border:0px;font-family:inherit;font-style:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline">What do I have completed this week?</strong><br></span></p><ul style="border:0px;font-family:Lato,sans-serif;margin:0px 0px 1.7em 3em;outline:0px;padding:0px;vertical-align:baseline;list-style-position:initial;color:rgb(68,68,68);line-height:30px"><li style="border:0px;font-family:inherit;font-style:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline"><span style="font-size:14px">New implementation of the <em style="border:0px;font-family:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline">AlgorithmExecutor</em> subclassing QObject. </span></li><li style="border:0px;font-family:inherit;font-style:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline"><span style="font-size:14px">Mechanism to deal with crashing Algorithms: when there is an exception during the algorithm execution, a signal is emitted in order to allow the main thread to make the other thread quit.</span></li><li style="border:0px;font-family:inherit;font-style:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline"><span style="font-size:14px">Use signal to connect the algorithm progress signal to the setPercentage slot in the ProgressBar</span></li></ul><p align="justify" style="border:0px;font-family:Lato,sans-serif;margin:0px 0px 1.7em;outline:0px;padding:0px;vertical-align:baseline;color:rgb(68,68,68);line-height:30px"><span style="font-size:14px">In the runAlgorithm method of the <em style="border:0px;font-family:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline">Processing</em> class I changed the code associated with the runalg in order to support multithreading. Each time that an algorithm is running through the QGIS python console, a new thread and a new instance of the algorithm executor are created. The signals of the AlgorithmExecutor are connected to the thread signal in order to quit the thread and run the algorithm when the thread starts. While the algorithm is running, the main thread waits for the algorithm to finish and then proceed to show the output (first approach).</span></p><p style="border:0px;font-family:Lato,sans-serif;margin:0px 0px 1.7em;outline:0px;padding:0px;vertical-align:baseline;color:rgb(68,68,68);line-height:30px"><span style="font-size:14px"><strong style="border:0px;font-family:inherit;font-style:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline">What am I going to achieve for the next week?</strong><br></span></p><p align="justify" style="border:0px;margin:0px 0px 1.7em;outline:0px;padding:0px;vertical-align:baseline"></p><ul><li style="color:rgb(68,68,68);font-family:Lato,sans-serif;line-height:30px"><span style="font-size:14px">Create a non-blocking version of the processing in order to make the interface not wait for the algorithm to finish.</span></li><li style="color:rgb(68,68,68);font-family:Lato,sans-serif;line-height:30px"><span style="font-size:14px">Solve the crash when starting the new thread.</span></li></ul><p></p><p style="border:0px;font-family:Lato,sans-serif;margin:0px 0px 1.7em;outline:0px;padding:0px;vertical-align:baseline;color:rgb(68,68,68);line-height:30px"><span style="font-size:14px"><strong style="border:0px;font-family:inherit;font-style:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline">Is there any blocking issue?</strong><br></span></p><p align="justify" style="border:0px;font-family:Lato,sans-serif;margin:0px 0px 1.7em;outline:0px;padding:0px;vertical-align:baseline;color:rgb(68,68,68);line-height:30px"><span style="font-size:14px">QGIS seems to crash randomly when starting the new thread and, when it doesn’t crash, the output of the algorithm is None, which may indicate that the algorithm is crashing in the new thread.</span></p></div><br>_______________________________________________<br>
SoC mailing list<br>
<a href="mailto:SoC@lists.osgeo.org">SoC@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/soc" target="_blank">http://lists.osgeo.org/mailman/listinfo/soc</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><font color="#666666">Best regards,</font></div><div><font color="#666666"><br></font></div><div><font color="#666666">Dr. Margherita DI LEO </font></div><div><span style="color:rgb(102,102,102);font-family:arial;font-size:small">Scientific / technical project officer</span><br></div><div><font color="#666666"><br></font></div><div><font color="#666666">European Commission - DG JRC </font></div><div><font color="#666666">Institute for Environment and Sustainability (IES)</font></div><div><font color="#666666">Via Fermi, 2749</font></div><div><font color="#666666">I-21027 Ispra (VA) - Italy - TP 261</font></div><div><font color="#666666"> </font></div><div><font color="#666666">Tel. +39 0332 78 3600 </font></div><div><font color="#666666"><a href="mailto:margherita.di-leo@jrc.ec.europa.eu" target="_blank">margherita.di-leo@jrc.ec.europa.eu</a></font></div><div><font color="#666666"><br></font></div><div><font color="#666666">Disclaimer: The views expressed are purely those of the writer and may not in any circumstance be regarded as stating an official position of the European Commission.</font></div></div></div>
</div>