Having a material reference an empty that's constrained on an armature, makes that armature bug. #109804

Closed
opened 2023-07-07 03:38:13 +02:00 by LOIC BRAMOULLE · 18 comments

System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.79

Blender Version
Broken: version: 3.6.0, branch: blender-v3.6-release, commit date: 2023-06-27 08:08, hash: c7fc78b81ecb
Worked: (newest version of Blender that worked as expected)

Short description of error
If a material is connected to an armature, at some point when you animate on your project, the file will get "corrupted" and whenever you select a bone or enter pose mode, the armature will snap to an arbitrary frame's pose.

Exact steps for others to reproduce the error
Attached is a blender file where you can see the bug, entering pose mode or selecting a bone makes the armature jump to the frame 468 pose. And scrolling in the timeline, even just one frame, will "fix" temporarily the armature and display the real pose.

Deleting any of the objects linking the material to the armature solves the issue, or disconnecting the empty from the shader editor.

Also deleting the other scenes from the file, even if they have zero data inside them, removes the bug.
It's the second time I have this bug this year on totally different usecase, no common asset or process, same exact symptoms (anim erratically jumping when touched) but totally different triggers.

image

**System Information** Operating system: Windows-10-10.0.19043-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.79 **Blender Version** Broken: version: 3.6.0, branch: blender-v3.6-release, commit date: 2023-06-27 08:08, hash: `c7fc78b81ecb` Worked: (newest version of Blender that worked as expected) **Short description of error** If a material is connected to an armature, at some point when you animate on your project, the file will get "corrupted" and whenever you select a bone or enter pose mode, the armature will snap to an arbitrary frame's pose. **Exact steps for others to reproduce the error** Attached is a blender file where you can see the bug, entering pose mode or selecting a bone makes the armature jump to the frame 468 pose. And scrolling in the timeline, even just one frame, will "fix" temporarily the armature and display the real pose. Deleting any of the objects linking the material to the armature solves the issue, or disconnecting the empty from the shader editor. Also deleting the other scenes from the file, even if they have zero data inside them, removes the bug. It's the second time I have this bug this year on totally different usecase, no common asset or process, same exact symptoms (anim erratically jumping when touched) but totally different triggers. ![image](/attachments/f8e86fff-0c6b-4845-9f28-3457d4a70225)
LOIC BRAMOULLE added the
Status
Needs Triage
Type
Report
Priority
Normal
labels 2023-07-07 03:38:13 +02:00
Author

The bug came back today just after trying to add the constraint again, and when I reverted the scene to before re-adding the constraint, the bug was still there ! It really feels like a curse as it appears at an arbitrary point, can be triggered by potentially many different things (collections, constraints), and totally corrupts a project.
I'm a bit desperate as it must come from something deep inside blender's code, nothing seems to be able to tackle it on the front end manipulating blend file data, it will just reappear at a different time in a different case, and is a total showstopper, as armatures cannot be interacted with anymore.

The bug came back today just after trying to add the constraint again, and when I reverted the scene to before re-adding the constraint, the bug was still there ! It really feels like a curse as it appears at an arbitrary point, can be triggered by potentially many different things (collections, constraints), and totally corrupts a project. I'm a bit desperate as it must come from something deep inside blender's code, nothing seems to be able to tackle it on the front end manipulating blend file data, it will just reappear at a different time in a different case, and is a total showstopper, as armatures cannot be interacted with anymore.
Author

OK, I know why it came back today, I added a collection instance of this character to another scene, so this bug DOES come from at least constraints, and collections, and potentially other things. It is likely something fundamentally broken with blender armatures.

Steps to reproduce the bug in the above scene:
Well due to the nature of the bug there's no exact step as sometimes it triggers, sometimes not, it's really a massive pain, but if the character is instanciated in a collection in another scene, the bug does come back even WITHOUT the constraint, which is insane.

OK, I know why it came back today, I added a collection instance of this character to another scene, so this bug DOES come from at least constraints, and collections, and potentially other things. It is likely something **fundamentally broken with blender armatures.** Steps to reproduce the bug in the above scene: Well due to the nature of the bug there's no exact step as sometimes it triggers, sometimes not, it's really a massive pain, but if the character is instanciated in a collection in another scene, the bug does come back even WITHOUT the constraint, which is insane.

