Modal operator causes a crash when using the REDO operation #61738
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#61738
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: Win10
Graphics card: nVidia 1070
Blender Version
Broken: 2.80 (sub 45), branch: master, commit date: 2019-02-19 23:18, hash:
855b3e68ef
, type: ReleaseWorked: n/a
Short description of error
A custom modal operator seems to cause an AccessViolation when you shift+r (REDO) the operator
Exact steps for others to reproduce the error
modal_redo_bug.blend
Added subscriber: @deadpin
Added subscriber: @JacquesLucke
@ideasman42, seems to be related to your refactoring of the
wmEventHandler
struct (thanks for that btw!).This isn't a new issue it happens in 2.79b and isn't related to recent changes in 2.8.
While this is a bug in Blender, this code is working in a way that isn't supported.
The redo causes many instances of this operator to be called, reaches the maximum limit, then frees the first.
Our convention is to only register a modal operator on
invoke
, and perform an action onexecute
, if this is followed the error wont occur.Looking over Blender's code, we never call
WM_event_add_modal_handler
from an execution callback, so it might be best to disable this altogether so modal operators can only be started byinvoke
.Added subscriber: @brecht
Agree, modal handlers were never meant to be used from execute, it's for use together with invoke.
Understood, this is unsupported here. +1 to disable this ability, somehow, if it doesn't add much code burden.
I can restructure my operator to handle the invoke vs. execute differences I think in the meantime.
Added subscriber: @ideasman42
Added subscriber: @ckohl_art