Maniphest T66862

Mirror Modifiers + Curve crash
Closed, ResolvedBUG

Assigned To
Howard Trickey (howardt)
Authored By
Fabio Prinzis (SonicBlue)
Jul 13 2019, 3:25 PM
Tags
  • BF Blender
Subscribers
Craig Dolphin (craigdolphin)
Dalai Felinto (dfelinto)
Fabio Prinzis (SonicBlue)
Sergey Sharybin (sergey)

Description

Developer Note
I believe this is an issue with mirror modifier + curve. To reproduce it:

$./blender -b --python-expr "import bpy; bpy.ops.object.add(type='CURVE');bpy.data.objects['Curve'].modifiers.new('mod', 'MIRROR');bpy.context.view_layer.depsgraph.update()

Original Title
Smooth Vertices Crash

System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 417.35

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-11 13:50, hash: rB06312c6d2db8
Worked: (optional)

Short description of error

Blender crashes to desktop after using the Smoothing slider on the Smooth Vertices command.

Exact steps for others to reproduce the error

Select some vertices, launch the Smooth Vertices command, change the smoothing value with the slider. The crash happens at random but it's tested (on my machine) to happen with Smooth Vertices active, though, it may crash in the same random way while using the Undo command too. As can be seen on this video it needs some time to trigger the crash:

https://youtu.be/1glMdIF90WA

I've also noticed a considerable slow down when the view is switched to the "quad" view, and then reverted back to single view (Toggle Maximize Area), as shown on the first part of the video.

Revisions and Commits

rB Blender

Related Objects

Mentioned Here
rB1a9e698099b5: Fix T65660 Mirror modifier didn't work with custom normals.
P1036 (An Untitled Masterwork)

Event Timeline

Fabio Prinzis (SonicBlue) created this task.Jul 13 2019, 3:25 PM
Dalai Felinto (dfelinto) lowered the priority of this task from 90 to High.Jul 13 2019, 7:25 PM
Dalai Felinto (dfelinto) added a subscriber: Dalai Felinto (dfelinto).

I can get a crash the moment I open your file:

SUMMARY: AddressSanitizer: heap-buffer-overflow //source/blender/modifiers/intern/MOD_mirror.c:338 in doMirrorOnAxis
Full backtrace: P1036

Looking at it I managed to reproduce with these simple steps:

  • Create a Bezier Curve
  • Add a Mirror Modifier to it

OR:

$./blender -b --python-expr "import bpy; bpy.ops.object.add(type='CURVE');bpy.data.objects['Curve'].modifiers.new('mod', 'MIRROR');bpy.context.view_layer.depsgraph.update()
Craig Dolphin (craigdolphin) added a subscriber: Craig Dolphin (craigdolphin).Jul 13 2019, 7:25 PM

For what it's worth, I tried to replicate this issue.

The first time I opened the file and copied the process shown in the video: toggling maximize area in the modelling.001 workspace and changing the smooth vertices slider without allowing the smooth vertices menu closing.

And after about 5 toggles and random changes to the slider Blender did crash.

I then tried to do this again but Blender crashed on load for the same file.

I tried to open it once more, and this time it loaded just fine. And I can no longer trigger Blender to crash following the steps in the video using that file. (I did 40+ toggles and slider changes without crash, closed and reloaded and tried another 40 toggles without crash, and then again a third time).

I then tried re-downloading the file to see if the original crash/crash on load might have modified the file. Tested again: could not trigger Blender to crash.

Note: going insane at this point. It's probably going to need a developer with console logging or something to figure out what's going on.

Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce MX130/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 391.25
Blender Build: RC1

Dalai Felinto (dfelinto) renamed this task from Smooth Vertices Crash to Mirror Modifiers + Curve crash.Jul 13 2019, 7:27 PM
Dalai Felinto (dfelinto) updated the task description.
Dalai Felinto (dfelinto) added a subscriber: Sergey Sharybin (sergey).

@Sergey Sharybin (sergey) wants to look at this one? It has the one-line-repro the way you like it ;)

Craig Dolphin (craigdolphin) added a comment.Jul 13 2019, 7:32 PM


@Dalai Felinto (dfelinto)
Here's a blend file with a bezier curve with a mirror modifier. It doesn't crash for me on RC1. Nor are there any errors apparent in the console. Am I misunderstanding?

Fabio Prinzis (SonicBlue) added a comment.Jul 13 2019, 8:03 PM

Thanks for checking @Dalai Felinto (dfelinto), as @Craig Dolphin (craigdolphin) already reported, I too can't get Blender to crash following your instructions.

In T66862#720785, @Craig Dolphin (craigdolphin) wrote:

For what it's worth, I tried to replicate this issue.

The first time I opened the file and copied the process shown in the video: toggling maximize area in the modelling.001 workspace and changing the smooth vertices slider without allowing the smooth vertices menu closing.

And after about 5 toggles and random changes to the slider Blender did crash.

I then tried to do this again but Blender crashed on load for the same file.

I tried to open it once more, and this time it loaded just fine. And I can no longer trigger Blender to crash following the steps in the video using that file. (I did 40+ toggles and slider changes without crash, closed and reloaded and tried another 40 toggles without crash, and then again a third time).

I then tried re-downloading the file to see if the original crash/crash on load might have modified the file. Tested again: could not trigger Blender to crash.

Note: going insane at this point. It's probably going to need a developer with console logging or something to figure out what's going on.

Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce MX130/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 391.25
Blender Build: RC1

I have recorded other (longer) videos, in one it took almost 3 minutes of the same procedure to make it crash. The first time I noticed this problem it crashed almost instantly, after moving the slider 2 or 3 times and in some cases just touching it; also, I've tried the file again and some times would make Blender crash on opening for me too.

Sergey Sharybin (sergey) assigned this task to Howard Trickey (howardt).Jul 13 2019, 8:10 PM

@Dalai Felinto (dfelinto), technically, that wouldn't be my area. There is a very wrong assumption in MOD_modifier.c which thinks this modifier is only applyable on Mesh objects. This was introduced in rB1a9e698099b5.

From my understanding the simplest fix is to check object type prior to accessing object's data: we don't support custom normals on curves/NURBS anyway.

Dalai Felinto (dfelinto) added a comment.Jul 13 2019, 10:15 PM

@Fabio Prinzis (SonicBlue) @Craig Dolphin (craigdolphin) the issue happens right away with a debug build with asan (memory address sanitizer). In a release (final user) build it won't necessarily crash right away, but it will lead to impredictable behaviour and apparent "random" crashes. There is a chance the original reported issue is something else, but either way this has to be solved first before re-testing vertex slide itself.

Craig Dolphin (craigdolphin) added a comment.Jul 13 2019, 10:51 PM

@Dalai Felinto (dfelinto) I see. Thank you for explaining. I appreciate you taking the time. :)

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Resolved by committing rB91f539b38416: Fix T66862: crash with mirror modifier applied to curve object.Jul 16 2019, 5:50 PM
Brecht Van Lommel (brecht) added a commit: rB91f539b38416: Fix T66862: crash with mirror modifier applied to curve object.
Brecht Van Lommel (brecht) added a commit: rB35aa13734db4: Fix T66862: crash with bevel modifier harden normals applied to curve object.Jul 16 2019, 6:26 PM