Page MenuHome

Users refcount not incremented when creating a proxy but decremented when deleting it
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 432.00

Blender Version
Broken: version: 2.83.7, branch: master, commit date: 2020-09-30 06:12, hash: rB192e591af9fb
Worked: version: 2.79b, hash f4dc9f9d68b

Short description of error
When making a Proxy of e.g. a linked Armature, the users refcount of the linked datablock is not incremented.
But when deleting it, the refcount is decremented, eventually reaching zero if recreating the proxy a few times.
In blender 2.79b this problem does not appear, as users refcount in neither incremented nor decremented for proxy creation or deletion.

Exact steps for others to reproduce the error

  1. Save the two attached blends in the same folder.
  2. Open use_cube.blend
  3. In the Data API outliner look for the users number of the object 'Cube_armature' and watch it for the next steps
  4. Delete the proxy armature
  5. recreate the proxy for 'Cube_armature'
  6. repeat steps 4-5 until user count will reach zero and below error will be printed in terminal
ERROR (bke.lib_id): C:\b\buildbot-worker-windows\windows_lts_283\blender.git\source\blender\blenkernel\intern\lib_id.c:342 id_us_min: ID user decrement error: OBCube_armature (from 'C:\Users\Enzio\Desktop\bugreport_proxy_user\rigged_cube.blend'): 0 <= 0
Info: Deleted 1 object(s)

Library

Use of the Library

Event Timeline

When saving the Blendfile where the Armature has reached zero users, but having a Proxy of it created, it will recalculate the users count when opening the file, but the Proxy relation will be broken and the linked rig will not follow the proxy.
object.proxy is None but object.proxy_collection is still pointing to the collection.
Only recreating the Proxy in the newly opened blendfile fixes the relation again.

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Oct 9 2020, 3:45 PM
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Bug".

Can confirm, looks like a bug to me.