System Information
Operating system: Linux-5.9.10-arch1-1-x86_64-with-arch 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 455.45.01
Blender Version
Broken: version: 2.90.0 alpha, branch: blender-v2.90-release, commit: 4387aff99e01c412a360d412bf78d8bc913d4401
Broken: version: 2.91.0, branch: blender-v2.91-release (built from source)
Broken: version: 2.91.0 (official release)
Broken: version: 2.92.0-fbdf1af35550 (daily build)
Worked: 2.83.8
Short description of error
When one opens or closes the toolshelf and immediately or shortly after tries to move an unselected endpoint of a ruler, Blender crashes.
Exact steps for others to reproduce the error
- Open blender with a default scene, toolshelf is open
- Click the measure tool on the toolshelf, draw the ruler
- Close the shelf via the T shortcut, the ruler gets unselected
- Keep the mouse near one of the endpoint, to be quick
- Open the toolshelf via the T shortcut and without waiting for it to be fully out, try to move one of the endpoints
You should be pretty fast with the two operations to reproduce this, rarely it doesn't reproduce, and sometimes it reproduces even after the toolshelf is fully out.
Some other time maybe you move the endpoint too early and the toolshelf doesn't come out, so it doesn't reproduce.
Since I have built it from source too (RelWithDebInfo) I have a stack trace:
#0 0x00005555582f2359 in invert_snap (snap_gizmo=0x7fffd09fdc08, wm=0x7ffff4b55808, event=0x7fffd6c2f988) at /home/smjert/Development/blender/src/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c:83
#1 ED_gizmotypes_snap_3d_update (gz=gz@entry=0x7fffd09fdc08, depsgraph=depsgraph@entry=0x7ffff01d2a08, region=0x7ffff4bd6188, v3d=v3d@entry=0x7ffff4b44c08, wm=0x7ffff4b55808, mval_fl=0x7fffffffdb6c, mval_fl@entry=0x7fffffffdb5c,
r_loc=0x7fffca77b3f0, r_nor=0x0) at /home/smjert/Development/blender/src/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c:258
#2 0x0000555557a00a83 in view3d_ruler_item_mousemove (depsgraph=0x7ffff01d2a08, ruler_info=ruler_info@entry=0x7fffd00ecec8, ruler_item=<optimized out>, ruler_item@entry=0x7fffca77b288, mval=<optimized out>, mval@entry=0x7fffd0548aa4,
do_thickness=<optimized out>) at /home/smjert/Development/blender/src/source/blender/editors/space_view3d/view3d_gizmo_ruler.c:391
#3 0x00005555579ffcc6 in gizmo_ruler_modal (C=C@entry=0x7ffff4524e48, gz=0x7fffca77b288, event=<optimized out>, event@entry=0x7fffd0548a88, tweak_flag=<optimized out>)
at /home/smjert/Development/blender/src/source/blender/editors/space_view3d/view3d_gizmo_ruler.c:954
#4 0x0000555556fe1b0e in gizmo_tweak_modal (C=0x7ffff4524e48, op=0x7fffd05bbc48, event=0x7fffd0548a88) at /home/smjert/Development/blender/src/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c:555
#5 0x0000555556fbf128 in wm_handler_operator_call (C=C@entry=0x7ffff4524e48, handlers=handlers@entry=0x7ffff4b5e798, handler_base=handler_base@entry=0x7fffd00ece08, event=event@entry=0x7fffd0548a88, properties=<optimized out>,
properties@entry=0x0, kmi_idname=kmi_idname@entry=0x0) at /home/smjert/Development/blender/src/source/blender/windowmanager/intern/wm_event_system.c:2022
#6 0x0000555556fbe21d in wm_handlers_do_intern (C=<optimized out>, C@entry=0x7ffff4524e48, event=<optimized out>, event@entry=0x7fffd0548a88, handlers=<optimized out>, handlers@entry=0x7ffff4b5e798)
at /home/smjert/Development/blender/src/source/blender/windowmanager/intern/wm_event_system.c:2803
#7 0x0000555556fba08c in wm_handlers_do (C=C@entry=0x7ffff4524e48, event=event@entry=0x7fffd0548a88, handlers=handlers@entry=0x7ffff4b5e798)
at /home/smjert/Development/blender/src/source/blender/windowmanager/intern/wm_event_system.c:2851
#8 0x0000555556fb95c1 in wm_event_do_handlers (C=C@entry=0x7ffff4524e48) at /home/smjert/Development/blender/src/source/blender/windowmanager/intern/wm_event_system.c:3274
#9 0x0000555556fb4140 in WM_main (C=0x7ffff4524e48) at /home/smjert/Development/blender/src/source/blender/windowmanager/intern/wm.c:476
#10 0x0000555556bc7804 in main (argc=1, argv=0x7fffffffe218) at /home/smjert/Development/blender/src/source/creator/creator.c:519The part of code in the last stack frame is:
80 #ifdef USE_SNAP_DETECT_FROM_KEYMAP_HACK
81 static bool invert_snap(SnapGizmo3D *snap_gizmo, const wmWindowManager *wm, const wmEvent *event)
82 {
83 wmKeyMap *keymap = WM_keymap_active(wm, snap_gizmo->keymap);
84
85 const int snap_on = snap_gizmo->snap_on;
86 for (wmKeyMapItem *kmi = keymap->items.first; kmi; kmi = kmi->next) {
87 if (kmi->flag & KMI_INACTIVE) {
88 continue;
89 }and snap_gizmo->keymap seems to be NULL when it crashes, so I guess it actually crashes in the for, since the WM_keymap_active seems to handle the NULL case by returning NULL.