Crash when opening the Compositor in an old file #117795

Closed
opened 2024-02-04 03:53:45 +01:00 by Pablo Vazquez · 7 comments
Member

System Information
Operating system: Windows-10-10.0.22631-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.23

Blender Version
Broken: version: 4.1.0 Alpha, branch: main, commit date: 2024-02-02 22:23, hash: f355b2026216
Worked: Blender 2.83.20 LTS

Short description of error
When working on a really old file (started in 2.59, saved in 2.64), I noticed that opening the compositor would crash constantly.

I've deleted everything in the scene, all datablocks, all viewlayers, all workspaces, but there's no way I can open the compositor not even in a completely empty scene.

Crashes in 4.0, and previous too.

The only way I managed to make it work, is by removing all compositing nodes via Python, but even then after I can enter the Compositor, switching to the Options tab makes it crash again.

Exact steps for others to reproduce the error

  1. Open the attached compositor_crash_report.blend file.
  2. Switch to the Compositor workspace (or manually switch any editor to the Compositor)

It's not a huge deal if it's not possible to fix, but I'm just curious where it crashes since I've deleted everything already.

**System Information** Operating system: Windows-10-10.0.22631-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.23 **Blender Version** Broken: version: 4.1.0 Alpha, branch: main, commit date: 2024-02-02 22:23, hash: `f355b2026216` Worked: Blender 2.83.20 LTS **Short description of error** When working on a really old file (started in 2.59, saved in 2.64), I noticed that opening the compositor would crash constantly. I've deleted everything in the scene, all datablocks, all viewlayers, all workspaces, but there's no way I can open the compositor not even in a completely empty scene. Crashes in 4.0, and previous too. The only way I managed to make it work, is by removing all compositing nodes via Python, but even then after I can enter the Compositor, switching to the Options tab makes it crash again. **Exact steps for others to reproduce the error** 1. Open the attached `compositor_crash_report.blend` file. 2. Switch to the Compositor workspace (or manually switch any editor to the Compositor) It's not a huge deal if it's not possible to fix, but I'm just curious where it crashes since I've deleted everything already.
Pablo Vazquez added the
Status
Needs Triage
Severity
Normal
Type
Report
labels 2024-02-04 03:53:45 +01:00

Can confirm, override_owner_id->override_library was null.

