Transformation Gizmo crash when using in Grease Pencil Edit mode #69782

Closed
opened 2019-09-12 09:53:43 +02:00 by B-Lee · 8 comments

Operating system: Microsoft Windows 10 Pro (Version 1903 Build 18362.356)
Graphics card: NVIDIA GeForce GTX 1080 (GeForce Game Ready Driver Version 436.30)

blender 2.81 Alpha, Hash: 1e375ab5a104-windows64, Date: 2019-09-11

Short description of error
Blender crashes in Edit Mode when using tools on toolbar to edit a new added grease pencil stroke. (Tools are highlighted in the reference image.)

GPtools_Crash.jpg

GPtools_Crash.mp4

GPtools_Crash.blend

Operating system: Microsoft Windows 10 Pro (Version 1903 Build 18362.356) Graphics card: NVIDIA GeForce GTX 1080 (GeForce Game Ready Driver Version 436.30) blender 2.81 Alpha, Hash: 1e375ab5a104-windows64, Date: 2019-09-11 **Short description of error** Blender crashes in Edit Mode when using tools on toolbar to edit a new added grease pencil stroke. (Tools are highlighted in the reference image.) ![GPtools_Crash.jpg](https://archive.blender.org/developer/F7738594/GPtools_Crash.jpg) [GPtools_Crash.mp4](https://archive.blender.org/developer/F7738598/GPtools_Crash.mp4) [GPtools_Crash.blend](https://archive.blender.org/developer/F7738599/GPtools_Crash.blend)
Author

Added subscriber: @toki46-3

Added subscriber: @toki46-3

Added subscribers: @ideasman42, @antoniov

Added subscribers: @ideasman42, @antoniov
Campbell Barton was assigned by Antonio Vazquez 2019-09-12 10:32:29 +02:00

I can reproduce it. The problem is the transform_generics.c in function recalcData_objects is checking the 'obedit' object and this is NULL for GPencil.

image.png

@ideasman42 Assign to you because I think you know this area. I could fix it using an if to check if NULL or if OB_GPENCIL and use real object, but I prefer you take a look. Let me know if I can help you

I can reproduce it. The problem is the `transform_generics.c` in function `recalcData_objects` is checking the 'obedit' object and this is NULL for GPencil. ![image.png](https://archive.blender.org/developer/F7738691/image.png) @ideasman42 Assign to you because I think you know this area. I could fix it using an if to check if NULL or if OB_GPENCIL and use real object, but I prefer you take a look. Let me know if I can help you

Proposed Fix:

diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index e4d3c9abceb..e0875fc0ddb 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1008,7 +1008,9 @@ static void recalcData_objects(TransInfo *t)
       }
       FOREACH_TRANS_DATA_CONTAINER (t, tc) {
         if (tc->data_len) {
-          DEG_id_tag_update(tc->obedit->data, 0); /* sets recalc flags */
+          if (tc->obedit) {
+            DEG_id_tag_update(tc->obedit->data, 0); /* sets recalc flags */
+          }
         }
       }
     }

Proposed Fix: ``` diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index e4d3c9abceb..e0875fc0ddb 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1008,7 +1008,9 @@ static void recalcData_objects(TransInfo *t) } FOREACH_TRANS_DATA_CONTAINER (t, tc) { if (tc->data_len) { - DEG_id_tag_update(tc->obedit->data, 0); /* sets recalc flags */ + if (tc->obedit) { + DEG_id_tag_update(tc->obedit->data, 0); /* sets recalc flags */ + } } } } ```
Antonio Vazquez changed title from Grease Pencil: Crash in Edit Mode when using tools on toolbar to Transformation Gizmo crash when using in Grease Pencil Edit mode 2019-09-12 10:48:43 +02:00

Added subscriber: @brecht

Added subscriber: @brecht

This code is not new, it must have been caused by one of the recent commits to this file.

This code is not new, it must have been caused by one of the recent commits to this file.

This issue was referenced by bbae7874c0

This issue was referenced by bbae7874c04b890512eeacdd322f9972d9c773f9

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' 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#69782
No description provided.