Extensions: Segmentation fault (core dumped) upon closing Blender #118678

Closed
opened 2024-02-23 18:42:13 +01:00 by Dalai Felinto · 4 comments

System Information
Operating system: Linux-5.15.0-94-generic-x86_64-with-glibc2.35 64 Bits, X11 UI

Blender Version
Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-02-23 13:04, hash: 03833417b3d8
Worked: -

Short description of error
Segmentation fault (core dumped) upon closing Blender after installing and the uninstalling an extension.

Exact steps for others to reproduce the error

  • Install Border Buddy (extension).
  • Uninstall Border Buddy
  • Close Blender

Segmentation fault (core dumped)

blender$ cat /tmp/blender.crash.txt # Blender 4.2.0, Commit date: 2024-02-23 13:04, Hash 03833417b3 Sync repo: https://extensions.blender.org # Info Sync downloading remote data # Info Sync complete: https://extensions.blender.org # Info Installed "border_buddy" # Info Installed "deep_dark_sea" # Info Removed "deep_dark_sea" # Info Removed "border_buddy" # Info

backtrace

/home/dfelinto/src/blender/build_linux_full/bin/blender() [0xf891e7]
/home/dfelinto/src/blender/build_linux_full/bin/blender() [0x83fb5c]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7feefd6fe520]
[0x7feeae3462f0]

Python backtrace

File "/home/dfelinto/.config/blender/4.2/extensions/blender_official/border_buddy/border_buddy.py", line 4 in border_update

**System Information** Operating system: Linux-5.15.0-94-generic-x86_64-with-glibc2.35 64 Bits, X11 UI **Blender Version** Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-02-23 13:04, hash: `03833417b3d8` Worked: - **Short description of error** Segmentation fault (core dumped) upon closing Blender after installing and the uninstalling an extension. **Exact steps for others to reproduce the error** * Install Border Buddy (extension). * Uninstall Border Buddy * Close Blender Segmentation fault (core dumped) <details> <summary> blender$ cat /tmp/blender.crash.txt </summary> # Blender 4.2.0, Commit date: 2024-02-23 13:04, Hash 03833417b3d8 Sync repo: https://extensions.blender.org # Info Sync downloading remote data # Info Sync complete: https://extensions.blender.org # Info Installed "border_buddy" # Info Installed "deep_dark_sea" # Info Removed "deep_dark_sea" # Info Removed "border_buddy" # Info # backtrace /home/dfelinto/src/blender/build_linux_full/bin/blender() [0xf891e7] /home/dfelinto/src/blender/build_linux_full/bin/blender() [0x83fb5c] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7feefd6fe520] [0x7feeae3462f0] # Python backtrace File "/home/dfelinto/.config/blender/4.2/extensions/blender_official/border_buddy/border_buddy.py", line 4 in border_update </details>
Dalai Felinto added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2024-02-23 18:42:14 +01:00
Campbell Barton was assigned by Dalai Felinto 2024-02-23 18:42:26 +01:00
Dalai Felinto added this to the Python API project 2024-02-23 18:42:32 +01:00
Dalai Felinto added
Status
Confirmed
Type
Bug
and removed
Status
Needs Triage
Type
Report
labels 2024-02-23 18:42:44 +01:00

The unregister function in this add-on doesn't unregister the property or the depsgraph update handler.

Adding these lines to border_buddy.py, unregister() resolves.

    bpy.app.handlers.depsgraph_update_post.remove(border_update)
    del bpy.types.Scene.border_saver_props

Submitted MR to resolve.


Of course ideally it wouldn't crash, a fix on Blender's side would likely involve all dynamically registered bpy.types.PropertyGroup keeping track of all their users & raising an error on removal if any references remained.

Setting as a known issue even though ideally the crash would ideally report an error instead - because it is expected that an add-on's unregister function is working properly.

The unregister function in this add-on doesn't unregister the property or the depsgraph update handler. Adding these lines to `border_buddy.py`, `unregister()` resolves. ``` bpy.app.handlers.depsgraph_update_post.remove(border_update) del bpy.types.Scene.border_saver_props ``` Submitted [MR](https://gitlab.com/simonthommes/random-blender-scripts/-/merge_requests/2) to resolve. ---- Of course ideally it wouldn't crash, a fix on Blender's side would likely involve all dynamically registered `bpy.types.PropertyGroup` keeping track of all their users & raising an error on removal if any references remained. Setting as a known issue even though ideally the crash would ideally report an error instead - because it is expected that an add-on's unregister function is working properly.
Campbell Barton added
Priority
Low
Type
Known Issue
and removed
Priority
Normal
Type
Bug
labels 2024-02-25 04:46:08 +01:00

For this report to be complete, the cause of the crash needs to be extracted into minimal script which causes the error.

For this report to be complete, the cause of the crash needs to be extracted into minimal script which causes the error.
Campbell Barton added
Status
Needs Information from User
and removed
Status
Confirmed
labels 2024-02-26 00:14:16 +01:00
Member

@dfelinto hi, any updates? 🙃

@dfelinto hi, any updates? 🙃
Author
Owner

I tried to simplify but I cannot reproduce the issue anymore (either with the latest or the old Blender), either with a simpler script or the original.

Closing it then.

I tried to simplify but I cannot reproduce the issue anymore (either with the latest or the old Blender), either with a simpler script or the original. Closing it then.
Blender Bot added
Status
Archived
and removed
Status
Needs Information from User
labels 2024-03-29 15:00:42 +01:00
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
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
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
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
3 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#118678
No description provided.