Skip to content

Renaming sun object (in outliner) creates duplicate; undoing causes segfault #94

@Diti

Description

@Diti

The PSA add-on crashes (__init__.py, line 147 in sun_handler) during undoing (Ctrl–Z) if PSA’s sun object has been renamed in the Outliner’s View Layer (where the list of collections and objects is displayed in Blender’s GUI). Undo is a natural operation because the renaming creates a duplicate sun (so the add-on doesn’t like the sun being renamed).

General information

  • Blender version: 4.0.2.
  • Addon version: 1.7.1.
  • Engine: irrelevant.
  • Operating System: NixOS.

Consistent segfaults

  1. Factory startup.
  2. Enable add-on for the scene.
  3. Double-click the Starlight Sun item in the outliner, and rename it (to “global.sun” in most of my scenes).
  4. Undo with Ctrl–Z.

Inconsistent segfaults

I have gotten other related segfaults that aren’t related to the outliner, but I haven’t been able to fully replicate yet.

  • add-on crashes most of the time when I rename & Ctrl–Z while I am directly placed in the OBJECT context in the GUI (without having visited the DATA context first), for example by having enabled PSA using the N-Panel.
  • crash doesn’t happen if I visited the DATA context before visiting the OBJECT context and then renaming & Ctrl–Z.
  • sometimes doesn’t crash at all when doing the renaming & Ctrl–Z in the OBJECT context (maybe depending on whether Blender is run with or without depgraph debug ?).

Either way, crashes always happen if the renaming happened in the outliner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions