GreasePencil: Crash when changing to Vertex Color mode in Draw mode #82833

Closed
opened 2020-11-19 06:35:10 +01:00 by 炎臻 · 16 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 980/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71

Blender Version
Broken: version: 2.92.0 Alpha, branch: master, commit date: 2020-11-18 22:29, hash: 9d6d5b9beb
Worked: 2.90.1


Short description of error

Crash when changing to Vertex Color mode in Draw mode.
Occurs in Blender 2.92.0 Alpha and 2.91.0 Beta.


Exact steps for others to reproduce the error

{icon fa-plus} OS Conditon: WIN 10 |Blender: 2.92.0 Alpha

  • Default scene.
  • Create a Grease Pencil Blank ,go into Draw mode and change to the Vertex Color mode, then make a stroke

Below is a simple file in which the default cube is deleted and having a blank Grease Pencil object in Draw mode:untitled.blend

untitled pic.png
Crash should be able to reproduced by turning on the Vertex Color mode.

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 980/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71 **Blender Version** Broken: version: 2.92.0 Alpha, branch: master, commit date: 2020-11-18 22:29, hash: `9d6d5b9beb` Worked: 2.90.1 --- ## Short description of error Crash when changing to Vertex Color mode in Draw mode. Occurs in Blender 2.92.0 Alpha and 2.91.0 Beta. --- ## Exact steps for others to reproduce the error {icon fa-plus} OS Conditon: **WIN 10** |Blender: **2.92.0 Alpha** - Default scene. - Create a __Grease Pencil Blank__ ,go into __Draw mode__ and change to the __Vertex Color mode__, then make a stroke Below is a simple file in which the default cube is deleted and having a __blank Grease Pencil object__ in __Draw mode__:[untitled.blend](https://archive.blender.org/developer/F9324543/untitled.blend) ![untitled pic.png](https://archive.blender.org/developer/F9324549/untitled_pic.png) Crash should be able to reproduced by turning on the __Vertex Color mode__.
Author

Added subscriber: @PrettyFireNOI7

Added subscriber: @PrettyFireNOI7

#82836 was marked as duplicate of this issue

#82836 was marked as duplicate of this issue
Antonio Vazquez self-assigned this 2020-11-19 09:03:38 +01:00

I cannot reproduce it using last source code.

I cannot reproduce it using last source code.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Can reproduce with 8ec6b34b8e.

You have to make a stroke after changing to Vertex Color mode

but->tip is NULL

1  __strchr_avx2                                             0x7ffff7945fcc 
2  ui_but_tip_len_only_first_line interface_query.c    466   0x466a3c6      
3  ui_apply_but_undo              interface_handlers.c 835   0x4629d01      
4  button_activate_exit           interface_handlers.c 8214  0x463e9c2      
5  ui_handle_button_event         interface_handlers.c 8951  0x464052a      
6  ui_region_handler              interface_handlers.c 10681 0x464470d      
7  wm_handler_ui_call             wm_event_system.c    639   0x386dec5      
8  wm_handlers_do_intern          wm_event_system.c    2764  0x38733bc      
9  wm_handlers_do                 wm_event_system.c    2872  0x38737b4      
10 wm_event_do_handlers           wm_event_system.c    3368  0x3874dca      
11 WM_main                        wm.c                 635   0x3869039      
12 main                           creator.c            522   0x32f3842  

Will bisect.

Can reproduce with 8ec6b34b8e. You have to make a stroke after changing to Vertex Color mode `but->tip` is NULL ``` 1 __strchr_avx2 0x7ffff7945fcc 2 ui_but_tip_len_only_first_line interface_query.c 466 0x466a3c6 3 ui_apply_but_undo interface_handlers.c 835 0x4629d01 4 button_activate_exit interface_handlers.c 8214 0x463e9c2 5 ui_handle_button_event interface_handlers.c 8951 0x464052a 6 ui_region_handler interface_handlers.c 10681 0x464470d 7 wm_handler_ui_call wm_event_system.c 639 0x386dec5 8 wm_handlers_do_intern wm_event_system.c 2764 0x38733bc 9 wm_handlers_do wm_event_system.c 2872 0x38737b4 10 wm_event_do_handlers wm_event_system.c 3368 0x3874dca 11 WM_main wm.c 635 0x3869039 12 main creator.c 522 0x32f3842 ``` Will bisect.
Antonio Vazquez removed their assignment 2020-11-19 10:07:00 +01:00

