2.80 Segfault on applying modifier after shape keys are removed #68710

Closed
opened 2019-08-16 01:57:32 +02:00 by Drew Dixon · 6 comments

Operating system: Windows 10 64 Bits

Tested on both release 2.80 and 2.81a build b5fe838d44. Working on 2.79b.

To reproduce:

  1. Start a new blend, add a mesh object, add a shape key, add any modifier.
  2. Duplicate the object.
  3. Delete all shape keys from the duplicate using "Delete All Shape Keys" from the shape key context menu or bpy.ops.object.shape_key_remove(all=True)
  4. Apply the modifier on the duplicate. Crash with EXCEPTION_ACCESS_VIOLATION.

Note that the crash doesn't happen if shape keys are removed one by one instead with all=False

Operating system: Windows 10 64 Bits Tested on both release 2.80 and 2.81a build b5fe838d4408. Working on 2.79b. To reproduce: 1. Start a new blend, add a mesh object, add a shape key, add any modifier. 2. Duplicate the object. 3. Delete all shape keys from the duplicate using "Delete All Shape Keys" from the shape key context menu or `bpy.ops.object.shape_key_remove(all=True)` 4. Apply the modifier on the duplicate. Crash with EXCEPTION_ACCESS_VIOLATION. Note that the crash doesn't happen if shape keys are removed one by one instead with `all=False`
Author

Added subscriber: @ebekassu-5431

Added subscriber: @ebekassu-5431
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Can confirm, checking...

Can confirm, checking...

This issue was referenced by 13c9df10a8

This issue was referenced by 13c9df10a8fda7b5370edf1c87e4f4da15e4b33b
Philipp Oeser self-assigned this 2019-08-16 12:53:23 +02:00
Member

This is probably a mistake in 87629b2a74

BKE_object_shapekey_free would never return true, so DEG updates would not happen...
So ob->shapenr wasnt up-to-date, etc... leading to crash in BKE_mesh_nomain_to_mesh shapekey handling...

1  BLI_findlink              listbase.c           580   0x23dc142 
2  BKE_mesh_nomain_to_mesh   mesh_convert.c       1488  0x21def0f 
3  modifier_apply_obdata     object_modifier.c    692   0x2fe2d24 
4  ED_object_modifier_apply  object_modifier.c    794   0x2fe3103 
5  modifier_apply_exec       object_modifier.c    1139  0x2fe3cc4 
6  modifier_apply_invoke     object_modifier.c    1153  0x2fe3d4a 
7  wm_operator_invoke        wm_event_system.c    1440  0x26f96f7 
8  wm_operator_call_internal wm_event_system.c    1687  0x26f9ffa 
9  WM_operator_name_call_ptr wm_event_system.c    1701  0x26fa0b7 
10 ui_apply_but_funcs_after  interface_handlers.c 835   0x2d97dd5 
11 ui_handler_region_menu    interface_handlers.c 10155 0x2dafb49 
12 wm_handler_ui_call        wm_event_system.c    623   0x26f76db 
13 wm_handlers_do_intern     wm_event_system.c    2707  0x26fc616 
14 wm_handlers_do            wm_event_system.c    2953  0x26fd2b1 
15 wm_event_do_handlers      wm_event_system.c    3331  0x26fe481 
16 WM_main                   wm.c                 417   0x26f1edc 
17 main                      creator.c            491   0x20a8996

Fix incoming...

This is probably a mistake in 87629b2a74 `BKE_object_shapekey_free` would never return `true`, so DEG updates would not happen... So `ob->shapenr` wasnt up-to-date, etc... leading to crash in `BKE_mesh_nomain_to_mesh` shapekey handling... ``` 1 BLI_findlink listbase.c 580 0x23dc142 2 BKE_mesh_nomain_to_mesh mesh_convert.c 1488 0x21def0f 3 modifier_apply_obdata object_modifier.c 692 0x2fe2d24 4 ED_object_modifier_apply object_modifier.c 794 0x2fe3103 5 modifier_apply_exec object_modifier.c 1139 0x2fe3cc4 6 modifier_apply_invoke object_modifier.c 1153 0x2fe3d4a 7 wm_operator_invoke wm_event_system.c 1440 0x26f96f7 8 wm_operator_call_internal wm_event_system.c 1687 0x26f9ffa 9 WM_operator_name_call_ptr wm_event_system.c 1701 0x26fa0b7 10 ui_apply_but_funcs_after interface_handlers.c 835 0x2d97dd5 11 ui_handler_region_menu interface_handlers.c 10155 0x2dafb49 12 wm_handler_ui_call wm_event_system.c 623 0x26f76db 13 wm_handlers_do_intern wm_event_system.c 2707 0x26fc616 14 wm_handlers_do wm_event_system.c 2953 0x26fd2b1 15 wm_event_do_handlers wm_event_system.c 3331 0x26fe481 16 WM_main wm.c 417 0x26f1edc 17 main creator.c 491 0x20a8996 ``` Fix incoming...
Member

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
3 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#68710
No description provided.