Error registering addons disabled by Load Factory Settings (from preferences window) #67577
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#67577
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?
System Information
Operating system: Arch Linux 64 bit
Graphics card: Nvidia 660m
Blender Version
Broken: 2.80rc2, 2.83 beta (
c57f65c088
)Short description of error
Load Factory Settings resets addon preferences before addons have a chance to unregister
Exact steps for others to reproduce the error
During unregistering, this error occurs:
Added subscriber: @Imaginer
Added subscriber: @GavinScott
Happens on Windows as well. I get problems with some but not all addons. After enabling add-ons, then Loading Factory Settings the addons show as disabled but attempting to enable them results in various errors suggesting that the Load Factory Settings did not un-register them but did disable them.
Workaround is to exit Blender and start with --factory-startup
Load Factory Settings resets addon preferences to earlyto Error registering addons disabled by Load Factory Settings (from preferences window)Added subscriber: @ideasman42
Added subscriber: @dr.sybren
Changed status from 'Confirmed' to: 'Resolved'
I cannot reproduce this with the latest Blender release (2.81a), so this appears to have been fixed already.
If the problem is still there with the latest Blender version, please let us know in a comment, including how to reproduce the issue with that version.
Sorry for the late reply, but I can confirm the underlying issue here hasn't been fixed. The reason Magic UV works now is because the code trying to access the preferences in the unregister function wasn't actually needed and was removed with commit: blender/blender-addons@ba7e0de977. This bug can now be reproduced with the object_collection_manager addon (mine).
Changed status from 'Resolved' to: 'Confirmed'
Thanks @dr.sybren !
@ideasman42 I have reopened this task as @Imaginer provided a new way to reproduce it (and I could reproduce it indeed). Do you know if access to
bpy.context.preferences.addons[__package__]
is guaranteed to work? In other words, is this an issue with Blender (i.e. something that should exist doesn't) or is it an issue with the add-on (i.e. accessing something that isn't guaranteed to exist)?From what I can see, Blender does the following when loading factory settings:
One of the issues why this is not just a matter of accessing
bpy.context.preferences.addons[__package__]
is that the add-on tries to unregister submodules based on the user preferences:Of course if the
unregister()
function is called after the user preferences have been reset, this is no longer possible. I do something similar with the Blender Cloud add-on: when the current Cloud project is set up for Attract, it registers a handler so that I can draw on the VSE, and this handler of course has to be unregistered when unloading. If the user preferences are reset at that time, it won't have any current Cloud project, so it wouldn't known it has to unregister that draw handler.It could also be argued that unregistration should always be complete, and should not rely on the user preferences at all. I'd be fine with this too, but that would require proper documentation; currently the reference doc for bpy.context.preferences.addons doesn't mention this.
Any update on this? I'm really trying not to be pushy and I'm sure you have lots of things to deal with, but I'd prefer it if my addon wasn't released with blender 2.83 (LTS) with a bug where loading factory settings completely breaks it.
This issue was referenced by
f18ed7ad89
Changed status from 'Confirmed' to: 'Resolved'
@ideasman42 Thanks for fixing this. Everything works perfectly now! :D
This issue was referenced by
e69f70e11f
This issue was referenced by
eba3aa1837
Changed status from 'Resolved' to: 'Confirmed'
Reverted in 2.83, although I have a fix prepared for 2.90, will test & commit tomorrow.
This issue was referenced by
f0df4d6c35
Changed status from 'Confirmed' to: 'Resolved'