Assert Dragging & dropping color in the Image Editor (double UNDO push?) #72476

Closed
opened 2019-12-16 13:15:54 +01:00 by Philipp Oeser · 7 comments
Member

System Information
Operating system: Linux-5.3.12-200.fc30.x86_64-x86_64-with-fedora-30-Thirty 64 Bits
Graphics card: GeForce GTX 970M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.31

Blender Version
Broken: version: 2.82 (sub 5), branch: master, commit date: 2019-12-16 11:41, hash: bbc97fc533
Worked: (optional)

Short description of error
Assert Dragging & dropping color in the Image Editor from the color button onto the image.
(also reported in #72440, but that crash was fixed...)

Exact steps for others to reproduce the error
assert_drag_drop_color.blend

  • Open file
  • Drag white color from the color button in the tool settings onto the image
  • Assert

BLI_assert failed: /blender/source/blender/blenkernel/intern/undo_system.c:457, BKE_undosys_step_push_init_with_type(), at 'ustack->step_init == ((void *)0)'
ustack->step_init is not NULL (already has Drop Color, wants to do for ED_imapaint_bucket_fill as well, so seems like two undo pushes where only one is allowed?)

1  raise                                                       0x7ffff1ae4e35 
2  abort                                                       0x7ffff1acf895 
3  BKE_undosys_step_push_init_with_type undo_system.c     457  0x3f9fdeb      
4  image_undo_push_begin                image_undo.c      1017 0x3e95f0f      
5  ED_image_undo_push_begin             image_undo.c      1026 0x3e95fa9      
6  ED_imapaint_bucket_fill              paint_image.c     1308 0x3b5edcf      
7  drop_color_invoke                    interface_ops.c   1700 0x3d67d3c      
8  wm_operator_invoke                   wm_event_system.c 1441 0x32e9559      
9  wm_operator_call_internal            wm_event_system.c 1688 0x32e9e5c      
10 wm_handlers_do_intern                wm_event_system.c 2773 0x32eca78      
11 wm_handlers_do                       wm_event_system.c 2993 0x32ed5a2      
12 wm_event_do_handlers                 wm_event_system.c 3480 0x32eebf6      
13 WM_main                              wm.c              417  0x32e1ba2      
14 main                                 creator.c         496  0x2d17ef6
**System Information** Operating system: Linux-5.3.12-200.fc30.x86_64-x86_64-with-fedora-30-Thirty 64 Bits Graphics card: GeForce GTX 970M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.31 **Blender Version** Broken: version: 2.82 (sub 5), branch: master, commit date: 2019-12-16 11:41, hash: `bbc97fc533` Worked: (optional) **Short description of error** Assert Dragging & dropping color in the Image Editor from the color button onto the image. (also reported in #72440, but that crash was fixed...) **Exact steps for others to reproduce the error** [assert_drag_drop_color.blend](https://archive.blender.org/developer/F8225823/assert_drag_drop_color.blend) - Open file - Drag white color from the color button in the tool settings onto the image - Assert `BLI_assert failed: /blender/source/blender/blenkernel/intern/undo_system.c:457, BKE_undosys_step_push_init_with_type(), at 'ustack->step_init == ((void *)0)'` `ustack->step_init` is not NULL (already has `Drop Color`, wants to do for `ED_imapaint_bucket_fill` as well, so seems like two undo pushes where only one is allowed?) ``` 1 raise 0x7ffff1ae4e35 2 abort 0x7ffff1acf895 3 BKE_undosys_step_push_init_with_type undo_system.c 457 0x3f9fdeb 4 image_undo_push_begin image_undo.c 1017 0x3e95f0f 5 ED_image_undo_push_begin image_undo.c 1026 0x3e95fa9 6 ED_imapaint_bucket_fill paint_image.c 1308 0x3b5edcf 7 drop_color_invoke interface_ops.c 1700 0x3d67d3c 8 wm_operator_invoke wm_event_system.c 1441 0x32e9559 9 wm_operator_call_internal wm_event_system.c 1688 0x32e9e5c 10 wm_handlers_do_intern wm_event_system.c 2773 0x32eca78 11 wm_handlers_do wm_event_system.c 2993 0x32ed5a2 12 wm_event_do_handlers wm_event_system.c 3480 0x32eebf6 13 WM_main wm.c 417 0x32e1ba2 14 main creator.c 496 0x2d17ef6 ```
Author
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Author
Member

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Author
Member
CC @ideasman42

Added subscriber: @rjg

Added subscriber: @rjg

There are actually two issues with ED_imapaint_bucket_fill(), the undo and the call to paint_2d_bucket_fill().

The undo breaks because ED_imapaint_bucket_fill() calls BKE_undosys_step_push_init_with_type() and ED_image_undo_push_begin() which also tries to initialize the undo step with BKE_undosys_step_push_init_with_type(). Removing the BKE_undosys_step_push_init_with_type() in ED_imapaint_bucket_fill() would fix this problem. I'm not very familiar with the undo system, but the BKE_undosys_step_push() could probably be replaced with ED_image_undo_push_end().

The call to paint_2d_bucket_fill() has the last argument set to NULL which results in a NULL pointer dereferencing. The strength should therefore be set to 1.0f by default and only retrieve the brush alpha when both the pointer to the brush and the image paint state aren't NULL.

There are actually two issues with `ED_imapaint_bucket_fill()`, the undo and the call to `paint_2d_bucket_fill()`. The undo breaks because `ED_imapaint_bucket_fill()` calls `BKE_undosys_step_push_init_with_type()` *and* `ED_image_undo_push_begin()` which also tries to initialize the undo step with `BKE_undosys_step_push_init_with_type()`. Removing the `BKE_undosys_step_push_init_with_type()` in `ED_imapaint_bucket_fill()` would fix this problem. I'm not very familiar with the undo system, but the `BKE_undosys_step_push()` could probably be replaced with `ED_image_undo_push_end()`. The call to `paint_2d_bucket_fill()` has the last argument set to `NULL` which results in a `NULL` pointer dereferencing. The `strength` should therefore be set to `1.0f` by default and only retrieve the brush alpha when *both* the pointer to the brush and the image paint state aren't `NULL`.
Robert Guetzkow self-assigned this 2020-04-07 22:32:34 +02:00

This issue was referenced by bb1e794d58

This issue was referenced by bb1e794d5800b450b53161e9cd9a682c2d6816b1

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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#72476
No description provided.