GPencil: Blender crash when GP3 enabled & you open the default 2D animation file #111266

Open
opened 2023-08-18 15:17:23 +02:00 by Mohamed · 3 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.23

Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-08-17 23:26, hash: 0fb4c107db92
Worked: 3.6

Short description of error
Blender crash when GP3 enabled & you open the default 2D animation file & use the Draw tool

Exact steps for others to reproduce the error

  • enable GP3 under the experimental features
  • save preferences and restart Blender
  • do File > New > 2D Animation
  • try to draw something.

Since my 2D animation file is customized, I included it below.

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.23 **Blender Version** Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-08-17 23:26, hash: `0fb4c107db92` Worked: 3.6 **Short description of error** Blender crash when GP3 enabled & you open the default 2D animation file & use the Draw tool **Exact steps for others to reproduce the error** - enable GP3 under the experimental features - save preferences and restart Blender - do File > New > 2D Animation - try to draw something. Since my 2D animation file is customized, I included it below.
Mohamed added the
Type
Report
Priority
Normal
Status
Needs Triage
labels 2023-08-18 15:17:24 +02:00
Germano Cavalcante added
Module
Grease Pencil
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-08-18 21:17:43 +02:00

I can confirm the crash:

>	blender.exe!blender::Vector<blender::bke::greasepencil::StrokePoint,4,blender::GuardedAllocator>::ensure_space_for_one() Line 1000	C++
 	blender.exe!blender::Vector<blender::bke::greasepencil::StrokePoint,4,blender::GuardedAllocator>::append_as<blender::bke::greasepencil::StrokePoint>(blender::bke::greasepencil::StrokePoint && <value_0>) Line 464	C++
 	blender.exe!blender::Vector<blender::bke::greasepencil::StrokePoint,4,blender::GuardedAllocator>::append(blender::bke::greasepencil::StrokePoint && value) Line 459	C++
 	blender.exe!blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::execute(blender::ed::sculpt_paint::greasepencil::PaintOperation & __formal, const bContext & C, const blender::ed::sculpt_paint::InputSample & extension_sample) Line 64	C++
 	blender.exe!blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_extended(const bContext & C, const blender::ed::sculpt_paint::InputSample & extension_sample) Line 76	C++
 	blender.exe!blender::ed::sculpt_paint::stroke_update_step(bContext * C, wmOperator * __formal, PaintStroke * stroke, PointerRNA * stroke_element) Line 106	C++
 	blender.exe!paint_brush_stroke_add_step(bContext * C, wmOperator * op, PaintStroke * stroke, const float * mval, float pressure) Line 640	C++
 	blender.exe!paint_stroke_modal(bContext * C, wmOperator * op, const wmEvent * event, PaintStroke * * stroke_p) Line 1611	C++
 	blender.exe!blender::ed::sculpt_paint::grease_pencil_stroke_modal(bContext * C, wmOperator * op, const wmEvent * event) Line 149	C++
 	blender.exe!blender::ed::sculpt_paint::grease_pencil_stroke_invoke(bContext * C, wmOperator * op, const wmEvent * event) Line 137	C++
 	blender.exe!wm_operator_invoke(bContext * C, wmOperatorType * ot, const wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1530	C++
 	blender.exe!wm_handler_operator_call(bContext * C, ListBase * handlers, wmEventHandler * handler_base, wmEvent * event, PointerRNA * properties, const char * kmi_idname) Line 2565	C++
 	blender.exe!wm_handlers_do_keymap_with_keymap_handler(bContext * C, wmEvent * event, ListBase * handlers, wmEventHandler_Keymap * handler, wmKeyMap * keymap, const bool do_debug_handler) Line 2967	C++
 	blender.exe!wm_handlers_do_intern(bContext * C, wmWindow * win, wmEvent * event, ListBase * handlers) Line 3298	C++
 	blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 3436	C++
 	blender.exe!wm_event_do_region_handlers(bContext * C, wmEvent * event, ARegion * region) Line 3863	C++
 	blender.exe!wm_event_do_handlers_area_regions(bContext * C, wmEvent * event, ScrArea * area) Line 3895	C++
 	blender.exe!wm_event_do_handlers(bContext * C) Line 4118	C++
 	blender.exe!WM_main(bContext * C) Line 637	C++
 	blender.exe!main(int argc, const char * * __formal) Line 596	C++
 	[External Code]	

I can confirm the crash: ``` > blender.exe!blender::Vector<blender::bke::greasepencil::StrokePoint,4,blender::GuardedAllocator>::ensure_space_for_one() Line 1000 C++ blender.exe!blender::Vector<blender::bke::greasepencil::StrokePoint,4,blender::GuardedAllocator>::append_as<blender::bke::greasepencil::StrokePoint>(blender::bke::greasepencil::StrokePoint && <value_0>) Line 464 C++ blender.exe!blender::Vector<blender::bke::greasepencil::StrokePoint,4,blender::GuardedAllocator>::append(blender::bke::greasepencil::StrokePoint && value) Line 459 C++ blender.exe!blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::execute(blender::ed::sculpt_paint::greasepencil::PaintOperation & __formal, const bContext & C, const blender::ed::sculpt_paint::InputSample & extension_sample) Line 64 C++ blender.exe!blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_extended(const bContext & C, const blender::ed::sculpt_paint::InputSample & extension_sample) Line 76 C++ blender.exe!blender::ed::sculpt_paint::stroke_update_step(bContext * C, wmOperator * __formal, PaintStroke * stroke, PointerRNA * stroke_element) Line 106 C++ blender.exe!paint_brush_stroke_add_step(bContext * C, wmOperator * op, PaintStroke * stroke, const float * mval, float pressure) Line 640 C++ blender.exe!paint_stroke_modal(bContext * C, wmOperator * op, const wmEvent * event, PaintStroke * * stroke_p) Line 1611 C++ blender.exe!blender::ed::sculpt_paint::grease_pencil_stroke_modal(bContext * C, wmOperator * op, const wmEvent * event) Line 149 C++ blender.exe!blender::ed::sculpt_paint::grease_pencil_stroke_invoke(bContext * C, wmOperator * op, const wmEvent * event) Line 137 C++ blender.exe!wm_operator_invoke(bContext * C, wmOperatorType * ot, const wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1530 C++ blender.exe!wm_handler_operator_call(bContext * C, ListBase * handlers, wmEventHandler * handler_base, wmEvent * event, PointerRNA * properties, const char * kmi_idname) Line 2565 C++ blender.exe!wm_handlers_do_keymap_with_keymap_handler(bContext * C, wmEvent * event, ListBase * handlers, wmEventHandler_Keymap * handler, wmKeyMap * keymap, const bool do_debug_handler) Line 2967 C++ blender.exe!wm_handlers_do_intern(bContext * C, wmWindow * win, wmEvent * event, ListBase * handlers) Line 3298 C++ blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 3436 C++ blender.exe!wm_event_do_region_handlers(bContext * C, wmEvent * event, ARegion * region) Line 3863 C++ blender.exe!wm_event_do_handlers_area_regions(bContext * C, wmEvent * event, ScrArea * area) Line 3895 C++ blender.exe!wm_event_do_handlers(bContext * C) Line 4118 C++ blender.exe!WM_main(bContext * C) Line 637 C++ blender.exe!main(int argc, const char * * __formal) Line 596 C++ [External Code] ```
Member

Can confirm as well. In 2d animation file, object type is GPENCIL instead of GREASEPENCIL.
Maybe we'd need some versioning code to convert legacy grease pencil to GPv3 (it may be too early to add the versioning code though)

Can confirm as well. In `2d animation` file, object type is GPENCIL instead of GREASEPENCIL. Maybe we'd need some versioning code to convert legacy grease pencil to GPv3 (it may be too early to add the versioning code though)
Member

Yes the crash is happening because we can't version the grease pencil objects yet. While the experimental option is selected, this specific crash is expected for now.

The crash can be avoided by loading the template, then going to object mode, then either using the operator search or the menu Convert > Grease Pencil. That will convert the object to the new type.

Yes the crash is happening because we can't version the grease pencil objects yet. While the experimental option is selected, this specific crash is expected for now. The crash can be avoided by loading the template, then going to object mode, then either using the operator search or the menu `Convert` > `Grease Pencil`. That will convert the object to the new type.
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#111266
No description provided.