Hi, have you seen errors in console?

Error in PyDriver: expression failed: ((var1*self.yurediv.var_01)+(var2*self.yurediv.var_02))/self.yurediv.var_03
For target: (type=Object, name="CHARACTER", property=rotation_euler, property_index=0)

        BPY_driver_exec: restricted access disallows name 'yurediv', enable auto-execution to support

Error in PyDriver: expression failed: ((var1*self.yurediv.var_01)+(var2*self.yurediv.var_02))/self.yurediv.var_03
For target: (type=Object, name="CHARACTER", property=rotation_euler, property_index=1)

        BPY_driver_exec: restricted access disallows name 'yurediv', enable auto-execution to support

Error in PyDriver: expression failed: ((var1*self.yurediv.var_01)+(var2*self.yurediv.var_02))/self.yurediv.var_03
For target: (type=Object, name="CHARACTER", property=rotation_euler, property_index=2)

Hi, have you seen errors in console? ``` Error in PyDriver: expression failed: ((var1*self.yurediv.var_01)+(var2*self.yurediv.var_02))/self.yurediv.var_03 For target: (type=Object, name="CHARACTER", property=rotation_euler, property_index=0) BPY_driver_exec: restricted access disallows name 'yurediv', enable auto-execution to support Error in PyDriver: expression failed: ((var1*self.yurediv.var_01)+(var2*self.yurediv.var_02))/self.yurediv.var_03 For target: (type=Object, name="CHARACTER", property=rotation_euler, property_index=1) BPY_driver_exec: restricted access disallows name 'yurediv', enable auto-execution to support Error in PyDriver: expression failed: ((var1*self.yurediv.var_01)+(var2*self.yurediv.var_02))/self.yurediv.var_03 For target: (type=Object, name="CHARACTER", property=rotation_euler, property_index=2) ```
Author

Hi, yes that has no connexion I believe, it's a addon for adding a delay to a bone, the bug happens totally independantly, with or without the addon active/installed in the blender session, and happened before I installed the addon & applied it to a bone too.

If you delete the bone on the right side of the hips it should delete the error (that's where there is drivers on the rotation) and will have no effect on the bug.

Hi, yes that has no connexion I believe, it's a addon for adding a delay to a bone, the bug happens totally independantly, with or without the addon active/installed in the blender session, and happened before I installed the addon & applied it to a bone too. If you delete the bone on the right side of the hips it should delete the error (that's where there is drivers on the rotation) and will have no effect on the bug.
Author

Ok the bug re-appeared, but this time there is no connexion between an empty and a bones, and no collection instances of this character, so as I guessed it can be triggered by a number of things.
I Managed to detect the "CURSED" frame, as it always changes each time the bug appears, this time it's frame 2004, (I have 2755 frames on this cinematic) and what's special about this frame ? Well, the last test render I did earlier this morning was on that frame !
SO currently tehre is something fundamentally broken in blender, that makes it so that your armatures will snap to the pose they have on the last render's frame. Which is crazy. but something must "bake-in" this armature values somewhere when rendering, and just entering pose mode or selecting a bone "Displays" these values again, until the timeline is interacted with.

Ok the bug re-appeared, but this time there is no connexion between an empty and a bones, and no collection instances of this character, so as I guessed it can be triggered by a number of things. I Managed to detect the "CURSED" frame, as it always changes each time the bug appears, this time it's frame 2004, (I have 2755 frames on this cinematic) and what's special about this frame ? Well, the last test render I did earlier this morning was on that frame ! SO currently tehre is something fundamentally broken in blender, that makes it so that your armatures will snap to the pose they have on the last render's frame. Which is crazy. but something must "bake-in" this armature values somewhere when rendering, and just entering pose mode or selecting a bone "Displays" these values again, until the timeline is interacted with.
Author

As a proof, so now my armature snaps to the pose it has on that frame. Maybe there's something wrong happening with the "preserve data", it feels like blender is only able to recall the bones values from this frame 2004 render, and the previous times I had the bug, it also snapped to a frame that was in the range of the recent renders.
image

