Page MenuHome

Assert adding a new material with animation through the material template_ID
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Linux-5.8.4-200.fc32.x86_64-x86_64-with-fedora-32-Thirty_Two 64 Bits
Graphics card: GeForce GTX 970M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 450.66

Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-09-28 10:06, hash: rBf7655dd322dd
Broken: 2.90.0
Broken: 2.83.0

Short description of error
Assert adding a new material with animation through the material template_ID

Exact steps for others to reproduce the error
From the default startup file:

  • Go to Material Properties tab in the property editor
  • Add a keyframe on any Material settting (does not matter if it is the Principled BSDF Base Color [nodetree action], the Viewport Display Color [material action], ...)
  • Use the material template_ID to add a new material

BLI_assert failed: /blender/source/blender/blenloader/intern/writefile.c:2278, write_file_handle(), at '(id->tag & (LIB_TAG_NO_MAIN | LIB_TAG_NO_USER_REFCOUNT | LIB_TAG_NOT_ALLOCATED)) == 0'

Event Timeline

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Sep 28 2020, 10:47 PM
Philipp Oeser (lichtwerk) created this task.
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Bug".

@Bastien Montagne (mont29): LIB_ID_CREATE_NO_USER_REFCOUNT was added when copying (to IDProperties and Actions) in rB0fb55ff845fc: Fix T70787: Duplicating objects with custom property of type ID creates bogus….
Undo push then stumbles over this (the Assert).

To me it seems the assert is a bit too strict here? (since the addition of LIB_ID_CREATE_NO_USER_REFCOUNT seems OK?)

Assert was added with rB41830cc432b9: Refactor ID copying (and to some extent, ID freeing).