liboverride_troubleshoot_operation(): fails with context incorrect, even with screen.areas.type == 'OUTLINER' #118299
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#118299
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-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: (newest version of Blender that worked as expected)
Short description of error
liboverride_troubleshoot_operation(): fails with context incorrect, even a loop test for
screen.areas.type == 'OUTLINER'
Exact steps for others to reproduce the error
save the file library.blend in a folder.
save the file problem.blend in the same folder.
open the file problem.blend
Run the displayed text python script.
Notice the error in console window:
RuntimeError: Operator bpy.ops.outliner.liboverride_troubleshoot_operation.poll() failed, context is incorrect
I think the operator is primarily meant for UI usage.
Why not use the API for that?
https://docs.blender.org/api/4.2/bpy.types.IDOverrideLibrary.html#bpy.types.IDOverrideLibrary
because blender crashes? "Houston: we have a problem". See attached crash logs. Also updating problem.blend used in combo with library.blend to update the script that causes a crash. note that I had to reference rig instead of Jeans, as jeans returns None for
object.override_library
I can confirm we now have a problem :)
I can now not open the
problem.blend
anymore without crashing. (even in slightly older blender versions)Have you updated the file(s) in the original report description as well (the first comment)?
So are has any of object.override_library.XXX() already run in
problem.blend
? (that might have "corrupted" it)Note we also had a related fix just in (you know, #118055)
The crash logs are from 4.0.2 which does not have the mentioned fix, have you retried this in a fresh build from https://builder.blender.org/download/daily/ ?
Oh, now I see 4.0.2 still opens it fine, checking...
OK, so seems the lib was using
Library Override templates
?These were removed in
25ab53a4af
[which will now crash loadingproblem.blend
]Unless you have
No Override Auto Resync
turned ON :@mont29 : I can imagine this is expected behavior?
Coming back to the original problem:
problem.blend
So I guess this leaves us with the following:
Library Override templates
that still have an issue with using the APIobject.override_library.XXX()
?LibOverrides templates have been removed, yes, but this should not crash. Expected behavior is to just get regular local data in such case.
Fix incoming.
@mont29 : thx for the fix.
Will reopen though since the original issue is about something else
poking on this one ^^
this confuses me. I'm not sure when I'd ever use a library_override method on anything not involving a linked library that needs an override.
I have just re-tested with the daily build "blender-4.2.0-alpha+main.fbf47b9a126a-windows.amd64-release" and I still get a crash.
The comment was about not using
Library Override templates
(and the original file from this report are using these, no?)I am saying this because when using
Library Override templates
, you get this in the console after their removal in25ab53a4af
fbf47b9a12
is from Feb07 (so that one does not have the fix in), could you check if this is still crashing for you in 4.1 or other fresh builds? On my side I dont get a crash here anymore. Also, if I use the files from #118299 (comment), the script can now be executed without errors, can you confirm this?Yes this seems to work!