Crash: Opening a 3.3 project crashes 3.6/4.0 #114582
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#114582
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
System Information
Operating system: Windows-11-10.0.22631-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 546.01
Blender Version
Broken: version: 3.6.5, 4.0.0 Beta, branch: blender-v4.0-release, commit date: 2023-11-06 20:53, hash:
abe925d0c671
Worked: 3.3.12
Short description of error
Open the .blend with 3.6/4.0, it will crash immediately.
Exact steps for others to reproduce the error
Sadly I don't know what causes this, we got this .blend from a user because he couldn't upload it to our render farm.
I cleaned it up as much as I could.
@LukasTonne /
The test file has a simulation zone in it, which does not load correctly and crashes (
storage
of the sim zone input node is null).Simulation zones were introduced in 3.6, so i doubt the file is originally from 3.3. I could reproduce the same issue when adding a simulation zone in 3.6, loading the file in 3.3 and saving in that version. It will then crash in 3.6 and 4.0, for the same reason.
This is a limitation of forward versioning. The new sim zone input node type is set as "Undefined" when loading in 3.3, but saving it again will keep the node type identifier. This feature works well for custom nodes which may not be defined due to a missing library or similar, so trying to restore the node on loading makes sense. Custom nodes store all custom data in ID properties, which can be loaded and re-saved without full type knowledge. But for built-in nodes this behavior causes broken data when jumping back and forth between versions.
We might do a similar thing as with unknown built-in socket types (#114401), but i have to discuss this with core devs.
@JacquesLucke @brecht
Any opinion on this matter? Should we remove unknown built-in nodes from on loading in 3.x to prevent saving invalid data, or is switching versions like this simply unsupported?
I think we should not crash one way or the other.
Perhaps we can just remove nodes that need storage but are missing it? Where
bNodeType.storagename
is non-empty andbNode.storage
is null.I would suggest to just discard any unknown built-in node types (custom nodes are left untouched).
In #114401 i initially also just discarded sockets that use
default_value
and tried to keep the rest working (there are a few socket types that don't usedefault_value
). But that assumes that such built-in sockets can still be fully serialized without knowing their type. We changed it to simply discard any unknown builtin socket type, whether it usesdefault_value
or not, since we cannot guarantee that such data can be deserialized and serialized again properly.I think it's good to have some node visible the node graph to indicate that there used to be something there. I don't think keeping the node type is important, but keeping the node name and position can be helpful for a user to see that something went wrong and/or manually fix things.
That's true, but the issue i ran into with the sockets was that handling an unknown type is not something the various node systems necessarily support. We'll need to make sure that unknown node/socket types (at least the special
NodeTypeUndefined
) is handled properly by renderers, compositors, geonodes, etc. instead of just crashing. No point in being able to do a round trip if the file just crashes in 4.0 eventually. This should be a supported graceful failure case, but i don't think there are any actual tests since it doesn't come up during regular use.On second thought: It should be easier to do this with nodes than with sockets. The
NodeTypeUndefined
is already handled, so if i replace unknown nodes with that type it should work. Socket types don't have an equivalent "undefined" type that is universally supported.Lukas Tönne referenced this issue2023-11-13 16:38:40 +01:00
I had to revert the fix for this, since it breaks versioning. It would check if the type exists before versioning runs, but versioning might change it to a new type.
I think the code from the PR can move from
ntree_blend_read_data
tontree_blend_read_after_liblink
. This is also where it setsnode->typeinfo
, so that means at this point thenode->type
is expected to be correct. I also checked that versioning code for changes tonode->type
is all happening before lib linking, and not after lib linking.