Unpaired ED_image_undo_push_begin(..) #80885

Closed
opened 2020-09-17 14:56:04 +02:00 by Martijn Versteegh · 10 comments

Broken: 2.91 alpha , d376aea6

Short description of error
In the file source/blender/editors/sculpt_paint/paint_image_proj.c line 6094 in the function texture_paint_camera_project_exec(...):

ED_image_undo_push_begin(op->type->name, PAINT_MODE_TEXTURE_3D) 

is called, but it is not paired with

ED_image_undo_push_end();

Exact steps for others to reproduce the error
If you call the bpy.ops.paint.project_image() operator multiple times in a single script you get an assert about UNDO state not being NULL while it should be.

Possible fix:

I added a call to

ED_image_undo_push_end(); 

right before

return OPERATOR_FINISHED;  

This seems to work and have no ill side effects, but I'm not sure it is completely correct, as the function can still return with OPERATOR_CANCELLED earlier and I'm not sure if ED_image_undo_push_end() should be called then as well.

Broken: 2.91 alpha , d376aea6 **Short description of error** In the file source/blender/editors/sculpt_paint/paint_image_proj.c line 6094 in the function texture_paint_camera_project_exec(...): ``` ED_image_undo_push_begin(op->type->name, PAINT_MODE_TEXTURE_3D) ``` is called, but it is not paired with ``` ED_image_undo_push_end(); ``` **Exact steps for others to reproduce the error** If you call the bpy.ops.paint.project_image() operator multiple times in a single script you get an assert about UNDO state not being NULL while it should be. Possible fix: I added a call to ``` ED_image_undo_push_end(); ``` right before ``` return OPERATOR_FINISHED; ``` This seems to work and have no ill side effects, but I'm not sure it is completely correct, as the function can still return with OPERATOR_CANCELLED earlier and I'm not sure if ED_image_undo_push_end() should be called then as well.
Author
Member

Added subscriber: @Baardaap

Added subscriber: @Baardaap
Martijn Versteegh changed title from Unpaired D_image_undo_push_begin(..) to Unpaired ED_image_undo_push_begin(..) 2020-09-17 14:56:19 +02:00

Added subscribers: @ideasman42, @dfelinto

Added subscribers: @ideasman42, @dfelinto

@Baardaap could you send this as a patch?

@Baardaap could you send this as a patch?
Author
Member

pairundo.patch

Though I'm not sure if this is correct, as I said. There are a few

return OPERATOR_CANCELLED;

statements after the _begin() call, so maybe the _end() call needs to be added before returning there as well?

[pairundo.patch](https://archive.blender.org/developer/F8892504/pairundo.patch) Though I'm not sure if this is correct, as I said. There are a few ``` return OPERATOR_CANCELLED; ``` statements after the _begin() call, so maybe the _end() call needs to be added before returning there as well?
Author
Member

I also created a diff D8937 (I just learned how to do that, I hope I pressed all the right buttons!)

I also created a diff [D8937](https://archive.blender.org/developer/D8937) (I just learned how to do that, I hope I pressed all the right buttons!)

This issue was referenced by f7c5296f1d

This issue was referenced by f7c5296f1d918b94255f50a15a984978c46bf81e

This issue was referenced by a5b6d6de0a

This issue was referenced by a5b6d6de0a2b3cec82cd914d58d0c435dace55b0

This issue was referenced by e6978f4d63

This issue was referenced by e6978f4d63d130b61de7d8f3bdc497750377ae71

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

Changed status from 'Needs Triage' to: 'Resolved'
Campbell Barton self-assigned this 2020-09-18 06:39:43 +02:00
Author
Member

Removed subscriber: @Baardaap

Removed subscriber: @Baardaap
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
4 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#80885
No description provided.