Regression: Crash on toggling display mode of wave modifier in edit mode #100191

Closed
opened 2022-08-04 09:39:20 +02:00 by EMM · 27 comments

System Information
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 516.59

Blender Version
Broken: version: 3.4.0, 2.93
Worked: 2.83

Caused by deaff945d0

Short description of error
In edit mode, crash occurs if along normals is enabled and display mode of wave modifier is toggled

Exact steps for others to reproduce the error

  • Open .blend file
  • add wave modifier
  • Switch to edit mode
  • Enable along normals from modifiers tab
  • toggle modifier display mode
    Video from #100191#1399729: F13335857
**System Information** Operating system: Windows-10-10.0.22000-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 516.59 **Blender Version** Broken: version: 3.4.0, 2.93 Worked: 2.83 Caused by deaff945d0 **Short description of error** In edit mode, crash occurs if `along normals` is enabled and display mode of wave modifier is toggled **Exact steps for others to reproduce the error** - Open .blend file - add wave modifier - Switch to edit mode - Enable along normals from modifiers tab - toggle modifier display mode Video from #100191#1399729: [F13335857](https://archive.blender.org/developer/F13335857/20220804-162351.mp4)
Author

Added subscriber: @Guai_Wo_Ge_EMM

Added subscriber: @Guai_Wo_Ge_EMM
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

What does "Will flash back" mean here? Can you make a video screen cast?

What does "Will flash back" mean here? Can you make a video screen cast?
Author

Exit the software directly

Exit the software directly
Member

I guess you mean it crashes?

Please open Blender's installation directory and double click on the blender_debug_gpu.cmd. This will start Blender in debug mode and create log files. Try to reproduce the error again. Once it crashes or you close Blender manually the Windows Explorer should open and show you up to two files, a debug log and the system information. Add them to your bug report by clicking on the upload button as shown in the screenshot below or via drag and drop. Please also upload the crash log located in C:\Users\[your username]\AppData\Local\Temp\[project name].crash.txt (or simply type %TEMP% into the path bar of the Windows Explorer).2019_12_04_upload_icon_developer_blender_org.png

I guess you mean it crashes? Please open Blender's installation directory and double click on the `blender_debug_gpu.cmd`. This will start Blender in debug mode and create log files. Try to reproduce the error again. Once it crashes or you close Blender manually the Windows Explorer should open and show you up to two files, a debug log and the system information. Add them to your bug report by clicking on the upload button as shown in the screenshot below or via drag and drop. Please also upload the crash log located in `C:\Users\[your username]\AppData\Local\Temp\[project name].crash.txt` (or simply type `%TEMP%` into the path bar of the Windows Explorer).![2019_12_04_upload_icon_developer_blender_org.png](https://archive.blender.org/developer/F8190038/2019_12_04_upload_icon_developer_blender_org.png)
Author

If is blender_debug_gpu.cmd will not cause this problem