As a proof, so now my armature snaps to the pose it has on that frame. Maybe there's something wrong happening with the "preserve data", it feels like blender is only able to recall the bones values from this frame 2004 render, and the previous times I had the bug, it also snapped to a frame that was in the range of the recent renders. ![image](/attachments/d24e6835-f3a4-4725-8038-ef8d03180b97)
2.3 KiB
Author

YES, confirmed, I did a new render, and the bug moved to that frame !!! so it is indeed something linked with rendering:
image
It is really a complex nebulous bug, it can be triggered by different things, but at it's core it seems that when redering, an armature pose is "Baked", and when that bug triggers, an armature becomes only able to display that pose, when entering pose mode or selecting a bones, and able to display the actual animation after the timeline has been interacted with (even moving a single frame)

YES, confirmed, I did a new render, and the bug moved to that frame !!! so it is indeed something linked with rendering: ![image](/attachments/1f985871-8e9c-453a-861d-5dac4949c419) It is really a complex nebulous bug, it can be triggered by different things, but at it's core it seems that when redering, an armature pose is "Baked", and when that bug triggers, an armature becomes only able to display that pose, when entering pose mode or selecting a bones, and able to display the actual animation after the timeline has been interacted with (even moving a single frame)
136 KiB
Author

Yes, if the last render is EEVEE, the bug does not appear anymore. If you render in Cycles, the armature will snap into the last renderd frame pose, no matter the frame you're on currently.

Yes, if the last render is EEVEE, the bug does not appear anymore. If you render in Cycles, the armature will snap into the last renderd frame pose, no matter the frame you're on currently.
Author

OK FOUND THE SOURCE !!! it's Cycles persistant data !!! I was sure it was something core to blender, not auto-rig or any of my projects.

Persitant data actually bakes-in the armature pose to the rendered frame, and blender flips out and regurgitates these values in the viewport if entering pose mode or selecting a bone. deactivating persistant data (& re-rendering to purge them) OR rendering in EEVEE, makes the bug vanish (until persitant data is ticked again & a render bakes-in erratically the armature pose again.)

OK FOUND THE SOURCE !!! it's Cycles persistant data !!! I was sure it was something core to blender, not auto-rig or any of my projects. Persitant data actually bakes-in the armature pose to the rendered frame, and blender flips out and regurgitates these values in the viewport if entering pose mode or selecting a bone. deactivating persistant data (& re-rendering to purge them) OR rendering in EEVEE, makes the bug vanish (until persitant data is ticked again & a render bakes-in erratically the armature pose again.)

Thanks for new report and investigation. If I understand correctly, the issue is that when you render some frame, then switch to pose mode, it will cause armature to be in state of last rendered frame?

Thanks for new report and investigation. If I understand correctly, the issue is that when you render some frame, then switch to pose mode, it will cause armature to be in state of last rendered frame?
Author

Thanks Richard, yes that's it.
here is the updated file where I had the bug for the first time, I verified and it does come from persistant data, even if the file is from January 2023, the armature will be debugged only if the persistent datas are "erased" in some way: switch to eevee, untick them, remove a constraint on the armature, remove the armature from a collection, ect.. I think all these "reset" the persistant data, that when you open the file have the armature erratically take the last rendered frame pose.

The file I posted at the top of the thread too must exibit the exact same bug, it's when I encountered the bug on a second project.

Thanks again.

Loïc.

Thanks Richard, yes that's it. here is the updated file where I had the bug for the first time, I verified and it does come from persistant data, even if the file is from January 2023, the armature will be debugged only if the persistent datas are "erased" in some way: switch to eevee, untick them, remove a constraint on the armature, remove the armature from a collection, ect.. I think all these "reset" the persistant data, that when you open the file have the armature erratically take the last rendered frame pose. The file I posted at the top of the thread too must exibit the exact same bug, it's when I encountered the bug on a second project. Thanks again. Loïc.

I am not sure if I can reproduce the issue with persistent data. Can you provide steps to reproduce? I had to add camera ro be able to render anything, but then switching to pose mode works as intended.

I am not sure if I can reproduce the issue with persistent data. Can you provide steps to reproduce? I had to add camera ro be able to render anything, but then switching to pose mode works as intended.
Author

