Blender 2.8 Beta crashing in Sculpt Mode #58265

Closed
opened 2018-11-30 04:00:07 +01:00 by Markus Berg · 20 comments

System Information
Operating system: Windows 10 Pro latest updates
Graphics card: GTX 1080

Blender Version
Broken: blender-2.80-4c31bed6b46-win64

          (worked in the commit in between)
          blender-2.80-baf599610a4-win64

Worked: blender-2.79-45c11c1a1bd-win64

Short description of error
Blender crashes when using the grab tool in sculpt mode after having slightly modified a simple cube

Exact steps for others to reproduce the error

  • Using the default cube.
  • Add a bevel modifier.
  • Go into sculpt mode, choose the grab tool.
    As soon as I click on the mesh, blender crashes in 2.8 Beta latest build, but not in 2.7 nightly build.
    (Doesn't seem to crash without the bevel modifier and autosmooth)

#58265.blend

**System Information** Operating system: Windows 10 Pro latest updates Graphics card: GTX 1080 **Blender Version** Broken: blender-2.80-4c31bed6b46-win64 ``` (worked in the commit in between) blender-2.80-baf599610a4-win64 ``` Worked: blender-2.79-45c11c1a1bd-win64 **Short description of error** Blender crashes when using the grab tool in sculpt mode after having slightly modified a simple cube **Exact steps for others to reproduce the error** - Using the default cube. - Add a bevel modifier. - Go into sculpt mode, choose the grab tool. As soon as I click on the mesh, blender crashes in 2.8 Beta latest build, but not in 2.7 nightly build. (Doesn't seem to crash without the bevel modifier and autosmooth) [#58265.blend](https://archive.blender.org/developer/F5767803/T58265.blend)
Author

Added subscriber: @thebergh

Added subscriber: @thebergh
Markus Berg changed title from Blender 2.8 Beta crashing to Blender 2.8 Beta crashing in Sculpt Mode 2018-11-30 04:01:20 +01:00
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Confirmed, checking...

Confirmed, checking...

Added subscriber: @SteffenD

Added subscriber: @SteffenD
Howard Trickey was assigned by Philipp Oeser 2018-11-30 13:21:57 +01:00
Member

Added subscriber: @howardt

Added subscriber: @howardt
Member

Hitting various asserts each time trying... (added file to the task description for convenience)

BLI_assert(pool->flag & BLI_MEMPOOL_ALLOW_ITER);

1   raise						0x7ffff466853f 
2   abort						0x7ffff4652895 
3   BLI_mempool_iternew					BLI_mempool.c            562  0x2e9ba25      
4   bmiter__elem_of_mesh_begin				bmesh_iterators.c        435  0x259981c      
5   BM_iter_init					bmesh_iterators_inline.h 160  0x267a2b9      
6   BM_iter_new						bmesh_iterators_inline.h 177  0x267a2b9      
7   BM_mesh_bevel					bmesh_bevel.c            5694 0x267a2b9      
8   applyModifier					MOD_bevel.c              440  0x250cb4a      
9   modwrap_applyModifier				modifier.c               839  0x2af9bfc      
10  mesh_calc_modifiers					DerivedMesh.c            1446 0x29a2f3c      
11  mesh_build_data					DerivedMesh.c            2010 0x29a52c6      
12  makeDerivedMesh 					DerivedMesh.c            2120 0x29a55e1      
13  BKE_object_handle_data_update			object_update.c          205  0x2b3621f      
14  BKE_object_eval_uber_data				object_update.c          348  0x2b36922  

BLI_assert(BM_vert_in_edge(e, v));

1   raise						0x7ffff466853f 
2   abort						0x7ffff4652895 
3   bmesh_disk_edge_link_from_vert			bmesh_structure_inline.h 33   0x26428a9      
4   bmesh_disk_edge_append				bmesh_structure.c        184  0x26428a9      
5   BM_edge_create					bmesh_core.c             193  0x2560772      
6   BM_mesh_bm_from_me					bmesh_mesh_conv.c        350  0x25e5670      
7   BKE_mesh_to_bmesh_ex				mesh.c                   729  0x2ace794      
8   applyModifier					MOD_bevel.c              372  0x2509da3      
9   modwrap_applyModifier				modifier.c               839  0x2af9bfc      
10  mesh_calc_modifiers					DerivedMesh.c            1446 0x29a2f3c      
11  mesh_build_data					DerivedMesh.c            2010 0x29a52c6      
12  makeDerivedMesh					DerivedMesh.c            2120 0x29a55e1      
13  BKE_object_handle_data_update			object_update.c          205  0x2b3621f      
14  BKE_object_eval_uber_data				object_update.c          348  0x2b36922 

BLI_assert(pool->chunk_tail->next == NULL);

1   raise						0x7ffff466853f 
2   abort						0x7ffff4652895 
3   BLI_mempool_alloc					BLI_mempool.c     367  0x2e9b303      
4   BM_edge_create					bmesh_core.c      163  0x256068b      
5   BM_edges_from_verts_ensure				bmesh_construct.c 94   0x255b1df      
6   BM_face_create_verts				bmesh_core.c      506  0x256138d      
7   bev_create_ngon					bmesh_bevel.c     473  0x2655272      
8   bevel_build_poly					bmesh_bevel.c     3929 0x2668292      
9   build_vmesh						bmesh_bevel.c     4191 0x266a1b1      
10  BM_mesh_bevel					bmesh_bevel.c     5724 0x267b236      
11  applyModifier					MOD_bevel.c       440  0x250cb4a      
12  modwrap_applyModifier				modifier.c        839  0x2af9bfc      
13  mesh_calc_modifiers					DerivedMesh.c     1446 0x29a2f3c      
14  mesh_build_data					DerivedMesh.c     2010 0x29a52c6      
15  makeDerivedMesh					DerivedMesh.c     2120 0x29a55e1      
16  BKE_object_handle_data_update			object_update.c   205  0x2b3621f      
17  BKE_object_eval_uber_data 				object_update.c   348  0x2b36922 

Since this is somewhat bound to the bevel modifier (tried sculpt-grabbing with autosmooth on other modifiers and couldnt get them to crash), I would kindly ask @howardt to have a look?

Hitting various asserts each time trying... (added file to the task description for convenience) BLI_assert(pool->flag & BLI_MEMPOOL_ALLOW_ITER); ``` 1 raise 0x7ffff466853f 2 abort 0x7ffff4652895 3 BLI_mempool_iternew BLI_mempool.c 562 0x2e9ba25 4 bmiter__elem_of_mesh_begin bmesh_iterators.c 435 0x259981c 5 BM_iter_init bmesh_iterators_inline.h 160 0x267a2b9 6 BM_iter_new bmesh_iterators_inline.h 177 0x267a2b9 7 BM_mesh_bevel bmesh_bevel.c 5694 0x267a2b9 8 applyModifier MOD_bevel.c 440 0x250cb4a 9 modwrap_applyModifier modifier.c 839 0x2af9bfc 10 mesh_calc_modifiers DerivedMesh.c 1446 0x29a2f3c 11 mesh_build_data DerivedMesh.c 2010 0x29a52c6 12 makeDerivedMesh DerivedMesh.c 2120 0x29a55e1 13 BKE_object_handle_data_update object_update.c 205 0x2b3621f 14 BKE_object_eval_uber_data object_update.c 348 0x2b36922 ``` --- BLI_assert(BM_vert_in_edge(e, v)); ``` 1 raise 0x7ffff466853f 2 abort 0x7ffff4652895 3 bmesh_disk_edge_link_from_vert bmesh_structure_inline.h 33 0x26428a9 4 bmesh_disk_edge_append bmesh_structure.c 184 0x26428a9 5 BM_edge_create bmesh_core.c 193 0x2560772 6 BM_mesh_bm_from_me bmesh_mesh_conv.c 350 0x25e5670 7 BKE_mesh_to_bmesh_ex mesh.c 729 0x2ace794 8 applyModifier MOD_bevel.c 372 0x2509da3 9 modwrap_applyModifier modifier.c 839 0x2af9bfc 10 mesh_calc_modifiers DerivedMesh.c 1446 0x29a2f3c 11 mesh_build_data DerivedMesh.c 2010 0x29a52c6 12 makeDerivedMesh DerivedMesh.c 2120 0x29a55e1 13 BKE_object_handle_data_update object_update.c 205 0x2b3621f 14 BKE_object_eval_uber_data object_update.c 348 0x2b36922 ``` --- BLI_assert(pool->chunk_tail->next == NULL); ``` 1 raise 0x7ffff466853f 2 abort 0x7ffff4652895 3 BLI_mempool_alloc BLI_mempool.c 367 0x2e9b303 4 BM_edge_create bmesh_core.c 163 0x256068b 5 BM_edges_from_verts_ensure bmesh_construct.c 94 0x255b1df 6 BM_face_create_verts bmesh_core.c 506 0x256138d 7 bev_create_ngon bmesh_bevel.c 473 0x2655272 8 bevel_build_poly bmesh_bevel.c 3929 0x2668292 9 build_vmesh bmesh_bevel.c 4191 0x266a1b1 10 BM_mesh_bevel bmesh_bevel.c 5724 0x267b236 11 applyModifier MOD_bevel.c 440 0x250cb4a 12 modwrap_applyModifier modifier.c 839 0x2af9bfc 13 mesh_calc_modifiers DerivedMesh.c 1446 0x29a2f3c 14 mesh_build_data DerivedMesh.c 2010 0x29a52c6 15 makeDerivedMesh DerivedMesh.c 2120 0x29a55e1 16 BKE_object_handle_data_update object_update.c 205 0x2b3621f 17 BKE_object_eval_uber_data object_update.c 348 0x2b36922 ``` Since this is somewhat bound to the bevel modifier (tried sculpt-grabbing with autosmooth on other modifiers and couldnt get them to crash), I would kindly ask @howardt to have a look?
Member

The problem is that the BKE_mesh_to_bmesh_ex() appears not to have created a bm->epool with the BLI_MEMPOOL_ALLOW_ITER flag set. I'll dig into why...

The problem is that the BKE_mesh_to_bmesh_ex() appears not to have created a bm->epool with the BLI_MEMPOOL_ALLOW_ITER flag set. I'll dig into why...
Member

Somehow the memory allocator data structures got corrupted so that it returned the same value for both the edge pool and the loop pool allocations (!).
I'll have to did deeper to understand which code is doing the corrupting. I tried Valgrind, but no luck.

Somehow the memory allocator data structures got corrupted so that it returned the same value for both the edge pool and the loop pool allocations (!). I'll have to did deeper to understand which code is doing the corrupting. I tried Valgrind, but no luck.
Author

I downloaded the latest build of Blender 2.8 and it doesn't crash anymore when doing the exact thing I tried before.
Neither will switching brushes.

I downloaded the latest build of Blender 2.8 and it doesn't crash anymore when doing the exact thing I tried before. Neither will switching brushes.
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

Yes, this seems to have been fixed by commit 18f0618677 (found by bisecting commits). I'll close this bug.

Yes, this seems to have been fixed by commit 18f0618677 (found by bisecting commits). I'll close this bug.
Author

I'm really sorry to say that after downloading the blender-2.80-baf599610a4-win64 commit and testing,
it crashes again! Just like before. Just a simple cube with bevel modifier, and using the grab brush in
sculpt mode.

I'm really sorry to say that after downloading the blender-2.80-baf599610a4-win64 commit and testing, it crashes again! Just like before. Just a simple cube with bevel modifier, and using the grab brush in sculpt mode.
Author

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'

Added subscriber: @SergeyIvanov

Added subscriber: @SergeyIvanov

Doesn't working for the - 2.80, 1fa527bfa3, 2018-12-05

Doesn't working for the - 2.80, 1fa527bfa3a, 2018-12-05
Member

Yes, you are correct. I guess the previous CL that I thought fixed things just moved the problem around.
I'll continue to look into this.

Yes, you are correct. I guess the previous CL that I thought fixed things just moved the problem around. I'll continue to look into this.

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Can you confirm if this is still a bug? We had some commits related to autosmooth, and I can't seem to reproduce this bug on the latest master.

Can you confirm if this is still a bug? We had some commits related to autosmooth, and I can't seem to reproduce this bug on the latest master.
Author

I just tested it and I'm unable to reproduce the bug. I tried different brushes, settings etc., but nothing crashes blender in relation to this issue.

I just tested it and I'm unable to reproduce the bug. I tried different brushes, settings etc., but nothing crashes blender in relation to this issue.

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