Error deleting an object with shape keys #111905

Closed
opened 2023-09-03 23:46:47 +02:00 by RedMser · 9 comments
Contributor

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 531.68

Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-08-30 10:37, hash: e071288ab290
Worked: version: 4.0.0 Alpha, branch: main, commit date: 2023-08-10 03:47, hash: 4ad63687cbc4

Short description of error
I made a custom Blender build to create a repro for another bug. But I stumbled upon a new bug by accident?

Deleting an object with shape keys shows an error in the GUI and console:

Read blend: "C:\Users\VRLand\Desktop\lib\lib.blend"
ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACAction.001 (from '[Main]'): 0 <= 0
ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACAction (from '[Main]'): 0 <= 0
ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACKeyAction (from '[Main]'): 0 <= 0
ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACAction.002 (from '[Main]'): 0 <= 0
ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACAction.001 (from '[Main]'): 0 <= 0
ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACAction (from '[Main]'): 0 <= 0
ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACKeyAction (from '[Main]'): 0 <= 0
ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACAction.002 (from '[Main]'): 0 <= 0
Error: Shapekey KEKey.001 has an invalid 'from' pointer (0000000000000000), it will be deleted
Error: Shapekey KEKey.002 has an invalid 'from' pointer (0000000000000000), it will be deleted

Exact steps for others to reproduce the error

  • Empty blend file
  • Create a cube with two shape keys (Basis and Key)
  • Delete the cube
  • Save and reload the file

lib.blend shows the error directly when loaded.

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2080/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 531.68 **Blender Version** Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-08-30 10:37, hash: `e071288ab290` Worked: version: 4.0.0 Alpha, branch: main, commit date: 2023-08-10 03:47, hash: `4ad63687cbc4` **Short description of error** I made a custom Blender build to create a repro for another bug. But I stumbled upon a new bug by accident? Deleting an object with shape keys shows an error in the GUI and console: ``` Read blend: "C:\Users\VRLand\Desktop\lib\lib.blend" ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACAction.001 (from '[Main]'): 0 <= 0 ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACAction (from '[Main]'): 0 <= 0 ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACKeyAction (from '[Main]'): 0 <= 0 ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACAction.002 (from '[Main]'): 0 <= 0 ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACAction.001 (from '[Main]'): 0 <= 0 ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACAction (from '[Main]'): 0 <= 0 ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACKeyAction (from '[Main]'): 0 <= 0 ERROR (bke.lib_id): E:\blender-src\blender\source\blender\blenkernel\intern\lib_id.cc:337 id_us_min: ID user decrement error: ACAction.002 (from '[Main]'): 0 <= 0 Error: Shapekey KEKey.001 has an invalid 'from' pointer (0000000000000000), it will be deleted Error: Shapekey KEKey.002 has an invalid 'from' pointer (0000000000000000), it will be deleted ``` **Exact steps for others to reproduce the error** - Empty blend file - Create a cube with two shape keys (Basis and Key) - Delete the cube - Save and reload the file lib.blend shows the error directly when loaded.
974 KiB
RedMser added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-09-03 23:46:47 +02:00
Member

Yepp can confirm. Will bisect.

图片

Yepp can confirm. Will bisect. ![图片](/attachments/f5402bb9-ce69-4372-8246-6e25843227fe)
5.7 KiB
YimingWu added
Module
Modeling
Priority
High
Status
Confirmed
and removed
Priority
Normal
Status
Needs Triage
labels 2023-09-04 08:39:14 +02:00
Member

Failed to bisect this one, here all good up to e071288ab2 which makes no sense...

Can't seem to use New > General > Add Shape Keys > Save > Revert, probably needs to reopen blender to read the file?

Failed to bisect this one, here all good up to e071288ab2901f43a5cde82a4 which makes no sense... Can't seem to use `New > General > Add Shape Keys > Save > Revert`, probably needs to reopen blender to read the file?
Member

My bisect points to 47672bd06a

This however only added this error to the user visible reports, the same error can be reproduced in - at least down to - 3.3 LTS (here only on the commandline though) as well

My bisect points to 47672bd06a4c1092cef5576ff4b865ddd96a6619 This however only added this error to the user visible reports, the same error can be reproduced in - at least down to - 3.3 LTS (here only on the commandline though) as well
Member

@mont29 might still know more here

@mont29 might still know more here

This commit merely reveals the issue I think, will investigate further to try to understand what is actually happening here.

This commit merely reveals the issue I think, will investigate further to try to understand what is actually happening here.

Hmppffff... this is... annoying, but not really a bug, in that code is behaving as expected:
*Deleting the object make the obdata (the mesh) unused, so it's not written in the .blend file
*However, since the mesh still exist, the shapekey data is still used, hence written to the .blend file.
So on next load, blend file has shapekeys with no associated geometry...

Will check if this can be quickly addressed for this special case, otherwise it will fall under the known TODO/design task of data handling around file saving, see #61209 and #87490.

Hmppffff... this is... annoying, but not really a bug, in that code is behaving as expected: *Deleting the object make the obdata (the mesh) unused, so it's not written in the .blend file *However, since the mesh still exist, the shapekey data is still used, hence written to the .blend file. So on next load, blend file has shapekeys with no associated geometry... Will check if this can be quickly addressed for this special case, otherwise it will fall under the known TODO/design task of data handling around file saving, see #61209 and #87490.
Member

@mont29 I guess this explains the behaviour when I use File > Revert it won't prompt me the error (since the data still exists in the memory)?

@mont29 I guess this explains the behaviour when I use `File > Revert` it won't prompt me the error (since the data still exists in the memory)?

@ChengduLittleA not sure what you mean? File > Revert merely re-read current loaded file from disk...

@ChengduLittleA not sure what you mean? `File > Revert` merely re-read current loaded file from disk...
Member

@mont29 yeah, I save the file after deleting the object with shape key, then revert, it never gives me this error this way, unless I reopen blender it will show the "invalid 'from' pointer".

@mont29 yeah, I save the file after deleting the object with shape key, then revert, it never gives me this error this way, unless I reopen blender it will show the "invalid 'from' pointer".
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-09-04 16:14:32 +02:00
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
4 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#111905
No description provided.