<div dir="ltr">I can&#39;t reproduce issue with missing update/write callbacks call here, this all works just fine here by the looks of it. Also not sure why would commenting buffers deletion make things work to you. Either you&#39;re referencing buffers in the callback or maybe it is related to the next issue.<div><br></div><div>Bet you&#39;ve got default start resolution of 64 in the settings. This makes it so frame first renders with lower resolution and then goes to a final resolutions. This for sure causes number of tiles to be changed, which is not supported by progressive refine in the background mode.</div><div><br></div><div>Surely we can add some checks in the session constructor to verify the settings, but for until then just manually control the settings on your side.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 19, 2015 at 3:21 AM, Mohamed Sakr <span dir="ltr">&lt;<a href="mailto:3dsakr@gmail.com" target="_blank">3dsakr@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>    I&#39;m creating a render engine based on Cycles, right now everything is fine except that the function callbacks &quot;<font color="#4b4d51" face="Segoe UI, Segoe UI Web Regular, Segoe UI Symbol, Helvetica Neue, Helvetica, Arial, sans-serif"><span style="line-height:16.0030002593994px">write_render_tile_cb, update_render_tile_cb&quot; and variables &quot;progressive, progressive_refine&quot; are making a problem!!</span></font><br><br><font color="#4b4d51" face="Segoe UI, Segoe UI Web Regular, Segoe UI Symbol, Helvetica Neue, Helvetica, Arial, sans-serif"><span style="line-height:16.0030002593994px">the problem is:</span></font><br><font color="#4b4d51" face="Segoe UI, Segoe UI Web Regular, Segoe UI Symbol, Helvetica Neue, Helvetica, Arial, sans-serif"><span style="line-height:16.0030002593994px">case (1):<br></span></font><div><div><span style="white-space:pre-wrap">        </span>options.session_params.progressive = true;</div><div><span style="white-space:pre-wrap">        </span>options.session_params.progressive_refine = true;</div><div><span style="white-space:pre-wrap">        </span>options.session_params.progressive_update_timeout = 0.1;</div><div><span style="white-space:pre-wrap">        </span>options.session_params.background = true;</div><br><font color="#4b4d51" face="Segoe UI, Segoe UI Web Regular, Segoe UI Symbol, Helvetica Neue, Helvetica, Arial, sans-serif"><span style="line-height:16.0030002593994px">no feedback is given &quot;from both functions, so they are not called&quot; , at the end of the render it saves the image on destructor.</span></font><br><br><font color="#4b4d51" face="Segoe UI, Segoe UI Web Regular, Segoe UI Symbol, Helvetica Neue, Helvetica, Arial, sans-serif"><span style="line-height:16.0030002593994px">case (2):</span></font><br><div><span style="white-space:pre-wrap">        </span>options.session_params.progressive = false;</div><div><span style="white-space:pre-wrap">        </span>options.session_params.progressive_refine = false;</div><div><span style="white-space:pre-wrap">        </span>options.session_params.progressive_update_timeout = 0.1;</div><div><span style="white-space:pre-wrap">        </span>options.session_params.background = true;<br><br>crash!! after first tile, shows 12/192 in tiles and crashes.<br><br>case (3):<br><div><span style="white-space:pre-wrap">        </span>options.session_params.progressive = false;</div><div><span style="white-space:pre-wrap">        </span>options.session_params.progressive_refine = false;</div><div><span style="white-space:pre-wrap">        </span>options.session_params.progressive_update_timeout = 0.1;</div><div><span style="white-space:pre-wrap">        </span>options.session_params.background = true;<br><br>and in session.cpp:<br><br><div>void Session::release_tile(RenderTile&amp; rtile)</div><div>{</div><div><span style="white-space:pre-wrap">        </span>thread_scoped_lock tile_lock(tile_mutex);</div><div><br></div><div><span style="white-space:pre-wrap">        </span>if(write_render_tile_cb) {</div><div><span style="white-space:pre-wrap">                </span>if(params.progressive_refine == false) {</div><div><span style="white-space:pre-wrap">                        </span>/* todo: optimize this by making it thread safe and removing lock */</div><div><span style="white-space:pre-wrap">                        </span>write_render_tile_cb(rtile);</div><div><br></div><div><span style="white-space:pre-wrap">                        //</span>delete rtile.buffers;  // I commented this line!!</div><div><span style="white-space:pre-wrap">                </span>}</div><div><span style="white-space:pre-wrap">        </span>}</div><div><br></div><div><span style="white-space:pre-wrap">        </span>update_status_time();</div><div>}<br><br>with commenting delete rtile.buffers; , it doesn&#39;t crash, and updates fine!! &quot;although with some problems in gamma in updating, but at the end the written image is gamma correct&quot;<br><br>I&#39;m not sure where is the problem.<br><br>cheers,<br>Mohamed Sakr</div></div></div></div></div>
<br>_______________________________________________<br>
Bf-cycles mailing list<br>
<a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-cycles" target="_blank">http://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div><span style="color:rgb(102,102,102)">With best regards, Sergey Sharybin</span></div></div>
</div>