Crash with new Datablock ID Properties #51198
Labels
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
8 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#51198
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Short description of error
Blender crashes when an object with the new Datablock ID Properties
a7b3047cef
references itself or when two objects reference each other.Exact steps for others to reproduce the error
Now this scene can lead to two crashes I discovered so far:
Crash 1:
select cube, choose Lamp from prop dropdown in Custom Properties
select lamp, choose Cube from prop dropdown in Custom Properties
crash
Crash 2:
select cube, choose Cube from prop dropdown in Custom Properties
crash
Edit: Important detail I forgot:
It only happens when setting the prop value by hand, not when it is done in Python.
The Python script can't trigger the crash, for example this line works (while it crashes when done by hand):
System Information
Linux 64 bit (Ubuntu 14.04)
Blender Version
Broken: 2.78
575d641
(says the splashscreen, I built from Blender master, so it's 2.79dev)datablock_crash.blend
Changed status to: 'Open'
Added subscriber: @BYOB
Added subscriber: @SteffenD
Added subscriber: @bliblubli
Added subscriber: @mont29
I've found the reason for this crash, and also found forward compatibility issue. I'm working on it.
The reason of crash is infinite recursion, which happens in RNA_pointer_as_string.
I've also found python crash if you will try to remove the custom property pressing "-" button.
This is my solution for these two issues: P464
And one issue with forward compatibility, which I couldn't solve yet:
crash inside
rna_ensure_property always returns NULL for IDP_ID for Blender builds before D113. This crash happens for me only when I'm opening "Custom Properties" panel.
@mont29, could you help please?
Possible solution for forward compatibility issue: P465
Added subscribers: @Sergey, @ideasman42
@AlexanderRomanov mostly fine with P464 (rna part of it at least, not convinced by python changes there).
But P465 is a no-go for me, imho it is totally unacceptable to twist that way our .blend file just to ensure forward compat (not to mention how evil it is to change actual data, even if only for a few micro seconds, in writefile!). I’m tempted to consider this a bug in previous blender (if a function can return NULL and is not checked, then bug is in code using it). Can only think about protecting against this for future (e.g. by nuking IDProps of unknown type at read time, keeping them around is call for issues anyway at some point)… Would not mind @Sergey or @ideasman42 input here though.
@mont29 for first part of P464 I've recorded the video: https://youtu.be/jF0CtWQPsC4
@AlexanderRomanov aaaah oki, see the issue now. But this -remove property' button makes absolutely no sense for API-defined IDProps! Nuked it in
42c8d93c5f
. ;)So you can commit the RNA part of P464.
For the forward compat issue, we need advice from other devs. ;)
@mont29, we indeed should not modify anything from the main database during file save. This was known for giving issues in the past. What i remember happening at some point is that we were constructing temp copy of the objects and made modifications on those. Need to be careful tho, because that will modify pointers of the struct itself.
@Sergey yes, temp structs is the way to go here - while keeping orig pointer one as 'uuid' (pointer value in file), to ensure re-allocating temp memory later in write process does not re-use same mem pointer…
But that’s not the main issue here, main issue is that P465 horribly tweaks IDProps to save them in a way that new pointer IDProps do not make older blender crash when loading a file saved with those new properties. Imho this is not really acceptable, especially since the root of the issue remains - should we introduce a new IDProp type in the future, it will again make older Blender crash. So to me this is a bug in current code, that is trivial to fix (e.g. by removing any unknown IDProp type at read time), but we should not try to fix this for previous versions… As ugly as it is :(
This issue was referenced by
31c644b657
Changed status from 'Open' to: 'Resolved'