Popover crash using a palette with many colors #78317

Closed
opened 2020-06-26 16:52:15 +02:00 by Samuel Santos · 8 comments

System Information
Operating system: Windows-10-10.0.17763-SP0 64 Bits
Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 446.14

Blender Version
Broken: version: 2.83.1, branch: master, commit date: 2020-06-25 09:47, hash: 8289fc688b
Worked: (newest version of Blender that worked as expected)

Short description of error
Blender crashes after import an image, "Extract palette", changes Threshold, and selecting the palette created. The problem only seems to happen with actual pictures with milions of colors, not with draws with not so many different colors.

Exact steps for others to reproduce the error

  • Open blender in "2D Animation" template (but the problem happens in other too)
  • Open an "Image editor"
  • Import a picture with lots of colors
  • In "Image Editor" go in Image > Extract Palette.
  • In the float windows "Extract Palette from Image" (that appears in "Image Editor") change the Threshold to anything different than 1
  • Change the "Paint Mode" to "Vertex Color"

In "Palletes" select the new generated palette and blender should crash.

**System Information** Operating system: Windows-10-10.0.17763-SP0 64 Bits Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 446.14 **Blender Version** Broken: version: 2.83.1, branch: master, commit date: 2020-06-25 09:47, hash: `8289fc688b` Worked: (newest version of Blender that worked as expected) **Short description of error** Blender crashes after import an image, "Extract palette", changes Threshold, and selecting the palette created. The problem only seems to happen with actual pictures with milions of colors, not with draws with not so many different colors. **Exact steps for others to reproduce the error** - Open blender in "2D Animation" template (but the problem happens in other too) - Open an "Image editor" - Import a picture with lots of colors - In "Image Editor" go in Image > Extract Palette. - In the float windows "Extract Palette from Image" (that appears in "Image Editor") change the Threshold to anything different than 1 - Change the "Paint Mode" to "Vertex Color" # In "Palletes" select the new generated palette and blender should crash.
Author

Added subscriber: @SamuelTelles

Added subscriber: @SamuelTelles

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

Changed status from 'Needs Triage' to: 'Confirmed'
Antonio Vazquez changed title from GPencil crash after "Extract Palette" from image and changes in "Threshold" in images with many colors to Crash using a palette with many colors 2020-06-26 20:42:22 +02:00

Added subscriber: @antoniov

Added subscriber: @antoniov

Crash log

!ui_block_align_calc(uiBlock * block, const ARegion * region) Line 439	C
!UI_block_end_ex(const bContext * C, uiBlock * block, const int * xy, int * r_xy) Line 1779	C
!ui_popup_block_refresh(bContext * C, uiPopupBlockHandle * handle, ARegion * butregion, uiBut * but) Line 637	C
!ui_popup_block_create(bContext * C, ARegion * butregion, uiBut * but, uiBlock *(*)(bContext *, ARegion *, void *) create_func, uiBlock *(*)(bContext *, uiPopupBlockHandle *, void *) handle_create_func, void * arg, void(*)(void *) arg_free) Line 832	C
!ui_popover_panel_create(bContext * C, ARegion * butregion, uiBut * but, void(*)(bContext *, uiLayout *, void *) menu_func, void * arg) Line 279	C
!ui_block_open_begin(bContext * C, uiBut * but, uiHandleButtonData * data) Line 4040	C
!button_activate_state(bContext * C, uiBut * but, uiHandleButtonState state) Line 7939	C
!ui_do_but_COLOR(bContext * C, uiBut * but, uiHandleButtonData * data, const wmEvent * event) Line 5855	C
!ui_do_button(bContext * C, uiBlock * block, uiBut * but, const wmEvent * event) Line 7611	C
!ui_handle_button_event(bContext * C, const wmEvent * event, uiBut * but) Line 8873	C
!ui_region_handler(bContext * C, const wmEvent * event, void * UNUSED_userdata) Line 10685	C
!wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, int always_pass) Line 622	C
!wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2743	C
!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 2854	C
!wm_event_do_handlers(bContext * C) Line 3357	C
!WM_main(bContext * C) Line 478	C
!main(int argc, const unsigned char * * UNUSED_argv_c) Line 534	C
 	[External Code]	
Crash log ```!__chkstk() Line 109 Unknown !ui_block_align_calc(uiBlock * block, const ARegion * region) Line 439 C !UI_block_end_ex(const bContext * C, uiBlock * block, const int * xy, int * r_xy) Line 1779 C !ui_popup_block_refresh(bContext * C, uiPopupBlockHandle * handle, ARegion * butregion, uiBut * but) Line 637 C !ui_popup_block_create(bContext * C, ARegion * butregion, uiBut * but, uiBlock *(*)(bContext *, ARegion *, void *) create_func, uiBlock *(*)(bContext *, uiPopupBlockHandle *, void *) handle_create_func, void * arg, void(*)(void *) arg_free) Line 832 C !ui_popover_panel_create(bContext * C, ARegion * butregion, uiBut * but, void(*)(bContext *, uiLayout *, void *) menu_func, void * arg) Line 279 C !ui_block_open_begin(bContext * C, uiBut * but, uiHandleButtonData * data) Line 4040 C !button_activate_state(bContext * C, uiBut * but, uiHandleButtonState state) Line 7939 C !ui_do_but_COLOR(bContext * C, uiBut * but, uiHandleButtonData * data, const wmEvent * event) Line 5855 C !ui_do_button(bContext * C, uiBlock * block, uiBut * but, const wmEvent * event) Line 7611 C !ui_handle_button_event(bContext * C, const wmEvent * event, uiBut * but) Line 8873 C !ui_region_handler(bContext * C, const wmEvent * event, void * UNUSED_userdata) Line 10685 C !wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, int always_pass) Line 622 C !wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2743 C !wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 2854 C !wm_event_do_handlers(bContext * C) Line 3357 C !WM_main(bContext * C) Line 478 C !main(int argc, const unsigned char * * UNUSED_argv_c) Line 534 C [External Code] ```
Antonio Vazquez changed title from Crash using a palette with many colors to Popover crash using a palette with many colors 2020-06-26 20:46:31 +02:00

It looks the size of the popover panel is too big. I think is better limit the size of the palette.

It looks the size of the popover panel is too big. I think is better limit the size of the palette.

After doing test with the palettes, use a threshold greater than 1 has no sense because the number of generated colors is huge. When the thershold is greater than one, any slightly variation in the tone of the color produces a new palette entry,

After doing test with the palettes, use a threshold greater than 1 has no sense because the number of generated colors is huge. When the thershold is greater than one, any slightly variation in the tone of the color produces a new palette entry,
Antonio Vazquez self-assigned this 2020-06-27 10:22:26 +02:00

I have made a change in the extraction of color. Now the threshold has been removed because after doing tests, using a number greater than 1 was not a good solution. See commit fec2b2a809

About the memory crash, the problem was related to try to allocate memory to display a palette with thousands of colors. With the change I have done, I don't think we get a huge palette again, so we can close this report. If in the future we get the crash again, we can open a new report, but it's very improbable.

I have made a change in the extraction of color. Now the threshold has been removed because after doing tests, using a number greater than 1 was not a good solution. See commit fec2b2a809a8 About the memory crash, the problem was related to try to allocate memory to display a palette with thousands of colors. With the change I have done, I don't think we get a huge palette again, so we can close this report. If in the future we get the crash again, we can open a new report, but it's very improbable.

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
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#78317
No description provided.