If is blender_debug_gpu.cmd will not cause this problem
Author
[wave.mp4](https://archive.blender.org/developer/F13335823/wave.mp4)
Member

How about with a factory reset, does the issue happen with it? File > Defaults > Load Factory Settings.

How about with a factory reset, does the issue happen with it? File > Defaults > Load Factory Settings.
Author

Even the load factory settings will have problems

Even the load factory settings will have problems
Member

But Blender doesn't write any crash logs? Located in C:\Users\[your username]\AppData\Local\Temp\[project name].crash.txt.

But Blender doesn't write any crash logs? Located in `C:\Users\[your username]\AppData\Local\Temp\[project name].crash.txt`.
Author

if use blender_debug_log.cmd is crashes

use blender_debug_gpu.cmd not crashes

the is blender_debug_log.cmd log
blender_system_info.txt

blender_debug_output.txt

if use blender_debug_log.cmd is crashes use blender_debug_gpu.cmd not crashes the is blender_debug_log.cmd log [blender_system_info.txt](https://archive.blender.org/developer/F13335854/blender_system_info.txt) [blender_debug_output.txt](https://archive.blender.org/developer/F13335853/blender_debug_output.txt)
Author
[20220804-162351.mp4](https://archive.blender.org/developer/F13335857/20220804-162351.mp4)
Member

Can you attach D:\Users\EM1\AppData\Local\Temp\blender.crash.txt?

Can you attach `D:\Users\EM1\AppData\Local\Temp\blender.crash.txt`?
Author

This comment was removed by @Guai_Wo_Ge_EMM

*This comment was removed by @Guai_Wo_Ge_EMM*
Author
[blender.crash.txt](https://archive.blender.org/developer/F13337054/blender.crash.txt)
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

I can confirm.

Memoryblock free: pointer not in memlist

however crash did not happen in debug build. Instead I saw spike in memory usage, memory leak?

I can confirm. > Memoryblock free: pointer not in memlist however crash did not happen in debug build. Instead I saw spike in memory usage, memory leak?
Pratik Borhade changed title from Wave Modifierl Switch show_viewport Flash back to Crash on toggling display mode of wave modifier in edit mode 2022-08-05 05:10:38 +02:00
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

This broke between good 5db2d9c82b and bad 1d4bae8566, will check.

This broke between good 5db2d9c82b and bad 1d4bae8566, will check.
Member

Caused by deaff945d0

Caused by deaff945d0
Member

Added subscribers: @HooglyBoogly, @ideasman42

Added subscribers: @HooglyBoogly, @ideasman42
Member

There seems to be a problem with passing vertexCos into MOD_deform_mesh_eval_get in this case (instead of NULL like all other modifiers do).
This sets me->runtime.edit_data->vertexCos which then causes issues ensuring normals (BKE_mesh_vertex_normals_ensure)?
mvert_len and mpoly_len coming into BKE_mesh_calc_normals_poly_and_vertex is garbled (much too high).

This simple change seems to prevent the crash and also still seems to behave as expected (but I have limited understanding of the code here, so cant really explain why):
P3134: T100191_snippet



diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c
index 60fa14ce4f3..962bd3db7d7 100644
--- a/source/blender/modifiers/intern/MOD_wave.c
+++ b/source/blender/modifiers/intern/MOD_wave.c
@@ -328,7 +328,7 @@ static void deformVertsEM(ModifierData *md,
 
   if (wmd->flag & MOD_WAVE_NORM) {
     mesh_src = MOD_deform_mesh_eval_get(
-        ctx->object, editData, mesh, vertexCos, verts_num, true, false);
+        ctx->object, editData, mesh, NULL, verts_num, true, false);
   }
   else if (wmd->texture != NULL || wmd->defgrp_name- [x] != '\0') {
     mesh_src = MOD_deform_mesh_eval_get(

The wave modifier is also the only modifier that actually uses use_normals for MOD_deform_mesh_eval_get (might give another hint if my other findings are wrong...)

@ideasman42 or @HooglyBoogly might know more...

There seems to be a problem with passing `vertexCos` into `MOD_deform_mesh_eval_get` in this case (instead of NULL like all other modifiers do). This sets `me->runtime.edit_data->vertexCos` which then causes issues ensuring normals (BKE_mesh_vertex_normals_ensure)? `mvert_len` and `mpoly_len` coming into `BKE_mesh_calc_normals_poly_and_vertex` is garbled (much too high). This simple change seems to prevent the crash and also still seems to behave as expected (but I have limited understanding of the code here, so cant really explain why): [P3134: T100191_snippet](https://archive.blender.org/developer/P3134.txt) ``` diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c index 60fa14ce4f3..962bd3db7d7 100644 --- a/source/blender/modifiers/intern/MOD_wave.c +++ b/source/blender/modifiers/intern/MOD_wave.c @@ -328,7 +328,7 @@ static void deformVertsEM(ModifierData *md, if (wmd->flag & MOD_WAVE_NORM) { mesh_src = MOD_deform_mesh_eval_get( - ctx->object, editData, mesh, vertexCos, verts_num, true, false); + ctx->object, editData, mesh, NULL, verts_num, true, false); } else if (wmd->texture != NULL || wmd->defgrp_name- [x] != '\0') { mesh_src = MOD_deform_mesh_eval_get( ``` The wave modifier is also the only modifier that actually uses `use_normals` for `MOD_deform_mesh_eval_get` (might give another hint if my other findings are wrong...) @ideasman42 or @HooglyBoogly might know more...
Philipp Oeser changed title from Crash on toggling display mode of wave modifier in edit mode to Regression: Crash on toggling display mode of wave modifier in edit mode 2022-08-10 13:26:07 +02:00

This issue was referenced by 52a5c80313

This issue was referenced by 52a5c80313c206eb7c1b31af3079bffdda4b09c6

This issue was referenced by 4dc9a8a21e

This issue was referenced by 4dc9a8a21e82d1c56419713c517b38728993ed8a

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Campbell Barton self-assigned this 2022-08-12 13:50:42 +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
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#100191
No description provided.