Page MenuHome

Mirror Modifiers + Curve crash
Closed, ResolvedPublic

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.

Event Timeline

Dalai Felinto (dfelinto) triaged this task as Confirmed, High priority.

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()

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.

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


@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?

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

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.

@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.

@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.

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