GPv3: Crash when undoing conversion from GPv2 #117858

Closed
opened 2024-02-05 16:55:54 +01:00 by Lukas Tönne · 12 comments
Member

System Information
Operating system: Linux-6.7.2-gentoo-r1-x86_64-AMD_Ryzen_9_7950X_16-Core_Processor-with-glibc2.38 64 Bits, X11 UI
Graphics card: AMD Radeon RX 7900 XT (radeonsi, navi31, LLVM 17.0.6, DRM 3.56, 6.7.2-gentoo-r1) AMD 4.6 (Core Profile) Mesa 23.3.4

Blender Version
Broken: version: 4.1.0 Alpha, branch: Unknown, commit date: Unknown Unknown, hash: Unknown
Worked: n/a

Short description of error
Converting a GPv2 object to GPv3 and then undoing crashes Blender.

Exact steps for others to reproduce the error
Get a GPv2 test file (for example here: https://cloud.blender.org/p/gallery/5b642e25bf419c1042056fc6).
Run Object > Convert > Grease Pencil v3 from the menu.
Ctrl+Z to undo, crashes in bounds_min_max_eval

**System Information** Operating system: Linux-6.7.2-gentoo-r1-x86_64-AMD_Ryzen_9_7950X_16-Core_Processor-with-glibc2.38 64 Bits, X11 UI Graphics card: AMD Radeon RX 7900 XT (radeonsi, navi31, LLVM 17.0.6, DRM 3.56, 6.7.2-gentoo-r1) AMD 4.6 (Core Profile) Mesa 23.3.4 **Blender Version** Broken: version: 4.1.0 Alpha, branch: Unknown, commit date: Unknown Unknown, hash: `Unknown` Worked: n/a **Short description of error** Converting a GPv2 object to GPv3 and then undoing crashes Blender. **Exact steps for others to reproduce the error** Get a GPv2 test file (for example here: https://cloud.blender.org/p/gallery/5b642e25bf419c1042056fc6). Run _Object > Convert > Grease Pencil v3_ from the menu. Ctrl+Z to undo, crashes in `bounds_min_max_eval`
Lukas Tönne added the
Type
Report
Status
Needs Triage
Priority
Normal
labels 2024-02-05 16:55:54 +01:00
Lukas Tönne added this to the Grease Pencil project 2024-02-05 16:56:00 +01:00
Member

Can confirm the crash.

Can confirm the crash.
Pratik Borhade added
Module
Grease Pencil
Status
Confirmed
and removed
Status
Needs Triage
labels 2024-02-06 05:08:36 +01:00
Lukas Tönne changed title from GPv3: Crash when undoing conversion to GPv2 to GPv3: Crash when undoing conversion from GPv2 2024-02-06 09:05:28 +01:00
Philipp Oeser added the
Interest
Undo
label 2024-02-12 14:06:35 +01:00
Member

Raising the prio here since it is a crasher (and not an unlikely one to run into)

Raising the prio here since it is a crasher (and not an unlikely one to run into)
Philipp Oeser added
Priority
High
and removed
Priority
Normal
labels 2024-02-12 14:07:03 +01:00
Bastien Montagne added
Priority
Normal
and removed
Priority
High
labels 2024-03-01 14:20:15 +01:00

@lichtwerk GPv3 is still experimental, as such I don't think crashers should get high prio by default ?

@lichtwerk GPv3 is still experimental, as such I don't think crashers should get high prio by default ?
Member

@mont29 : this was discussed with @filedescriptor

@mont29 : this was discussed with @filedescriptor
Member

Looks like a crash that we should be able to fix. Will take a look.

Looks like a crash that we should be able to fix. Will take a look.

The issue is that after undo, the ob->runtime->geometry_set_eval is still containing some Grease Pencil (aka GPv3) data, some how it would look like depsgraph fails at clearing this geometryset data in the evaluated object?

The issue is that after undo, the `ob->runtime->geometry_set_eval` is still containing some Grease Pencil (aka GPv3) data, some how it would look like depsgraph fails at clearing this geometryset data in the evaluated object?
Member

Hm I'm not sure I understand how the ob->runtime->geometry_set_eval pointer is kept after the memfile was loaded. That seems to me the main issue. Is that some sort of optimization? I suppose that there needs to be something that clears those when the object type changes. In any case, this is outside of my knowledge. @JacquesLucke Could you take a look?

Hm I'm not sure I understand how the `ob->runtime->geometry_set_eval` pointer is kept after the memfile was loaded. That seems to me the main issue. Is that some sort of optimization? I suppose that there needs to be something that clears those when the object type changes. In any case, this is outside of my knowledge. @JacquesLucke Could you take a look?

When undoing, we do not recreate fully the depsgraph anymore, but rather tag (or replay) 'backward' all the ID_RECALC tagging for each ID. So the object here should have the recalc geometry tag (plus the fact that its obdata is now pointing to different ID, some relation rebuild of the depsgraph too). But is suspect the depsgraph (or the code handling the geometry set) does not expect a change in obdata type, which in this case would require getting rid of all geometry set (since legacy GP does not use that system afaik)?

When undoing, we do not recreate fully the depsgraph anymore, but rather tag (or replay) 'backward' all the `ID_RECALC` tagging for each ID. So the object here should have the recalc geometry tag (plus the fact that its obdata is now pointing to different ID, some relation rebuild of the depsgraph too). But is suspect the depsgraph (or the code handling the geometry set) does not expect a change in obdata type, which in this case would require getting rid of all geometry set (since legacy GP does not use that system afaik)?
Member

which in this case would require getting rid of all geometry set (since legacy GP does not use that system afaik)?

Yes, I believe so. Don't know where that would have to be changed though.

> which in this case would require getting rid of all geometry set (since legacy GP does not use that system afaik)? Yes, I believe so. Don't know where that would have to be changed though.
Member

Is this still an issue? I just tested it using this file and it seemed to work fine. If it's still an issue, please provide a specific example file.

Is this still an issue? I just tested it using [this](https://cloud.blender.org/p/gallery/5edd13a01e5ba50266481719) file and it seemed to work fine. If it's still an issue, please provide a specific example file.
Member

Just tested this again as well, and it seems to work fine for me. I'll let @LukasTonne confirm and (potentially) close the issue :)

Just tested this again as well, and it seems to work fine for me. I'll let @LukasTonne confirm and (potentially) close the issue :)
Author
Member

Yes, fixed now.

Yes, fixed now.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-04-10 15:47:03 +02: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
6 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#117858
No description provided.