Page MenuHome

Change Bone Layers fails in Pose Mode
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: Quadro P620/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 419.67

Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-10-18 20:27, hash: rB48c484a22e0d
Worked: (newest version of Blender that worked as expected)

Short description of error
In Pose Mode, the 2nd change of Change Bone Layers wouldn't be reflected.

  • The 1st and after the 3rd changes are normally reflected.
  • This only happens in Pose Mode. It's OK in Edit Mode.
  • It doesn't happen when changed from on Properties Editor > Object Data Properties > Layers.

Exact steps for others to reproduce the error

  • Open attached .blend file
  • Press M in 3dView(shortcut: Change Bone Layers) and Shift + Click twice on the vacant bone layer.
  • The 2 changes wouldn't be reflected.


Related Objects

Event Timeline

Sebastian Parborg (zeddb) changed the task status from Needs Triage to Confirmed.Oct 19 2020, 2:11 PM
Sebastian Parborg (zeddb) changed the subtype of this task from "Report" to "Bug".

Ok, this issue doesn't happen with "Undo Legacy" activated (Preferences -> Experimental -> Undo Legacy).

The issue seems to be that when selecting multiple layers, the operator writes the changes to the data block freed by ED_undo_operator_repeat.
I'm guessing this is because it gets the wrong context when rolling back to the initial state with undo.
(So the context stays at the block we rollback from).

This need to be fixed as we should never access freed memory like this. I'm just posting my current finding here.