Page MenuHome

Inset with depth and offset relative has weird geometry and assert crash
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Linux-5.3.0-20-generic-x86_64-with-Ubuntu-18.04-bionic 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.26

Blender Version
Broken: version: 2.82 (sub 1), branch: master (modified), commit date: 2019-11-26 05:28, hash: rB75e85f1c9f1e
Worked: (optional)

Short description of error
Delete default cube and add a grid.
Go into edit mode and select 4 faces to make a square selection. (Note it doesn't crash if you select a single face or a line of faces)
Do an inset.
Open properties and check Offset Relative.


Now adjust Depth.

In 2.81 I get weird geometry as pictured, but in my master debug build it crashes with an assert. See attached backtrace.

Event Timeline

Backtrace:

#0  0x00007fffef36de97 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007fffef36f801 in __GI_abort () at abort.c:79
#2  0x0000555558d72f5d in bm_edge_info_average_length (v=0x7fff8b0c9b28, edge_info=0x7fff8db6b838) at /home/krash/src/blender/src/source/blender/bmesh/operators/bmo_inset.c:515
#3  0x0000555558d7bdfc in bmo_inset_region_exec (bm=0x7fff8e4b8638, op=0x7fffffffcca0) at /home/krash/src/blender/src/source/blender/bmesh/operators/bmo_inset.c:1210
#4  0x0000555558cc50ba in BMO_op_exec (bm=0x7fff8e4b8638, op=0x7fffffffcca0) at /home/krash/src/blender/src/source/blender/bmesh/intern/bmesh_operators.c:223
#5  0x000055555913c874 in edbm_inset_calc (op=0x7fffae80f738) at /home/krash/src/blender/src/source/blender/editors/mesh/editmesh_inset.c:296
#6  0x000055555913c9db in edbm_inset_exec (C=0x7fffce496638, op=0x7fffae80f738) at /home/krash/src/blender/src/source/blender/editors/mesh/editmesh_inset.c:326
#7  0x0000555558949556 in wm_operator_exec (C=0x7fffce496638, op=0x7fffae80f738, repeat=true, store=true) at /home/krash/src/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1057
#8  0x0000555558949825 in WM_operator_repeat (C=0x7fffce496638, op=0x7fffae80f738) at /home/krash/src/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1133
#9  0x0000555559386815 in ED_undo_operator_repeat (C=0x7fffce496638, op=0x7fffae80f738) at /home/krash/src/blender/src/source/blender/editors/undo/ed_undo.c:576
#10 0x0000555559386963 in ED_undo_operator_repeat_cb_evt (C=0x7fffce496638, arg_op=0x7fffae80f738, UNUSED_arg_event=0) at /home/krash/src/blender/src/source/blender/editors/undo/ed_undo.c:610
#11 0x000055555945492a in ui_apply_but_funcs_after (C=0x7fffce496638) at /home/krash/src/blender/src/source/blender/editors/interface/interface_handlers.c:903
#12 0x000055555946efba in ui_region_handler (C=0x7fffce496638, event=0x7fff8e8fa4b8, UNUSED_userdata=0x0) at /home/krash/src/blender/src/source/blender/editors/interface/interface_handlers.c:10552
#13 0x000055555894840d in wm_handler_ui_call (C=0x7fffce496638, handler=0x7fff8d64e558, event=0x7fff8e8fa4b8, always_pass=0) at /home/krash/src/blender/src/source/blender/windowmanager/intern/wm_event_system.c:624
#14 0x000055555894dd53 in wm_handlers_do_intern (C=0x7fffce496638, event=0x7fff8e8fa4b8, handlers=0x7fffc6fc3380) at /home/krash/src/blender/src/source/blender/windowmanager/intern/wm_event_system.c:2747
#15 0x000055555894eb28 in wm_handlers_do (C=0x7fffce496638, event=0x7fff8e8fa4b8, handlers=0x7fffc6fc3380) at /home/krash/src/blender/src/source/blender/windowmanager/intern/wm_event_system.c:2993
#16 0x0000555558950136 in wm_event_do_handlers (C=0x7fffce496638) at /home/krash/src/blender/src/source/blender/windowmanager/intern/wm_event_system.c:3446
#17 0x000055555894258f in WM_main (C=0x7fffce496638) at /home/krash/src/blender/src/source/blender/windowmanager/intern/wm.c:417
#18 0x0000555558313809 in main (argc=2, argv=0x7fffffffdc68) at /home/krash/src/blender/src/source/creator/creator.c:496
Philipp Oeser (lichtwerk) lowered the priority of this task from 90 to 50.Nov 27 2019, 4:05 PM

Confirmed, checking...

I'm not sure I'm doing the steps correctly but I can't reproduce the crash. I added this test case to D5357 (test currently passes with thickness = 0.4 and use_relative_offset set to True)

Sybren A. Stüvel (sybren) changed the subtype of this task from "Report" to "Bug".Mon, Jan 20, 4:27 PM

I can confirm on rBa5f19e3f7270b335d3 :

BLI_assert failed: /home/sybren/workspace/blender-git/blender/source/blender/bmesh/operators/bmo_inset.c:515, bm_edge_info_average_length(), at 'tot != 0'
/home/sybren/workspace/blender-git/blender/source/blender/bmesh/operators/bmo_inset.c:516:14: runtime error: division by zero