<div dir="ltr">Hi,<div><br></div><div>Sdk produces this dump, cannot really figure out the reason? Or what backtrace you mean?</div><div><br></div><div>-Samuli</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014-08-13 21:50 GMT+03:00 Andrey Kozhevnikov <span dir="ltr"><<a href="mailto:coderusinbox@gmail.com" target="_blank">coderusinbox@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
try to get backtrace and check what exactly is the reason of crash.<br>
<br>
<div>14.08.2014 00:49, Samuli Silvius пишет:<br>
</div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I have Canvas in Silica Dialog page but app crashes when
leaving dialog page both with accept or cancel swipe. It does
not crash always just quite often.</div>
<div><br>
</div>
<div>the code:</div>
<div>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">Canvas</span><span style="color:rgb(192,192,192)"> </span>{</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">id</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(0,0,0)">imageCanvas</span></font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">visible</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(0,0,0)">isImageUrl</span></font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">width</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(0,0,0)">imgLoader</span>.sourceSize.width</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">height</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(0,0,0)">imgLoader</span>.sourceSize.height</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">renderStrategy</span>:<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">Canvas</span>.Immediate</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">onPaint</span>:<span style="color:rgb(192,192,192)"> </span>{</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">var</span><span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(41,133,199)">ctx</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(0,0,0)">getContext</span>(<span style="color:rgb(0,128,0)">"2d"</span>)</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(41,133,199)">ctx</span>.drawImage(<span style="font-style:italic;color:rgb(0,0,0)">imgLoader</span>,<span style="color:rgb(192,192,192)"> </span>0,<span style="color:rgb(192,192,192)"> </span>0)</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"> }</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(192,192,192)"> </span>}
</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">Image</span><span style="color:rgb(192,192,192)"> </span>{</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">id</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(0,0,0)">imgLoader</span></font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">visible</span>:<span style="color:rgb(192,192,192)"> false</span></font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">source</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(0,0,0)">isImageUrl</span><span style="color:rgb(192,192,192)"> </span>?<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(0,0,0)">url</span><span style="color:rgb(192,192,192)"> </span>:<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">""</span></font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="courier new, monospace"><span style="color:rgb(192,192,192)"> </span>}</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"></pre>
</div>
<div>The idea is to save image to the gallery in <span style="color:rgb(128,0,0)">onAccepted</span> if user has
selected that option as Canvas has save method which can be
used to save image to a file.</div>
<div><br>
</div>
<div>And it works fine, but causing app to crash sometimes when
leaving Dialog page with cancel swipe. SDK outputs a long
crash dump.</div>
<div><br>
</div>
<div>-Samuli</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a></pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br></blockquote></div><br></div>