Page MenuHome

Blender crashes on many modeling operations (loopcut, extrude, duplication, ...) on mesh with normal map node connected to material
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 445.87

Blender Version
Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-06-26 17:24, hash: rBb7b57e7155ee
Worked: 2.83.1

Short description of error
Loopcut crashes Blender.
Without material everything fine.
With empty normalmap node it crashes twice and then was okay.
This file crashes after loopcut always.


Revisions and Commits

Event Timeline

I can reproduce it on version: 2.90.0 Alpha, branch: master, commit date: 2020-06-25 21:53, hash: rB62aa103d485f
It could be related to my bug report of shift-d in edit mode while normal map is connected?

Same as T78334 similar to T78054.
Seems to be introduced in rB8f97a64dec356d48a51948658efed7d7a9074c6e

Test that covers all the issues:

  • 1. Grab the normal_map.tangent_space_bug_r1.blend file from T78054
  • 2. Open it, make sure the viewport is in material preview or render mode
  • 3a. Press and hold Tab to quickly switch to and from edit mode. Expect crash while holding it.
  • 3b. In object mode select one of the cubes. Go to edit mode. Add loop cut with Ctrl+R. Expect crash when the loop cut is added.
  • 3c. In edit mode select some geometry. Press Shift+D to duplicate. Expect crash when duplicate is created.

3b and 3c will also crash with the default cube in the default scene, as long as the viewport is in rendered/lookdev mode and the cube has a normal map connected to the normal input of it's BSDF (empty normal map node will do).

In case of 3b and 3c the crash occurs in BLI_mempool.c:352 void *BLI_mempool_alloc(BLI_mempool *pool):

pool->free = free_pop->next;
/*
unable to read free_pop->next (free_pop->free is 0x3f0000003ec00000)
where free_pop is dest->pool from CustomData_bmesh_copy_data_exclude_by_type(const CustomData *source,
                                                                             CustomData *dest,
                                                                             void *src_block,
                                                                             void **dest_block,
                                                                             const CustomDataMask mask_exclude)
*/

In case of 3a it crashes not so frequently in random places (after rB8f97a64dec356d48a51948658efed7d7a9074c6e).

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Mon, Jun 29, 1:31 PM
Philipp Oeser (lichtwerk) triaged this task as High priority.
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Bug".

@Jeroen Bakker (jbakker): mind checking?

Philipp Oeser (lichtwerk) renamed this task from Blender crashes: loopcut on mesh with material or normalmap to Blender crashes on many modeling operations (loopcut, extrude, duplication, ...) on mesh with normal map node connected to material.Mon, Jun 29, 1:36 PM
# Blender 2.90.0, Commit date: 2020-06-29 12:33, Hash 85cde12bffee
Engine 'CYCLES' not available for scene 'Scene' (an add-on may need to be installed or enabled)  # Error
bpy.context.space_data.shading.type = 'SOLID'  # Property
bpy.context.space_data.shading.type = 'MATERIAL'  # Property
bpy.ops.mesh.shortest_path_pick(use_fill=False)  # Operator
bpy.ops.mesh.shortest_path_pick(edge_mode='SELECT', use_fill=True, index=404)  # Operator

# backtrace
b290(BLI_system_backtrace+0x37) [0x3fe5767]
b290() [0xa3d57a]
/lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7f16d8f82210]
b290(BLI_mempool_alloc+0x1f) [0x3f8b84f]
b290() [0xca5aac]
b290(CustomData_bmesh_copy_data_exclude_by_type+0x1a9) [0xca5e39]
b290() [0xddbc2f]
b290(bmesh_kernel_split_edge_make_vert+0x101) [0xddd9f1]
b290(BM_edge_split+0x14d) [0xe0168d]
b290() [0xe207fa]
b290() [0xe2141c]
b290(bmo_subdivide_edges_exec+0x75f) [0xe21c2f]
b290(BMO_op_exec+0x35) [0xdf3375]
b290(BM_mesh_esubdivide+0x9c) [0xe229bc]
b290() [0x11fc683]
b290() [0x11fd4fe]
b290() [0xd1e72b]
b290() [0xd0a444]
b290() [0xd0d500]
b290() [0xd0e72a]
b290() [0xd0ea3c]
b290(wm_event_do_handlers+0x742) [0xd0f552]
b290(WM_main+0x20) [0xd05b50]
b290(main+0x2f5) [0x9fb175]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f16d8f630b3]
b290(_start+0x2e) [0xa3998e]

It seems to crash in a different part, then I expected but hey anything can happen with legacycode and threading. I will dive into it. Could be that calculating tangent normals are also storing other stuff...