object.override_library.resync(...) -- crashes when view_layer is not specified #118055

Closed
opened 2024-02-09 18:56:50 +01:00 by James Tomkinson · 3 comments

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

Blender Version
Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: 9be62e85b727
Worked: Never.

Short description of error
object.override_library.resync(...) -- crashes with EXCEPTION_ACCESS_VIOLATION

Exact steps for others to reproduce the error

  1. Open the attached file "crashes.blend" that links objects from the file "library.blend"
  2. Run the displayed script: as included in Text editor:
import bpy

o= bpy.data.objects['Cube']
o.override_library.resync( bpy.context.scene, do_hierarchy_enforce=True )

Notice the program aborts:

ExceptionCode         : EXCEPTION_ACCESS_VIOLATION
Exception Address     : 0x00007FF7AACB8A06

Stack trace:
blender.exe         :0x00007FF7AACB8A00  BKE_view_layer_synced_ensure
blender.exe         :0x00007FF7AADED860  lib_override_library_resync
blender.exe         :0x00007FF7AADEB820  BKE_lib_override_library_resync
blender.exe         :0x00007FF7AB36AD80  rna_ID_override_library_resync
blender.exe         :0x00007FF7AB3636D0  IDOverrideLibrary_resync_call
**System Information** Operating system: Windows-10-10.0.22631-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 546.33 **Blender Version** Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: `9be62e85b727` Worked: Never. **Short description of error** object.override_library.resync(...) -- crashes with EXCEPTION_ACCESS_VIOLATION **Exact steps for others to reproduce the error** 1. Open the attached file "crashes.blend" that links objects from the file "library.blend" 2. Run the displayed script: as included in Text editor: ```Py import bpy o= bpy.data.objects['Cube'] o.override_library.resync( bpy.context.scene, do_hierarchy_enforce=True ) ``` Notice the program aborts: ``` ExceptionCode : EXCEPTION_ACCESS_VIOLATION Exception Address : 0x00007FF7AACB8A06 Stack trace: blender.exe :0x00007FF7AACB8A00 BKE_view_layer_synced_ensure blender.exe :0x00007FF7AADED860 lib_override_library_resync blender.exe :0x00007FF7AADEB820 BKE_lib_override_library_resync blender.exe :0x00007FF7AB36AD80 rna_ID_override_library_resync blender.exe :0x00007FF7AB3636D0 IDOverrideLibrary_resync_call ```
James Tomkinson added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2024-02-09 18:56:50 +01:00
Iliya Katushenock added the
Interest
Overrides
label 2024-02-09 18:58:19 +01:00
Iliya Katushenock added
Module
Core
Status
Confirmed
and removed
Status
Needs Triage
labels 2024-02-09 18:59:46 +01:00
Member

This happens if the view_layer is not specified (it is optional in the function call).

So this doesnt crash:

import bpy

o= bpy.data.objects['Cube']
o.override_library.resync( bpy.context.scene, do_hierarchy_enforce=True, view_layer=bpy.context.view_layer )

Not quite sure about the param description, which says:

The view layer to operate in (same usage as the scenedata, in case it is not provided the scene's collection will be used instead)

Or the comment for BKE_lib_override_library_resync

 * \param view_layer: the active view layer to search instantiated collections in, can be NULL (in
 *                    which case \a scene's master collection children hierarchy is used instead).

@mont29 : I dont really see code (maybe further down the line, but not on first sight) that handles non-specified view_layers, mind checking?

Raising priority since this is a crasher which is not an absoute corner-case to run into...

This happens if the `view_layer` is not specified (it is optional in the function call). So this doesnt crash: ``` import bpy o= bpy.data.objects['Cube'] o.override_library.resync( bpy.context.scene, do_hierarchy_enforce=True, view_layer=bpy.context.view_layer ) ``` Not quite sure about the param description, which says: `The view layer to operate in (same usage as the `scene` data, in case it is not provided the scene's collection will be used instead) ` Or the comment for `BKE_lib_override_library_resync` ``` * \param view_layer: the active view layer to search instantiated collections in, can be NULL (in * which case \a scene's master collection children hierarchy is used instead). ``` @mont29 : I dont really see code (maybe further down the line, but not on first sight) that handles non-specified view_layers, mind checking? Raising priority since this is a crasher which is not an absoute corner-case to run into...
Philipp Oeser added
Interest
Python API
Priority
High
and removed
Priority
Normal
labels 2024-02-12 13:07:37 +01:00
Philipp Oeser changed title from object.override_library.resync(...) -- crashes to object.override_library.resync(...) -- crashes when view_layer is not specified 2024-02-12 13:07:56 +01:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-02-13 12:59:15 +01:00

when I used the coding:

bpy.ops.outliner.liboverride_troubleshoot_operation( type='OVERRIDE_LIBRARY_RESYNC_HIERARCHY', view_layer=bpy.context.view_layer, selection_set='SELECTED')

I get the same error:
RuntimeError: Error: Object 'JBUJeans_9015.Shape.001' can't be selected because it is not in View Layer 'View Layer'!

and I'm not sure why the error is shouting at me (!).

when I used the coding: ``` bpy.ops.outliner.liboverride_troubleshoot_operation( type='OVERRIDE_LIBRARY_RESYNC_HIERARCHY', view_layer=bpy.context.view_layer, selection_set='SELECTED') ``` I get the same error: ```RuntimeError: Error: Object 'JBUJeans_9015.Shape.001' can't be selected because it is not in View Layer 'View Layer'!``` and I'm not sure why the error is shouting at me (!).

UPDATE:
For some reason , it was the set_select that was failing with the view layer error, not the hierarchy.
I am closing this because I no longer get crash and and opening up a new report with new perspective.

UPDATE: For some reason , it was the set_select that was failing with the view layer error, not the hierarchy. I am closing this because I no longer get crash and and opening up a new report with new perspective.
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
2 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#118055
No description provided.