<div dir="ltr">did you do mesh->tag_update and object->tag_update?</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 3, 2018 at 10:26 AM, F Escobar <span dir="ltr"><<a href="mailto:materialesescobar@hotmail.es" target="_blank">materialesescobar@hotmail.es</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">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgba(0,0,0,0)">
@Mohamed <span style="color:rgb(33,33,33);font-family:"Segoe UI Web (West European)","Segoe UI",-apple-system,BlinkMacSystemFont,Roboto,"Helvetica Neue",sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400">Mesh::add_vertex
 has the same problem<br>
<br>
@Brecht I'll try to figure how to do that, if it helps the call stack points to </span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgba(0,0,0,0)">
<span style="color:rgb(33,33,33);font-family:"Segoe UI Web (West European)","Segoe UI",-apple-system,BlinkMacSystemFont,Roboto,"Helvetica Neue",sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400">cycles.exe!_malloc_base
 Line 34</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgba(0,0,0,0)">
<span style="color:rgb(33,33,33);font-family:"Segoe UI Web (West European)","Segoe UI",-apple-system,BlinkMacSystemFont,Roboto,"Helvetica Neue",sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400">cycles.exe!_aligned_offset_<wbr>malloc_base
 line 133</span></div>
<hr style="display:inline-block;width:98%">
<div id="m_4241246529915457965divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De:</b> Bf-cycles <<a href="mailto:bf-cycles-bounces@blender.org" target="_blank">bf-cycles-bounces@blender.org</a><wbr>> en nombre de Brecht Van Lommel <<a href="mailto:brechtvanlommel@pandora.be" target="_blank">brechtvanlommel@pandora.be</a>><br>
<b>Enviado:</b> viernes, 2 de marzo de 2018 19:08<br>
<b>Para:</b> Discussion list to assist Cycles render engine developers<br>
<b>Asunto:</b> Re: [Bf-cycles] Crash on higher vertex count with subd</font>
<div> </div>
</div><div><div class="h5">
<div>
<div dir="ltr">Do you have a backtrace of the crash? I can't immediately think of a reason this would happen.</div>
<div class="m_4241246529915457965x_gmail_extra"><br>
<div class="m_4241246529915457965x_gmail_quote">On Fri, Mar 2, 2018 at 2:33 PM, F Escobar <span dir="ltr">
<<a href="mailto:materialesescobar@hotmail.es" target="_blank">materialesescobar@hotmail.es</a>></span> wrote:<br>
<blockquote class="m_4241246529915457965x_gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgba(0,0,0,0)">
I've tried to create a super basic subd mesh with this code</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgba(0,0,0,0)">
<div><br>
</div>
<div><span style="white-space:pre-wrap"></span>mesh->subdivision_type = ccl::Mesh::SUBDIVISION_LINEAR;</div>
<div><span style="white-space:pre-wrap"></span>int numVertex = 3000;</div>
<div><span style="white-space:pre-wrap"></span>mesh->verts.resize(numVertex);</div>
<div><span style="white-space:pre-wrap"></span>printf("resized %i\n", numVertex);</div>
<div><span style="white-space:pre-wrap"></span>for(int i=0;i<numVertex;i++)</div>
<div><span style="white-space:pre-wrap"></span>mesh->verts[i] = ccl::make_float3(0, 0, 0);</div>
<div></div>
<div><br>
</div>
<div><span style="font-style:normal;font-weight:400;font-size:16px;font-family:Calibri,Helvetica,sans-serif;color:rgb(0,0,0);white-space:pre-wrap"></span>int indices[3];</div>
<div><span style="white-space:pre-wrap"></span>indices[0] = 0;</div>
<div><span style="white-space:pre-wrap"></span>indices[1] = 1;</div>
<div><span style="white-space:pre-wrap"></span>indices[2] = 2;</div>
<div><span style="white-space:pre-wrap"></span>mesh->reserve_subd_faces(1, 0, 3);</div>
<div><span style="white-space:pre-wrap"></span>mesh->add_subd_face(indices, 3, 0, false);</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"></span>if (!mesh->subd_params) {</div>
<div><span style="white-space:pre-wrap"></span>mesh->subd_params = new ccl::SubdParams(mesh);</div>
<div><span style="white-space:pre-wrap"></span>}</div>
<div><span style="white-space:pre-wrap"></span>ccl::SubdParams& sdparams = *mesh->subd_params;</div>
<div><span style="white-space:pre-wrap"></span>sdparams.camera = scene->camera;
<div><br>
</div>
<div><span style="white-space:pre-wrap"></span>ccl::Object *object = new ccl::Object();</div>
<div><span style="white-space:pre-wrap"></span>object->mesh = mesh;</div>
<div><span style="white-space:pre-wrap"></span>scene->objects.push_back(objec<wbr>t);</div>
<div><br>
</div>
<div>And yes... it only should generate one triangle, btw it shouldn't be rendered since all the vertex are in the same place (0,0,0) but that is not the question<br>
<br>
If I change <span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:16px;font-style:normal;font-weight:400">numVertex  from 3000 to 300 it doesn't crash so it is related to the amount of vertex but anyway 3k is a pretty low amount.</span></div>
<div><span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:16px;font-style:normal;font-weight:400"><br>
</span></div>
<div><span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:16px;font-style:normal;font-weight:400">Any idea on this?</span></div>
<div><span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:16px;font-style:normal;font-weight:400"><br>
</span></div>
<div><span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:16px;font-style:normal;font-weight:400">Regards, F.</span></div>
</div>
<br>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
Bf-cycles mailing list<br>
<a href="mailto:Bf-cycles@blender.org" target="_blank">Bf-cycles@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">https://lists.blender.org/mail<wbr>man/listinfo/bf-cycles</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>

<br>______________________________<wbr>_________________<br>
Bf-cycles mailing list<br>
<a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/bf-cycles</a><br>
<br></blockquote></div><br></div>