API Unexpected timer event after clicking the Modifier sort area in UI #113697

Closed
opened 2023-10-13 21:26:58 +02:00 by Y.T-LAW · 1 comment

System Information
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 537.34

Blender Version
Broken: version: 3.6.1, branch: blender-v3.6-release, commit date: 2023-07-17 12:50, hash: 8bda729ef4dc
Worked:

Short description of error
Unexpected timer event after clicking the Modifier sort area in the User Interface.

Exact steps for others to reproduce the error
Consider this script works fine and nothing printed in console when run the script.

  1. Open Blender with factory settings and run the script.
import bpy

class ModalOperator(bpy.types.Operator):
    bl_idname = "object.test_operator"
    bl_label = "Test Modal Operator"

    def modal(self, context, event):
        if event.type == "ESC":
            return {'FINISHED'}

        if event.type == "TIMER":
            print('Unexpected timer event...')

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        context.window_manager.modal_handler_add(self)
        return {'RUNNING_MODAL'}


def register():
    bpy.utils.register_class(ModalOperator)

def unregister():
    bpy.utils.unregister_class(ModalOperator)

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.object.test_operator('INVOKE_DEFAULT')

Now, Open Blender with factory settings and add a modifier to the Cube.

  1. Clicking the Sort Area.
    image
  2. Run script
  3. Console prints a lot of unexpected messages.

It messes up the operator in my project when user clicking on the Sort Area since I'm using a timer event in the operator to calculate something.

**System Information** Operating system: Windows-10-10.0.22621-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2080 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 537.34 **Blender Version** Broken: version: 3.6.1, branch: blender-v3.6-release, commit date: 2023-07-17 12:50, hash: `8bda729ef4dc` Worked: **Short description of error** Unexpected timer event after clicking the Modifier sort area in the User Interface. **Exact steps for others to reproduce the error** Consider this script works fine and nothing printed in console when run the script. 1. Open Blender with factory settings and run the script. ``` Python import bpy class ModalOperator(bpy.types.Operator): bl_idname = "object.test_operator" bl_label = "Test Modal Operator" def modal(self, context, event): if event.type == "ESC": return {'FINISHED'} if event.type == "TIMER": print('Unexpected timer event...') return {'RUNNING_MODAL'} def invoke(self, context, event): context.window_manager.modal_handler_add(self) return {'RUNNING_MODAL'} def register(): bpy.utils.register_class(ModalOperator) def unregister(): bpy.utils.unregister_class(ModalOperator) if __name__ == "__main__": register() # test call bpy.ops.object.test_operator('INVOKE_DEFAULT') ``` Now, Open Blender with factory settings and add a modifier to the _Cube_. 1. Clicking the _Sort Area_. ![image](/attachments/bf6bae6d-880a-4056-bced-b0aeaaf3b986) 2. Run script 3. Console prints a lot of unexpected messages. It messes up the operator in my project when user clicking on the _Sort Area_ since I'm using a timer event in the operator to calculate something.
4.8 KiB
Y.T-LAW added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-10-13 21:26:58 +02:00

Confirmed, and this occurs for any Panel being reordered by dragging etc. (not just the modifier panels)

Panel drag reorder operations are leaking a timer instance, and have been for the past several versions at least.

Confirmed, and this occurs for any Panel being reordered by dragging etc. (not just the modifier panels) Panel drag reorder operations are leaking a timer instance, and have been for the past several versions at least.
Jesse Yurkovich added
Module
User Interface
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-10-13 23:51:36 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-10-16 04:00:32 +02:00
Sign in to join this conversation.
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
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#113697
No description provided.