Maniphest T56776

Trying to edit mesh crashes Blender
Closed, Resolved

Assigned To
Clément Foucault (fclem)
Authored By
Vlad Mafteiu Scai (00Ghz)
Sep 12 2018, 12:46 PM
Tags
  • BF Blender: 2.8
Subscribers
Antonio Vazquez (antoniov)
Clément Foucault (fclem)
Jesse Yurkovich (deadpin)
Vlad Mafteiu Scai (00Ghz)

Description

System Information
Windows 10 latest update, 1080 GTX, i7 3700K

Blender Version
Broken: (2.8 ef32be25c17)

Exact steps for others to reproduce the error
Check attached mesh and go to edit mode. Blender will crash.

Related Objects

Mentioned Here
rB781995a09c0b: Edit UVs: Refactor drawing Edit UV in Image Editor
rB283f0ae9afe7: Edit UVs: Refactor drawing Shadow UV in Image Editor
T56932: Crash entering edit mode
rBef32be25c179: Fix scale-cage editmode pivot point

Event Timeline

Vlad Mafteiu Scai (00Ghz) created this task.Sep 12 2018, 12:46 PM
Antonio Vazquez (antoniov) lowered the priority of this task from 90 to 50.Sep 12 2018, 1:10 PM
Antonio Vazquez (antoniov) added a subscriber: Antonio Vazquez (antoniov).

I can confirm the bug in Windows:

Read blend: C:\Users\Antonio\Downloads\Watch - issue.blend
Assertion failed: bytes_needed <= IMM_BUFFER_SIZE, file c:\myblender\blenderdev\blender\source\blender\gpu\intern\gpu_immediate.c, line 219
Error   : EXCEPTION_BREAKPOINT
Address : 0x00007FF6D662A465
Module  : C:\MyBlender\BlenderBin\bin\Debug\blender.exe

I'm going to debug more to try to find more details.

Antonio Vazquez (antoniov) edited projects, added BF Blender: 2.8; removed BF Blender.Sep 12 2018, 1:11 PM
Antonio Vazquez (antoniov) added a subscriber: Clément Foucault (fclem).Sep 12 2018, 1:25 PM

The problem is in draw_uvs() function.

Running in debug, I can see the memory grows and grows until we get the crash.

It's very weird that value of bm->totloop in line 862 (immBeginAtMost(GPU_PRIM_POINTS, bm->totloop);) is huge: 3.700.704. I think this value is totally wrong for this mesh.

I cannot follow the analysis because I don't know this Blender area.

@Clément Foucault (fclem) I think this is for you, no?

Maybe the mesh is damaged in a previous blender crash.

Jesse Yurkovich (deadpin) added a subscriber: Jesse Yurkovich (deadpin).Sep 26 2018, 8:52 PM

If you enable the wireframe overlay you'll see it looks to have been subdivided to a very, very high (and very, very unnecessary) level so it seems to really have that many verts/loops. There's no sub-d modifier on the object so it's all real geo.

Another similar issue is T56932 with the same faulting stack and problem; dense meshes don't work well with IMM_BUFFER_SIZE.

Clément Foucault (fclem) changed the task status from Unknown Status to Resolved.Oct 1 2018, 9:10 PM
Clément Foucault (fclem) claimed this task.

Fixed by rB781995a09c0b rB283f0ae9afe7