Ah no need to render in theory, the bug is already present in the file, if you enter pose mode, select bones, move on the timeline, directly when opening the file. scrolling plays the animation (actual anim is on frames 1650-1850, but I added one keyframe at 2400 in order to spot the "cursed" frame, that is the frame that I rendered last back in january on this file, frame 2082.)

On both file people did confirm it, and AutoRig Pro creator reported that closing the image editor was also a way to remove it (as now we can guess it resets the persistent data ?)

Ah no need to render in theory, the bug is already present in the file, if you enter pose mode, select bones, move on the timeline, directly when opening the file. scrolling plays the animation (actual anim is on frames 1650-1850, but I added one keyframe at 2400 in order to spot the "cursed" frame, that is the frame that I rendered last back in january on this file, frame 2082.) On both file people did confirm it, and AutoRig Pro creator reported that closing the image editor was also a way to remove it (as now we can guess it resets the persistent data ?)

I understand, that the issue is present in the file, but I would still like to have steps to reproduce it from scratch. Especially since I am not able to.

AutoRig Pro creator
I was thinking about this being caused by addon somehow, but not sure how addon could do this. Do you have some link where this behavior is described?

I understand, that the issue is present in the file, but I would still like to have steps to reproduce it from scratch. Especially since I am not able to. > AutoRig Pro creator I was thinking about this being caused by addon somehow, but not sure how addon could do this. Do you have some link where this behavior is described?
Author

Ah ok, well on my workfiles where the bug is live (not these cleaned-up files) I just have to press f12 while being on any frame, and that's it the current frame is now "cursed" and that's now where the armature snaps. But I'm not sure what exactly provokes that, triggers the bug, as it probably does not trigger by default in vanilla blender, there must be something that makes the persistant data corrupt the armature. All the times I managed to 'cure' the bug, it did not reapear, until it did days later.
And I jus tried reopened the files where I encountered it for the third time yesterday, it's not there on one, and the other this time it does not change the "cursed" frame when re-rendeing, but it removes the bug. so still really confusing, but I tested really thoroughly yesterday and it "followed" the last rendered frame as long as persistent datda was on, on these files.

Ah ok, well on my workfiles where the bug is live (not these cleaned-up files) I just have to press f12 while being on any frame, and that's it the current frame is now "cursed" and that's now where the armature snaps. But I'm not sure what exactly provokes that, triggers the bug, as it probably does not trigger by default in vanilla blender, there must be something that makes the persistant data corrupt the armature. All the times I managed to 'cure' the bug, it did not reapear, until it did days later. And I jus tried reopened the files where I encountered it for the third time yesterday, it's not there on one, and the other this time it does not change the "cursed" frame when re-rendeing, but it removes the bug. so still really confusing, but I tested really thoroughly yesterday and it "followed" the last rendered frame as long as persistent datda was on, on these files.
Author

Autorig pro creator did not recall any of his like 40K+ users reporting this bug, I guess maybe because animators don't render so much, dunno, but I don't think I have much addon that could be tied to rendering, armatures.. it's possible though.

Autorig pro creator did not recall any of his like 40K+ users reporting this bug, I guess maybe because animators don't render so much, dunno, but I don't think I have much addon that could be tied to rendering, armatures.. it's possible though.

I would like to somehow close the investigation into this, and I am not sure, that repro steps from scratch will be possible, so I will close this issue and mention findings from this conversation in #105873

I would like to somehow close the investigation into this, and I am not sure, that repro steps from scratch will be possible, so I will close this issue and mention findings from this conversation in #105873
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-08-15 05:57:57 +02:00
Author

ok thanks, yes it won't happen on a blank file in factory settings, but I'm sure it'll keep happening on my end as it plagued my projects this year. But knowing it comes from the persitant data makes it very easy to solve by re-rendering a frame without, to purge persitant data.

ok thanks, yes it won't happen on a blank file in factory settings, but I'm sure it'll keep happening on my end as it plagued my projects this year. But knowing it comes from the persitant data makes it very easy to solve by re-rendering a frame without, to purge persitant data.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#109804
No description provided.