Crash in Curve Editing. #88269

Closed
opened 2021-05-13 21:12:20 +02:00 by Pedro · 13 comments
  • OS: Windows 10 Pro.

  • Graphic card: Intel(R) UHD Graphics 610.

  • Processor: Intel Celeron(R) G4920 CPU.

  • RAM: 8 GB.

  • Blender Version: 2.92.0.

  • Short description of error. Crash in Curve Editing.

  • Exact steps for other to reproduce the error.

    • File, New, 2D Animation.
    • Line, Enter. Or Draw.
    • Edit Mode.
    • Select Mode Only points.
    • Curve Editing, Activate.
    • Select 1 point. Select Tangent.
    • Clic Right, Separate.
      Captura de pantalla 2021-05-14 104714.png
      2.png
- OS: Windows 10 Pro. - Graphic card: Intel(R) UHD Graphics 610. - Processor: Intel Celeron(R) G4920 CPU. - RAM: 8 GB. - Blender Version: 2.92.0. - Short description of error. Crash in Curve Editing. - Exact steps for other to reproduce the error. - File, New, 2D Animation. - Line, Enter. Or Draw. - Edit Mode. - Select Mode Only points. - Curve Editing, Activate. - Select 1 point. Select Tangent. - Clic Right, Separate. ![Captura de pantalla 2021-05-14 104714.png](https://archive.blender.org/developer/F10100700/Captura_de_pantalla_2021-05-14_104714.png) ![2.png](https://archive.blender.org/developer/F10100756/2.png)
Author

Added subscriber: @Pedro.huarez

Added subscriber: @Pedro.huarez
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

Changed status from 'Needs Triage' to: 'Confirmed'
Philipp Oeser self-assigned this 2021-05-14 10:34:07 +02:00
Member

Can confirm, will check

Can confirm, will check
Member

Added subscriber: @filedescriptor

Added subscriber: @filedescriptor
Member

@Pedro.huarez I cannot reproduce this in the 2.93 Beta or 3.0.0 Alpha. I believe this was already fixed in the newer versions. You can try out the beta by downloading it from https://builder.blender.org/download/.

@Pedro.huarez I cannot reproduce this in the 2.93 Beta or 3.0.0 Alpha. I believe this was already fixed in the newer versions. You can try out the beta by downloading it from https://builder.blender.org/download/.
Author

Ok.

Ok.
Author

2.93 Beta. Crash

2.93 Beta. Crash
Author

Blender 3.0 Alpha un moment.
Blender 3.0 Alpha. Crash.

Blender 2.92. With Ubuntu in same PC. Crash.
Blender 3.0 Alpha in Ubuntu (In same PC). Crash.
Now MackBook Pro, un moment.
MackBook Pro, macOS Sierra 10.12.6. I can't test it, have an old pc

Blender 3.0 Alpha un moment. Blender 3.0 Alpha. Crash. Blender 2.92. With Ubuntu in same PC. Crash. Blender 3.0 Alpha in Ubuntu (In same PC). Crash. Now MackBook Pro, un moment. MackBook Pro, macOS Sierra 10.12.6. I can't test it, have an old pc
Member

This might be Windows specific then? @lichtwerk will probably find what's causing the crash.

This might be Windows specific then? @lichtwerk will probably find what's causing the crash.
Philipp Oeser removed their assignment 2021-05-14 12:30:28 +02:00
Member

Problem comes into play after transforming a curve point [which then happens to clear the stroke GP_STROKE_SELECT flag] see BKE_gpencil_stroke_update_geometry_from_editcurve.

1  BKE_gpencil_stroke_update_geometry_from_editcurve gpencil_curve.c             1138 0x3b6d0c2 
2  BKE_gpencil_stroke_geometry_update                gpencil_geom.c              1318 0x36079d5 
3  recalcData_gpencil_strokes                        transform_convert_gpencil.c 770  0x4ab4ad0 
4  recalcData                                        transform_convert.c         1695 0x4aaa176 
5  applyTranslation                                  transform_mode_translate.c  432  0x4b0b9e7 
6  transformApply                                    transform.c                 1882 0x4aa2987 
7  transform_modal                                   transform_ops.c             440  0x4b11adf 
8  wm_handler_operator_call                          wm_event_system.c           2081 0x3be54b5 
9  wm_handlers_do_intern                             wm_event_system.c           2910 0x3be7a85 
10 wm_handlers_do                                    wm_event_system.c           2958 0x3be7bcb 
11 wm_event_do_handlers                              wm_event_system.c           3378 0x3be8dfb 
12 WM_main                                           wm.c                        647  0x3bdcc5b 
13 main                                              creator.c                   519  0x35c7a72 

Not sure why this needs to be like that, but the problem can also be seen when when there are simply no curve points selected.
Code then hangs in gpencil_stroke_separate_exec when removing unused material slots.
Wrong assumptions here I think, the gpd->totcol is zero here (whereas the ob->totcol is not), so BKE_object_material_slot_remove will always fail.
I think this should be solved prior though, if nothing is selected, we probably should not create an ob in the first place? (at least no one that does not have its materials set up properly?)

  /* Remove unused slots. */
  int actcol = ob_dst->actcol;
  for (int slot = 1; slot <= ob_dst->totcol; slot++) {
    while (slot <= ob_dst->totcol && !BKE_object_material_slot_used(ob_dst->data, slot)) {
      ob_dst->actcol = slot;
      BKE_object_material_slot_remove(bmain, ob_dst);
      if (actcol >= slot) {
        actcol--;
      }
    }
  }

@filedescriptor : feel free to take over, this seems more like your playground?

Problem comes into play **after transforming** a curve point [which then happens to clear the stroke `GP_STROKE_SELECT` flag] see `BKE_gpencil_stroke_update_geometry_from_editcurve`. ``` 1 BKE_gpencil_stroke_update_geometry_from_editcurve gpencil_curve.c 1138 0x3b6d0c2 2 BKE_gpencil_stroke_geometry_update gpencil_geom.c 1318 0x36079d5 3 recalcData_gpencil_strokes transform_convert_gpencil.c 770 0x4ab4ad0 4 recalcData transform_convert.c 1695 0x4aaa176 5 applyTranslation transform_mode_translate.c 432 0x4b0b9e7 6 transformApply transform.c 1882 0x4aa2987 7 transform_modal transform_ops.c 440 0x4b11adf 8 wm_handler_operator_call wm_event_system.c 2081 0x3be54b5 9 wm_handlers_do_intern wm_event_system.c 2910 0x3be7a85 10 wm_handlers_do wm_event_system.c 2958 0x3be7bcb 11 wm_event_do_handlers wm_event_system.c 3378 0x3be8dfb 12 WM_main wm.c 647 0x3bdcc5b 13 main creator.c 519 0x35c7a72 ``` Not sure why this needs to be like that, but the problem can also be seen when when there are simply no curve points selected. Code then hangs in `gpencil_stroke_separate_exec` when removing unused material slots. Wrong assumptions here I think, the gpd->totcol is zero here (whereas the ob->totcol is not), so `BKE_object_material_slot_remove` will always fail. I think this should be solved prior though, if nothing is selected, we probably should not create an ob in the first place? (at least no one that does not have its materials set up properly?) ``` /* Remove unused slots. */ int actcol = ob_dst->actcol; for (int slot = 1; slot <= ob_dst->totcol; slot++) { while (slot <= ob_dst->totcol && !BKE_object_material_slot_used(ob_dst->data, slot)) { ob_dst->actcol = slot; BKE_object_material_slot_remove(bmain, ob_dst); if (actcol >= slot) { actcol--; } } } ``` @filedescriptor : feel free to take over, this seems more like your playground?

This issue was referenced by c3e13d5a2b

This issue was referenced by c3e13d5a2b8e9ada467850b4629dc4f228a2b2b8
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Falk David self-assigned this 2021-05-17 10:57:27 +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
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#88269
No description provided.