New-file causes Python assert with negative reference count #94708

Closed
opened 2022-01-07 07:41:16 +01:00 by Campbell Barton · 4 comments

When Blender is built against a debug Python library the following steps cause a negative reference count and asserts.

This can be redone with the following steps:

  • Run Blender with factory settings.
  • Press W once (to set the circle select tool).
  • Ctrl-N, Enter (to make a new file).

Blender exits with the following error.

source/blender/python/intern/bpy_rna_callback.c:267: _Py_NegativeRefcount: Assertion failed: object has negative ref count
Enable tracemalloc to get the memory block allocation traceback

object address  : 0x7fda4ad5dcc0
object refcount : -1
object type     : 0x55a5d0f754a0
object type name: tuple
object repr     : <refcnt -1 at 0x7fda4ad5dcc0>

Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed
Python runtime state: initialized

Current thread 0x00007fda712548c0 (most recent call first):
  File "/src/cmake_debug/bin/3.1/scripts/startup/bl_ui/space_toolsystem_common.py", line 1073 in _activate_by_item
  File "/src/cmake_debug/bin/3.1/scripts/startup/bl_ui/space_toolsystem_common.py", line 1091 in activate_by_id
  File "/src/cmake_debug/bin/3.1/scripts/startup/bl_operators/wm.py", line 2119 in execute

Extension modules: bpy.props, bpy.app.icons, bpy.app.timers, bpy.utils.units, bpy.types, mathutils.geometry, mathutils.interpolate, mathutils.noise, mathutils, idprop, gpu.capabilities, gpu.matrix, gpu.platform, gpu.select, gpu.shader, gpu.state, gpu.texture (total: 17)

Reporting this for reference.

When Blender is built against a debug Python library the following steps cause a negative reference count and asserts. This can be redone with the following steps: - Run Blender with factory settings. - Press W once (to set the circle select tool). - Ctrl-N, Enter (to make a new file). Blender exits with the following error. ``` source/blender/python/intern/bpy_rna_callback.c:267: _Py_NegativeRefcount: Assertion failed: object has negative ref count Enable tracemalloc to get the memory block allocation traceback object address : 0x7fda4ad5dcc0 object refcount : -1 object type : 0x55a5d0f754a0 object type name: tuple object repr : <refcnt -1 at 0x7fda4ad5dcc0> Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed Python runtime state: initialized Current thread 0x00007fda712548c0 (most recent call first): File "/src/cmake_debug/bin/3.1/scripts/startup/bl_ui/space_toolsystem_common.py", line 1073 in _activate_by_item File "/src/cmake_debug/bin/3.1/scripts/startup/bl_ui/space_toolsystem_common.py", line 1091 in activate_by_id File "/src/cmake_debug/bin/3.1/scripts/startup/bl_operators/wm.py", line 2119 in execute Extension modules: bpy.props, bpy.app.icons, bpy.app.timers, bpy.utils.units, bpy.types, mathutils.geometry, mathutils.interpolate, mathutils.noise, mathutils, idprop, gpu.capabilities, gpu.matrix, gpu.platform, gpu.select, gpu.shader, gpu.state, gpu.texture (total: 17) ``` --- Reporting this for reference.
Campbell Barton self-assigned this 2022-01-07 07:41:16 +01:00
Author
Owner

Added subscriber: @ideasman42

Added subscriber: @ideasman42

This issue was referenced by 3b686b8233

This issue was referenced by 3b686b823353e02a4c0b8dbfcbe176caaec2438d

This issue was referenced by f24854005d

This issue was referenced by f24854005d8688fb86cf41bd62a63580c63f818d
Author
Owner

Changed status from 'Needs Triage' to: 'Resolved'

Changed status from 'Needs Triage' to: 'Resolved'
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
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
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 & 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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & 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
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#94708
No description provided.