BKE_lib_override_library_is_system_defined(const Main * bmain, const ID * id) (/home/me/blender-git/1/source/blender/blenkernel/intern/lib_override.cc:337)
rna_property_editable_do(PointerRNA * ptr, PropertyRNA * prop_orig, const int index, const char ** r_info) (/home/me/blender-git/1/source/blender/makesrna/intern/rna_access.cc:2138)
RNA_property_editable_info(PointerRNA * ptr, PropertyRNA * prop, const char ** r_info) (/home/me/blender-git/1/source/blender/makesrna/intern/rna_access.cc:2164)
ui_def_but_rna(uiBlock * block, int type, int retval, const char * str, int x, int y, short width, short height, PointerRNA * ptr, PropertyRNA * prop, int index, float min, float max, float a1, float a2, const char * tip) (/home/me/blender-git/1/source/blender/editors/interface/interface.cc:4690)
uiDefButR_prop(uiBlock * block, int type, int retval, const char * str, int x, int y, short width, short height, PointerRNA * ptr, PropertyRNA * prop, int index, float min, float max, float a1, float a2, const char * tip) (/home/me/blender-git/1/source/blender/editors/interface/interface.cc:5296)
uiDefAutoButR(uiBlock * block, PointerRNA * ptr, PropertyRNA * prop, int index, const char * name, int icon, int x, int y, int width, int height) (/home/me/blender-git/1/source/blender/editors/interface/interface_utils.cc:106)
uiItemFullR(uiLayout * layout, PointerRNA * ptr, PropertyRNA * prop, int index, int value, eUI_Item_Flag flag, const char * name, int icon, const char * placeholder) (/home/me/blender-git/1/source/blender/editors/interface/interface_layout.cc:2448)
uiItemR(uiLayout * layout, PointerRNA * ptr, const char * propname, const eUI_Item_Flag flag, const char * name, int icon) (/home/me/blender-git/1/source/blender/editors/interface/interface_layout.cc:2559)
blender::nodes::node_composite_alpha_over_cc::node_composit_buts_alphaover(uiLayout * layout, PointerRNA * ptr) (/home/me/blender-git/1/source/blender/nodes/composite/nodes/node_composite_alpha_over.cc:51)
blender::ed::space_node::node_update_basis_buttons(const bContext & C, bNodeTree & ntree, bNode & node, blender::nodes::PanelDrawButtonsFunction draw_buttons, uiBlock & block, int & dy) (/home/me/blender-git/1/source/blender/editors/space_node/node_draw.cc:408)
blender::ed::space_node::node_update_basis_from_socket_lists(const bContext & C, bNodeTree & ntree, bNode & node, uiBlock & block, const int locx, int & locy) (/home/me/blender-git/1/source/blender/editors/space_node/node_draw.cc:914)
blender::ed::space_node::node_update_basis(const bContext & C, bNodeTree & ntree, bNode & node, uiBlock & block) (/home/me/blender-git/1/source/blender/editors/space_node/node_draw.cc:958)
blender::ed::space_node::node_update_nodetree(const bContext & C, TreeDrawContext & tree_draw_ctx, bNodeTree & ntree, blender::Span<bNode*> nodes, blender::Span<uiBlock*> blocks) (/home/me/blender-git/1/source/blender/editors/space_node/node_draw.cc:3564)
blender::ed::space_node::draw_nodetree(const bContext & C, ARegion & region, bNodeTree & ntree, bNodeInstanceKey parent_key) (/home/me/blender-git/1/source/blender/editors/space_node/node_draw.cc:4146)
blender::ed::space_node::node_draw_space(const bContext & C, ARegion & region) (/home/me/blender-git/1/source/blender/editors/space_node/node_draw.cc:4255)
blender::ed::space_node::node_main_region_draw(const bContext * C, ARegion * region) (/home/me/blender-git/1/source/blender/editors/space_node/space_node.cc:835)
ED_region_do_draw(bContext * C, ARegion * region) (/home/me/blender-git/1/source/blender/editors/screen/area.cc:532)
wm_draw_window_offscreen(bContext * C, wmWindow * win, bool stereo) (/home/me/blender-git/1/source/blender/windowmanager/intern/wm_draw.cc:1007)
wm_draw_window(bContext * C, wmWindow * win) (/home/me/blender-git/1/source/blender/windowmanager/intern/wm_draw.cc:1174)
wm_draw_update(bContext * C) (/home/me/blender-git/1/source/blender/windowmanager/intern/wm_draw.cc:1572)
WM_main(bContext * C) (/home/me/blender-git/1/source/blender/windowmanager/intern/wm.cc:619)
main(int argc, const char ** argv) (/home/me/blender-git/1/source/creator/creator.cc:575)
Can confirm, `override_owner_id->override_library` was null. ``` BKE_lib_override_library_is_system_defined(const Main * bmain, const ID * id) (/home/me/blender-git/1/source/blender/blenkernel/intern/lib_override.cc:337) rna_property_editable_do(PointerRNA * ptr, PropertyRNA * prop_orig, const int index, const char ** r_info) (/home/me/blender-git/1/source/blender/makesrna/intern/rna_access.cc:2138) RNA_property_editable_info(PointerRNA * ptr, PropertyRNA * prop, const char ** r_info) (/home/me/blender-git/1/source/blender/makesrna/intern/rna_access.cc:2164) ui_def_but_rna(uiBlock * block, int type, int retval, const char * str, int x, int y, short width, short height, PointerRNA * ptr, PropertyRNA * prop, int index, float min, float max, float a1, float a2, const char * tip) (/home/me/blender-git/1/source/blender/editors/interface/interface.cc:4690) uiDefButR_prop(uiBlock * block, int type, int retval, const char * str, int x, int y, short width, short height, PointerRNA * ptr, PropertyRNA * prop, int index, float min, float max, float a1, float a2, const char * tip) (/home/me/blender-git/1/source/blender/editors/interface/interface.cc:5296) uiDefAutoButR(uiBlock * block, PointerRNA * ptr, PropertyRNA * prop, int index, const char * name, int icon, int x, int y, int width, int height) (/home/me/blender-git/1/source/blender/editors/interface/interface_utils.cc:106) uiItemFullR(uiLayout * layout, PointerRNA * ptr, PropertyRNA * prop, int index, int value, eUI_Item_Flag flag, const char * name, int icon, const char * placeholder) (/home/me/blender-git/1/source/blender/editors/interface/interface_layout.cc:2448) uiItemR(uiLayout * layout, PointerRNA * ptr, const char * propname, const eUI_Item_Flag flag, const char * name, int icon) (/home/me/blender-git/1/source/blender/editors/interface/interface_layout.cc:2559) blender::nodes::node_composite_alpha_over_cc::node_composit_buts_alphaover(uiLayout * layout, PointerRNA * ptr) (/home/me/blender-git/1/source/blender/nodes/composite/nodes/node_composite_alpha_over.cc:51) blender::ed::space_node::node_update_basis_buttons(const bContext & C, bNodeTree & ntree, bNode & node, blender::nodes::PanelDrawButtonsFunction draw_buttons, uiBlock & block, int & dy) (/home/me/blender-git/1/source/blender/editors/space_node/node_draw.cc:408) blender::ed::space_node::node_update_basis_from_socket_lists(const bContext & C, bNodeTree & ntree, bNode & node, uiBlock & block, const int locx, int & locy) (/home/me/blender-git/1/source/blender/editors/space_node/node_draw.cc:914) blender::ed::space_node::node_update_basis(const bContext & C, bNodeTree & ntree, bNode & node, uiBlock & block) (/home/me/blender-git/1/source/blender/editors/space_node/node_draw.cc:958) blender::ed::space_node::node_update_nodetree(const bContext & C, TreeDrawContext & tree_draw_ctx, bNodeTree & ntree, blender::Span<bNode*> nodes, blender::Span<uiBlock*> blocks) (/home/me/blender-git/1/source/blender/editors/space_node/node_draw.cc:3564) blender::ed::space_node::draw_nodetree(const bContext & C, ARegion & region, bNodeTree & ntree, bNodeInstanceKey parent_key) (/home/me/blender-git/1/source/blender/editors/space_node/node_draw.cc:4146) blender::ed::space_node::node_draw_space(const bContext & C, ARegion & region) (/home/me/blender-git/1/source/blender/editors/space_node/node_draw.cc:4255) blender::ed::space_node::node_main_region_draw(const bContext * C, ARegion * region) (/home/me/blender-git/1/source/blender/editors/space_node/space_node.cc:835) ED_region_do_draw(bContext * C, ARegion * region) (/home/me/blender-git/1/source/blender/editors/screen/area.cc:532) wm_draw_window_offscreen(bContext * C, wmWindow * win, bool stereo) (/home/me/blender-git/1/source/blender/windowmanager/intern/wm_draw.cc:1007) wm_draw_window(bContext * C, wmWindow * win) (/home/me/blender-git/1/source/blender/windowmanager/intern/wm_draw.cc:1174) wm_draw_update(bContext * C) (/home/me/blender-git/1/source/blender/windowmanager/intern/wm_draw.cc:1572) WM_main(bContext * C) (/home/me/blender-git/1/source/blender/windowmanager/intern/wm.cc:619) main(int argc, const char ** argv) (/home/me/blender-git/1/source/creator/creator.cc:575) ```
Richard Antalik added
Module
Core
Severity
High
Status
Confirmed
and removed
Severity
Normal
Status
Needs Triage
labels 2024-02-04 21:35:17 +01:00

@mont29 This seems to be crashing somewhere in the override system. These null pointer checks make it open, but not sure if there is a deeper problem.

diff --git a/source/blender/blenkernel/intern/lib_override.cc b/source/blender/blenkernel/intern/lib_override.cc
index 96981a5c45b..46187e5d835 100644
--- a/source/blender/blenkernel/intern/lib_override.cc
+++ b/source/blender/blenkernel/intern/lib_override.cc
@@ -332,9 +332,9 @@ bool BKE_lib_override_library_is_user_edited(const ID *id)
 bool BKE_lib_override_library_is_system_defined(const Main *bmain, const ID *id)
 {
   if (ID_IS_OVERRIDE_LIBRARY(id)) {
-    const ID *override_owner_id;
-    BKE_lib_override_library_get(bmain, id, nullptr, &override_owner_id);
-    return (override_owner_id->override_library->flag & LIBOVERRIDE_FLAG_SYSTEM_DEFINED) != 0;
+    const IDOverrideLibrary *override_library = BKE_lib_override_library_get(
+        bmain, id, nullptr, nullptr);
+    return override_library && ((override_library->flag & LIBOVERRIDE_FLAG_SYSTEM_DEFINED) != 0);
   }
   return false;
 }
diff --git a/source/blender/makesrna/intern/rna_access_compare_override.cc b/source/blender/makesrna/intern/rna_access_compare_override.cc
index 582482c68dc..722f1c7cb2b 100644
--- a/source/blender/makesrna/intern/rna_access_compare_override.cc
+++ b/source/blender/makesrna/intern/rna_access_compare_override.cc
@@ -1661,7 +1661,7 @@ IDOverrideLibraryProperty *RNA_property_override_property_find(Main *bmain,
   std::optional<std::string> rna_path;
 
   *r_owner_id = rna_property_override_property_real_id_owner(bmain, ptr, prop, &rna_path);
-  if (rna_path) {
+  if (rna_path && (*r_owner_id)->override_library) {
     IDOverrideLibraryProperty *op = BKE_lib_override_library_property_find(
         (*r_owner_id)->override_library, rna_path->c_str());
     return op;
@@ -1681,7 +1681,7 @@ IDOverrideLibraryProperty *RNA_property_override_property_get(Main *bmain,
   }
 
   ID *id = rna_property_override_property_real_id_owner(bmain, ptr, prop, &rna_path);
-  if (rna_path) {
+  if (rna_path && id->override_library) {
     IDOverrideLibraryProperty *op = BKE_lib_override_library_property_get(
         id->override_library, rna_path->c_str(), r_created);
     return op;
@mont29 This seems to be crashing somewhere in the override system. These null pointer checks make it open, but not sure if there is a deeper problem. ```Diff diff --git a/source/blender/blenkernel/intern/lib_override.cc b/source/blender/blenkernel/intern/lib_override.cc index 96981a5c45b..46187e5d835 100644 --- a/source/blender/blenkernel/intern/lib_override.cc +++ b/source/blender/blenkernel/intern/lib_override.cc @@ -332,9 +332,9 @@ bool BKE_lib_override_library_is_user_edited(const ID *id) bool BKE_lib_override_library_is_system_defined(const Main *bmain, const ID *id) { if (ID_IS_OVERRIDE_LIBRARY(id)) { - const ID *override_owner_id; - BKE_lib_override_library_get(bmain, id, nullptr, &override_owner_id); - return (override_owner_id->override_library->flag & LIBOVERRIDE_FLAG_SYSTEM_DEFINED) != 0; + const IDOverrideLibrary *override_library = BKE_lib_override_library_get( + bmain, id, nullptr, nullptr); + return override_library && ((override_library->flag & LIBOVERRIDE_FLAG_SYSTEM_DEFINED) != 0); } return false; } diff --git a/source/blender/makesrna/intern/rna_access_compare_override.cc b/source/blender/makesrna/intern/rna_access_compare_override.cc index 582482c68dc..722f1c7cb2b 100644 --- a/source/blender/makesrna/intern/rna_access_compare_override.cc +++ b/source/blender/makesrna/intern/rna_access_compare_override.cc @@ -1661,7 +1661,7 @@ IDOverrideLibraryProperty *RNA_property_override_property_find(Main *bmain, std::optional<std::string> rna_path; *r_owner_id = rna_property_override_property_real_id_owner(bmain, ptr, prop, &rna_path); - if (rna_path) { + if (rna_path && (*r_owner_id)->override_library) { IDOverrideLibraryProperty *op = BKE_lib_override_library_property_find( (*r_owner_id)->override_library, rna_path->c_str()); return op; @@ -1681,7 +1681,7 @@ IDOverrideLibraryProperty *RNA_property_override_property_get(Main *bmain, } ID *id = rna_property_override_property_real_id_owner(bmain, ptr, prop, &rna_path); - if (rna_path) { + if (rna_path && id->override_library) { IDOverrideLibraryProperty *op = BKE_lib_override_library_property_get( id->override_library, rna_path->c_str(), r_created); return op; ```

That is... very old indeed :|

I guess the liboverrides come from the conversion of the proxies here. But will need deeper investigation to understand what is actually happening am afraid. there should never be null liboverride data pointer in such case afaik.

That is... very old indeed :| I guess the liboverrides come from the conversion of the proxies here. But will need deeper investigation to understand what is actually happening am afraid. there should never be null liboverride data pointer in such case afaik.

@pablovazquez the file you attached seems to have been saved with Blender 4.0... Mind attaching the original files?

I suspect we have a doversion issue on the ID.flag itself here (it makes absolutely no sense for the compositing nodetree of the scene to have its embedded liboverride flag set).

@pablovazquez the file you attached seems to have been saved with Blender 4.0... Mind attaching the original files? I suspect we have a doversion issue on the `ID.flag` itself here (it makes absolutely no sense for the compositing nodetree of the scene to have its `embedded liboverride` flag set).

actually... I think I know what is the issue: versioning code clearing all non-persistent flags in IDs (for 2.76.5 blendfile version)... did not cover embedded IDs!

This comes from when the only ID.flag data was split in persistent flags, and runtime tags, in 3fcf535d2e.

Note that we can easily fix the conversion of older files. But I don't think we can do anything about files converted and saved again by more recent versions of Blender having this bug.

actually... I think I know what is the issue: versioning code clearing all non-persistent flags in IDs (for 2.76.5 blendfile version)... did not cover embedded IDs! This comes from when the only `ID.flag` data was split in persistent flags, and runtime tags, in 3fcf535d2e. Note that we can easily fix the conversion of older files. But I don't think we can do anything about files converted and saved again by more recent versions of Blender having this bug.

@pablovazquez PR !118921 should in theory fix the issue when opening the 2.64 file.

I cannot imagine a way to solve the cases like your 2.4 file reliably (though we could for sure address this specific case with some post-reading validation checks).

@pablovazquez PR !118921 should in theory fix the issue when opening the 2.64 file. I cannot imagine a way to solve the cases like your 2.4 file reliably (though we could for sure address this specific case with some post-reading validation checks).
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-03-01 11:28:54 +01:00
Author
Member

@pablovazquez the file you attached seems to have been saved with Blender 4.0... Mind attaching the original files?

I wasn't around at the time but I've got plenty of old files (saved in the original version) so I can keep an eye if I find similar crashes.

Thanks for the fix and research! There's nothing like going through old files and opening it in a modern Blender.

> @pablovazquez the file you attached seems to have been saved with Blender 4.0... Mind attaching the original files? I wasn't around at the time but I've got plenty of old files (saved in the original version) so I can keep an eye if I find similar crashes. Thanks for the fix and research! There's nothing like going through old files and opening it in a modern Blender.
Sign in to join this conversation.
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
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#117795
No description provided.