Shift-D in edit mode, with normal map node connected to material causes exception #78334

Closed
opened 2020-06-27 01:04:52 +02:00 by Hidde H · 6 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.48
Ryzen 1700 , 32Gb 2400 DDR4

Blender Version
Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-06-25 21:53, hash: 62aa103d48
Worked: 2.83

Duplicating an object in edit mode using shift-D causes a crash when a normal map node ( With or without inputs populated) is connected to any of the appropriate inputs on a BSDF shader (Principled/Glossy/Volume..haven't tested others).
Unable to replicate in 2.83.0 LTS.
Frequent, but inconsistent startup crashes when restarting 2.9 after reproducing the exception. Sometimes on start, sometimes on opening file, sometimes ok.

Exact steps for others to reproduce the error
1- Blank startup file
2- Create Cube
3- Create/Assign Material
4- Create and connect normal map node to normal input of BSDF
5- Enter edit mode
6- Select cube in vertex, edge or face mode
7- Shift-D to duplicate selection

After repeated reproduction of the exception, opening the file showed corrupted geometry. The cube was completely sheared into what seemed infinity.
Opening the same file in 2.83 gave no issues. Opening it again in 2.93 resolved the shearing.
Must be something funky going on with the temp directory files?

Thanks for the awesome work on Blender <3

shift-D_EditMode_Exception.blend

2.9-shift-D_EditMode_Exception.crash.txt

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.48 Ryzen 1700 , 32Gb 2400 DDR4 **Blender Version** Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-06-25 21:53, hash: `62aa103d48` Worked: 2.83 Duplicating an object in edit mode using shift-D causes a crash when a normal map node ( With or without inputs populated) is connected to any of the appropriate inputs on a BSDF shader (Principled/Glossy/Volume..haven't tested others). Unable to replicate in 2.83.0 LTS. Frequent, but inconsistent startup crashes when restarting 2.9 after reproducing the exception. Sometimes on start, sometimes on opening file, sometimes ok. **Exact steps for others to reproduce the error** 1- Blank startup file 2- Create Cube 3- Create/Assign Material 4- Create and connect normal map node to normal input of BSDF 5- Enter edit mode 6- Select cube in vertex, edge or face mode 7- Shift-D to duplicate selection After repeated reproduction of the exception, opening the file showed corrupted geometry. The cube was completely sheared into what seemed infinity. Opening the same file in 2.83 gave no issues. Opening it again in 2.93 resolved the shearing. Must be something funky going on with the temp directory files? Thanks for the awesome work on Blender <3 [shift-D_EditMode_Exception.blend](https://archive.blender.org/developer/F8646055/shift-D_EditMode_Exception.blend) [2.9-shift-D_EditMode_Exception.crash.txt](https://archive.blender.org/developer/F8646056/2.9-shift-D_EditMode_Exception.crash.txt)
Author

Added subscriber: @mOOngaze

Added subscriber: @mOOngaze

Added subscriber: @VincentBlankfield

Added subscriber: @VincentBlankfield

Same as #78361 similar to #78054.
Seems to be introduced in 8f97a64dec

Test that covers all the issues:

    1. Grab the normal_map.tangent_space_bug_r1.blend file from #78054
    1. 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 8f97a64dec).

Same as #78361 similar to #78054. Seems to be introduced in 8f97a64dec Test that covers all the issues: - 1. Grab the [normal_map.tangent_space_bug_r1.blend file ](https://dev-files.blender.org/file/download/2niegnbaosk4seyk353s/PHID-FILE-bkmztclnvqzqehflxu24/normal_map.tangent_space_bug_r1.blend) from #78054 - 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 8f97a64dec).
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

I have confirmed #78361 (Blender crashes on many modeling operations (loopcut, extrude, duplication, ...) on mesh with normal map node connected to material), so will treat this as a duplicate (even though this is older) -- thx reporting and investigating @VincentBlankfield !

I have confirmed #78361 (Blender crashes on many modeling operations (loopcut, extrude, duplication, ...) on mesh with normal map node connected to material), so will treat this as a duplicate (even though this is older) -- thx reporting and investigating @VincentBlankfield !
Member

Closed as duplicate of #78361

Closed as duplicate of #78361
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#78334
No description provided.