Added subscriber: @antoniov

Added subscriber: @antoniov

@lichtwerk I see now. Is this related to GPencil? Looking at the callstack I see it looks related to UI code.

@lichtwerk I see now. Is this related to GPencil? Looking at the callstack I see it looks related to UI code.
Member

Caused by 0688309988

Caused by 0688309988
Member

This should do the trick
P1804: Fix #82833



diff --git a/source/blender/editors/interface/interface_query.c b/source/blender/editors/interface/interface_query.c
index d0075ba8617..7be7ca7cad0 100644
--- a/source/blender/editors/interface/interface_query.c
+++ b/source/blender/editors/interface/interface_query.c
@@ -463,6 +463,9 @@ size_t ui_but_drawstr_len_without_sep_char(const uiBut *but)
 
 size_t ui_but_tip_len_only_first_line(const uiBut *but)
 {
+  if (but->tip == NULL) {
+    return 0;
+  }
   const char *str_sep = strchr(but->tip, '\n');
   if (str_sep != NULL) {
     return (str_sep - but->tip);
This should do the trick [P1804: Fix #82833](https://archive.blender.org/developer/P1804.txt) ``` diff --git a/source/blender/editors/interface/interface_query.c b/source/blender/editors/interface/interface_query.c index d0075ba8617..7be7ca7cad0 100644 --- a/source/blender/editors/interface/interface_query.c +++ b/source/blender/editors/interface/interface_query.c @@ -463,6 +463,9 @@ size_t ui_but_drawstr_len_without_sep_char(const uiBut *but) size_t ui_but_tip_len_only_first_line(const uiBut *but) { + if (but->tip == NULL) { + return 0; + } const char *str_sep = strchr(but->tip, '\n'); if (str_sep != NULL) { return (str_sep - but->tip); ```
Member

This should do the trick
P1804: Fix #82833



diff --git a/source/blender/editors/interface/interface_query.c b/source/blender/editors/interface/interface_query.c
index d0075ba8617..7be7ca7cad0 100644
--- a/source/blender/editors/interface/interface_query.c
+++ b/source/blender/editors/interface/interface_query.c
@@ -463,6 +463,9 @@ size_t ui_but_drawstr_len_without_sep_char(const uiBut *but)
 
 size_t ui_but_tip_len_only_first_line(const uiBut *but)
 {
+  if (but->tip == NULL) {
+    return 0;
+  }
   const char *str_sep = strchr(but->tip, '\n');
   if (str_sep != NULL) {
     return (str_sep - but->tip);
This should do the trick [P1804: Fix #82833](https://archive.blender.org/developer/P1804.txt) ``` diff --git a/source/blender/editors/interface/interface_query.c b/source/blender/editors/interface/interface_query.c index d0075ba8617..7be7ca7cad0 100644 --- a/source/blender/editors/interface/interface_query.c +++ b/source/blender/editors/interface/interface_query.c @@ -463,6 +463,9 @@ size_t ui_but_drawstr_len_without_sep_char(const uiBut *but) size_t ui_but_tip_len_only_first_line(const uiBut *but) { + if (but->tip == NULL) { + return 0; + } const char *str_sep = strchr(but->tip, '\n'); if (str_sep != NULL) { return (str_sep - but->tip); ```
Member

Added subscriber: @JSM

Added subscriber: @JSM

This issue was referenced by 256e77c987

This issue was referenced by 256e77c987d2d8a3c1fc672eb75b3efe32441789

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Dalai Felinto self-assigned this 2020-11-19 10:39:40 +01:00

Small note, @PrettyFireNOI7 nice presentation of the bug report. Usually it is not encouraged to deviate from the template, but I actually like what you did here

Small note, @PrettyFireNOI7 nice presentation of the bug report. Usually it is not encouraged to deviate from the template, but I actually like what you did here
Author

In #82833#1057624, @dfelinto wrote:
Small note, @PrettyFireNOI7 nice presentation of the bug report. Usually it is not encouraged to deviate from the template, but I actually like what you did here

Thank you.

> In #82833#1057624, @dfelinto wrote: > Small note, @PrettyFireNOI7 nice presentation of the bug report. Usually it is not encouraged to deviate from the template, but I actually like what you did here Thank you.
Thomas Dinges added this to the 2.91 milestone 2023-02-08 16:20:08 +01: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
5 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#82833
No description provided.