Page MenuHome

Render crash with simple object only in debug build
Closed, ResolvedPublic

Description

System Information
5820K Windows10 GTX 970

Blender Version
Latest local build from master - date 16/03/2018

Short description of error
Render throws exception in debug build with very simple mesh - with adaptive subdivision

Problem appears to be in mesh_subdivsion.cpp
Line 193 int num_local_points = patch_table->GetNumLocalPoints();
returns zero
which means length of verts array is not increased and so
Line 207 patch_table->ComputeLocalPointValues(&verts[0], &verts[num_refiner_verts]);
fails because num_refiner_verts is greater than length of array (last element is num_refiner_verts-1)

Hope that helps.

Exact steps for others to reproduce the error
Run debug version.
Load attached scene
Hit F12 to render

Event Timeline

LazyDodo (LazyDodo) triaged this task as Confirmed, Medium priority.

can confirm the issue, @Mai Lavelle (maiself) mind taking a peek here?

Hi,

Thanks for the changes/ However, the basic test scene is still crashing for me in Debug,

Line 209

patch_table->ComputeLocalPointValues(&verts[0], &verts[num_refiner_verts]);

Problem is num_local_points is zero so length of array set in line 195..

verts.resize(num_refiner_verts + num_local_points);

..is equal to num_refiner_points

Therefore line 209 fails because &verts[num_refiner_verts] is outside bounds of array.

Oops, used the wrong variable, will commit a fix shortly.