Undo "SVG as Grease Pencil" Crashes #87999

Closed
opened 2021-05-03 02:22:50 +02:00 by adam · 14 comments

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

Blender Version
Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-05-02 20:37, hash: 28bf1d4037
Broken: version: 3.0.0 Alpha

Description
Undoing after Import -> SVG as Grease Pencil crashes Blender.

Steps

  • Select "2D Animation" preset
  • Import -> SVG as Grease Pencil -> SVG File
  • Ctrl-Z (undo) crashes Blender

Note: When "2D Animation" preset is not selected, it doesn't crash, but also doesn't delete the imported file.

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 750/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 465.89 **Blender Version** Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-05-02 20:37, hash: `28bf1d4037` Broken: version: 3.0.0 Alpha **Description** Undoing after Import -> SVG as Grease Pencil crashes Blender. **Steps** - Select "2D Animation" preset - Import -> SVG as Grease Pencil -> SVG File - Ctrl-Z (undo) crashes Blender Note: When "2D Animation" preset is not selected, it doesn't crash, but also doesn't delete the imported file.
Author

Added subscriber: @adm

Added subscriber: @adm
Member

Added subscriber: @filedescriptor

Added subscriber: @filedescriptor
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

I cannot reproduce the crash in the Alpha nor Beta on Linux.

@adm Could you add your system information to the task? (We assume all bug reports to follow the bug report template).

I cannot reproduce the crash in the Alpha nor Beta on Linux. @adm Could you add your system information to the task? (We assume all bug reports to follow the [bug report template](https://developer.blender.org/maniphest/task/edit/form/1/)).
Author

This comment was removed by @adm

*This comment was removed by @adm*

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'

Added subscriber: @antoniov

Added subscriber: @antoniov

Crash in BKE_scene_object_base_flag_sync_from_base()

Crash in `BKE_scene_object_base_flag_sync_from_base()`

Added subscriber: @mont29

Added subscriber: @mont29

I have been testing and this is the result:

  1. Default scene, Cube is active but the focus is not on the cube, Import, Undo->No crash, but NO undo.
  2. Default scene with cube selected, Import, Undo->Crash
  3. Default scene, clear all objects, Import, Undo->Crash

All crashes are in void BKE_scene_object_base_flag_sync_from_base(Base *base) because base->object is NULL

@mont29 Could you help us here? Problem looks related to Undo, maybe a bug or maybe I missed to tag something.

Here a test file:

SVG_Rocket_new.svg

I have been testing and this is the result: 1) Default scene, Cube is active but the focus is not on the cube, Import, Undo->No crash, but NO undo. 2) Default scene with cube selected, Import, Undo->Crash 3) Default scene, clear all objects, Import, Undo->Crash All crashes are in `void BKE_scene_object_base_flag_sync_from_base(Base *base)` because `base->object` is `NULL` @mont29 Could you help us here? Problem looks related to Undo, maybe a bug or maybe I missed to tag something. Here a test file: ![SVG_Rocket_new.svg](https://archive.blender.org/developer/F10051440/SVG_Rocket_new.svg)

Hrmmm.... This smells like some ID being added or changed without proper tagging, or without proper call to collections/layercollections update functions (guys like BKE_main_collection_sync_remap). Or maybe a missing object cache clearing (BKE_collection_object_cache_free)?

Fairly hard to help more without spending time investigating the addon and the RNA functions/properties it uses am afraid.

Hrmmm.... This smells like some ID being added or changed without proper tagging, or without proper call to collections/layercollections update functions (guys like `BKE_main_collection_sync_remap`). Or maybe a missing object cache clearing (`BKE_collection_object_cache_free`)? Fairly hard to help more without spending time investigating the addon and the RNA functions/properties it uses am afraid.

@mont29 The code (C++) is adding a new object and I guess something is missing.

You can see the code in Object *GpencilImporter::create_object()

The function is calling to ED_gpencil_add_object and this calls to ED_object_add_type(C, OB_GPENCIL, NULL, loc, rot, false, local_view_bits);

Sure I need call to something else... could you tell me what I'm missing?

@mont29 The code (C++) is adding a new object and I guess something is missing. You can see the code in `Object *GpencilImporter::create_object()` The function is calling to `ED_gpencil_add_object` and this calls to `ED_object_add_type(C, OB_GPENCIL, NULL, loc, rot, false, local_view_bits);` Sure I need call to something else... could you tell me what I'm missing?

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Antonio Vazquez self-assigned this 2022-06-06 09:39:56 +02:00

This is fixed in last versions.

This is fixed in last versions.
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#87999
No description provided.