<div dir="ltr">Hi,<div><br></div><div>I'm not sure what are the problems with dynamic array implementaiton. Even if BLI_array is not suitable (due to possibly unneeded stack allocated buffer for small arrays). you can implement dynamic array in few minutes. It can't be harder than an usability wrapper around malloc/realloc. If you have crashes, odds that you're storing old pointers somewhere or not creating array of a needed size.</div><div><br></div><div>If you're on Linux, you can use GCC's address sanitizer to help catching details about such issues. This could save you a lot of time.</div><div><br></div><div>Last week you also mentioned Tom gave you list of bugs. Are they fixed now?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 14, 2017 at 10:10 PM, Raja Kedia <span dir="ltr"><<a href="mailto:rajakedia2222@gmail.com" target="_blank">rajakedia2222@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p class="MsoNormal">Hello Developers,</p><p class="MsoNormal"><br></p><p class="MsoNormal"><b>What I done this week:</b><span></span></p>
<p class="MsoNormal">First of all as per my target, I started with dynamic array
implementation in my brush. LetterRip and mont29 suggested to check BLI_array.c
and use BLI_array function to increase array size dynamically and according to
use. Still, there was some minor implementation problem as it was not working
as expected rather there were few crashes. I changed my focus to dyntopo mode
implementation before dynamic array as after dynamic array implementation, if there
would be any problem in dyntopo then it would be difficult to remove. <span></span></p><p class="MsoNormal"><br></p>
<p class="MsoNormal">Now in dyntopo correction, the problem I was facing was related
to continuous vertex index changing due to multithreading. While, storing
index, I tried to limit threading and also imitate cache->first_time to
create something like second_time in cache for calculation. The advantage of
using second_time could be that it can calculate central vertex as a whole and
it might not be affected by multithreading. But still no achievement was there.
It was working same as before. I was thinking of stopping multithtreading for
time being and I asked mont29 and LetterRip in irc and they hinted me to make
brush work without interrupting multithreading as it won’t be a great idea. I tried
BLI_mutex and related function (inspired from layer brush) but still there was
nothing much that I gained. <span></span></p><p class="MsoNormal"><br></p>
<p class="MsoNormal">Finally, LetterRip hinted me to checked what is the
coordinate status while using brush. I checked and since grab brush uses
original coordinate, we thought of using coordinate as index. I tried studying
more about bm_log functions and it was a bit helpful. Finally I was able to
develop topograb brush which is working in dyntopo without crashes( still there
is some error related to mirroring in dyntopo but it can be solved easily now).
<span></span></p><p class="MsoNormal"><br></p><p class="MsoNormal"><br></p>
<p class="MsoNormal"><b>What I will do next week:</b><span></span></p>
<p class="MsoNormal">This week, I might be able to complete topograb brush and it
can possibly be tested by artist. Most of the things and code development has
already been done and there are still a few error to fix. Next, it should be
fully functional while using dyntopo mode without any crashes. I will be trying
to deliver this brush by next week.<span></span></p>
<p class="MsoNormal">Thank you.<span></span></p></div>
<br>______________________________<wbr>_________________<br>
Soc-2017-dev mailing list<br>
<a href="mailto:Soc-2017-dev@blender.org">Soc-2017-dev@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/soc-2017-dev" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/soc-2017-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span style="color:rgb(102,102,102)">With best regards, Sergey Sharybin</span><br></div></div>
</div>