Regression: Multires wireframes are displayed incomplete #104915

Closed
opened 2023-02-18 12:38:15 +01:00 by Julien Kaspar · 12 comments
Member

System Information
Operating system: Linux-6.1.12-gentoo-x86_64-AMD_Ryzen_Threadripper_1950X_16-Core_Processor-with-glibc2.36 64 Bits
Graphics card: Quadro GP100/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 525.89.02

Blender Version
Broken: version: 3.6.0 Alpha, branch: HEAD (modified), commit date: 2023-02-17 18:54, hash: 8806d7551db3
Worked: (newest version of Blender that worked as expected)

This is apparently more random than expected (once a bisect gave 10354b043f, another run gave 77963ff778 as the culprit)

Short description of error
When adding a multires modifier to an object and subdividing it, the wireframe overlay is not displayed completely. Random edges are missing from the overlay.

image

Exact steps for others to reproduce the error

  • Add a cube
  • Add a multires modifier and subdivide a few times
  • Enable the wireframe overlay or switch to the wireframe shading mode
**System Information** Operating system: Linux-6.1.12-gentoo-x86_64-AMD_Ryzen_Threadripper_1950X_16-Core_Processor-with-glibc2.36 64 Bits Graphics card: Quadro GP100/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 525.89.02 **Blender Version** Broken: version: 3.6.0 Alpha, branch: HEAD (modified), commit date: 2023-02-17 18:54, hash: `8806d7551db3` Worked: (newest version of Blender that worked as expected) This is apparently more random than expected (once a bisect gave 10354b043f2a6bee589bb85dd67cc51d7218595a, another run gave 77963ff7783c7a97de590fde677321b64d261a7a as the culprit) **Short description of error** When adding a multires modifier to an object and subdividing it, the wireframe overlay is not displayed completely. Random edges are missing from the overlay. ![image](/attachments/8aa5b7f1-dfaf-410f-8ea6-36e028a25928) **Exact steps for others to reproduce the error** - Add a cube - Add a multires modifier and subdivide a few times - Enable the wireframe overlay or switch to the wireframe shading mode
224 KiB
Julien Kaspar added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-02-18 12:38:16 +01:00
Member

@JulienKaspar hi, could you check again in current master?
I'm able to redo this in buildbot build from 15Feb but not in current master, 3.5.

@JulienKaspar hi, could you check again in current master? I'm able to redo this in buildbot build from 15Feb but not in current master, 3.5.
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-02-20 12:10:08 +01:00
Author
Member

I'm still able to reproduce it.

I'm still able to reproduce it.
Pratik Borhade added
Status
Needs Triage
and removed
Status
Needs Information from User
labels 2023-02-20 13:09:56 +01:00
Member

Managed to trigger the issue in latest daily build. Though unable to repro in own build.
@lichtwerk , can you check? This seems a recent regression: c2c62c3618 (good) - c3b53abc10 (bad)

Managed to trigger the issue in latest daily build. Though unable to repro in own build. @lichtwerk , can you check? This seems a recent regression: c2c62c3618ee (good) - c3b53abc109d (bad)
Pratik Borhade added
Module
EEVEE & Viewport
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-02-20 13:24:42 +01:00
Member

Will bisect.

Will bisect.
Member

Seems like this was caused by 77963ff778

CC @pragma37 ^^

Seems like this was caused by 77963ff7783c7a97de590fde677321b64d261a7a CC @pragma37 ^^
Philipp Oeser changed title from Multires wireframes are displayed incomplete to Regression: Multires wireframes are displayed incomplete 2023-02-20 14:35:23 +01:00
Philipp Oeser added
Priority
High
and removed
Priority
Normal
labels 2023-02-20 14:35:30 +01:00
Member

@lichtwerk Could you double-check?
The missing lines are random every time I open Blender.

I can reproduce it after reverting that commit (and even the previous commit referenced by it).
Also, that commit is not related to the Workbench or the Overlay engines, so I really don't see how it could be the cause.

@lichtwerk Could you double-check? The missing lines are random every time I open Blender. I can reproduce it after reverting that commit (and even the previous commit referenced by it). Also, that commit is not related to the Workbench or the Overlay engines, so I really don't see how it could be the cause.
Member

@pragma37 : hm, made another run, now bisect points me to 10354b043f

Doesnt really make too much sense either?

I assume this pops up more randomly than expected...

Just to narrow it down @pragma37 : can you also repro in 8703db393bfb?

If not, maybe you can run a bisect?

@pragma37 : hm, made another run, now bisect points me to 10354b043f2a6bee589bb85dd67cc51d7218595a Doesnt really make too much sense either? I assume this pops up more randomly than expected... Just to narrow it down @pragma37 : can you also repro in 8703db393bfb? If not, maybe you can run a bisect?
Member

@lichtwerk I actually can't reproduce it in 10354b043f. 🤔

8703db393b crashes on startup for me, but I doubt it's related to this issue.

If not, maybe you can run a bisect?

I fear my processor is not up to the task.
A debug build after a checkout like these ones takes me around 10-15 minutes.

My only tip is to toggle the modifier visibility several times to ensure you didn't just get lucky.

@lichtwerk I actually can't reproduce it in 10354b043f. 🤔 8703db393bfb crashes on startup for me, but I doubt it's related to this issue. > If not, maybe you can run a bisect? I fear my processor is not up to the task. A debug build after a checkout like these ones takes me around 10-15 minutes. My only tip is to toggle the modifier visibility several times to ensure you didn't just get lucky.
Member

Feels like a threading race condition. On my system it is hard to detect as one segment might just be missing. I also noticed that the behavior isn't consistent between each commit. This makes bisecting not consistent:

  • first bisect try pointer me towards: 32149f8d7a Reverting this change on blender-v3.5-release still shows the issue.

  • Second time pointer to 284cdbb6cf what makes more sense. Reverting this change on blender-v3.5-release still shows the issue.

Different approach
I added the number of segments that would be drawn. And printed that out in the drawing code. This way I could just click for a minute and after wards detect if there were some issues with inside a batch.

Using a cube with 2 subdivisions have 384 edges, where 96 should be visible.

diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc
index 4360fd16b9d..72ed3e664aa 100644
--- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc
+++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc
@@ -165,6 +165,18 @@ static void extract_edge_fac_finish(const MeshRenderData *mr,
 {
   GPUVertBuf *vbo = static_cast<GPUVertBuf *>(buf);
   MeshExtract_EdgeFac_Data *data = static_cast<MeshExtract_EdgeFac_Data *>(_data);
+  {
+    int buf_len = mr->loop_len + mr->loop_loose_len;
+    int c = 0;
+    for (int ml_index = 0; ml_index < buf_len; ml_index++) {
+      if (data->vbo_data[ml_index] != 0) {
+        c++;
+      }
+    }
+    if (c != 384 && c != 96) {
+      printf("%s: %d\n", __func__, c);
+    }
+  }
 
   if (GPU_crappy_amd_driver() || GPU_minimum_per_vertex_stride() > 1) {
     /* Some AMD drivers strangely crash with VBO's with a one byte format.

When switching optimum display I get now the next results.

extract_edge_fac_finish: 94
extract_edge_fac_finish: 92
extract_edge_fac_finish: 94
extract_edge_fac_finish: 94
extract_edge_fac_finish: 94

This VBO extractor is single threaded; what makes me wonder if it is an input data issue, and not a rendering issue.

With this change the bisect points to 7ca651d182, what makes a lot more sense. I am not able to revert this patch to validate correctness.

@HooglyBoogly mind looking into this issue?

Feels like a threading race condition. On my system it is hard to detect as one segment might just be missing. I also noticed that the behavior isn't consistent between each commit. This makes bisecting not consistent: - first bisect try pointer me towards: 32149f8d7a1c277b1816a42a0ee99adb4a253a62 Reverting this change on blender-v3.5-release still shows the issue. - Second time pointer to 284cdbb6cf5061e2cb17ea6ca9f277e94b2bb62f what makes more sense. Reverting this change on blender-v3.5-release still shows the issue. **Different approach** I added the number of segments that would be drawn. And printed that out in the drawing code. This way I could just click for a minute and after wards detect if there were some issues with inside a batch. Using a cube with 2 subdivisions have 384 edges, where 96 should be visible. ``` diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc index 4360fd16b9d..72ed3e664aa 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc @@ -165,6 +165,18 @@ static void extract_edge_fac_finish(const MeshRenderData *mr, { GPUVertBuf *vbo = static_cast<GPUVertBuf *>(buf); MeshExtract_EdgeFac_Data *data = static_cast<MeshExtract_EdgeFac_Data *>(_data); + { + int buf_len = mr->loop_len + mr->loop_loose_len; + int c = 0; + for (int ml_index = 0; ml_index < buf_len; ml_index++) { + if (data->vbo_data[ml_index] != 0) { + c++; + } + } + if (c != 384 && c != 96) { + printf("%s: %d\n", __func__, c); + } + } if (GPU_crappy_amd_driver() || GPU_minimum_per_vertex_stride() > 1) { /* Some AMD drivers strangely crash with VBO's with a one byte format. ``` When switching optimum display I get now the next results. ``` extract_edge_fac_finish: 94 extract_edge_fac_finish: 92 extract_edge_fac_finish: 94 extract_edge_fac_finish: 94 extract_edge_fac_finish: 94 ``` This VBO extractor is single threaded; what makes me wonder if it is an input data issue, and not a rendering issue. With this change the bisect points to 7ca651d18274acacfe8e0ecb7bc6fdd3399ea01b, what makes a lot more sense. I am not able to revert this patch to validate correctness. @HooglyBoogly mind looking into this issue?
Hans Goudey was assigned by Jeroen Bakker 2023-02-23 11:01:01 +01:00
Jeroen Bakker added
Module
Modeling
and removed
Module
EEVEE & Viewport
labels 2023-02-23 11:01:20 +01:00
Jeroen Bakker added
Module
Nodes & Physics
and removed
Module
Modeling
labels 2023-02-23 11:04:03 +01:00
Member

Could #103706 or #103700 (b247588dc0) be related, too?

In any case, will change back to Modeling (dont think Nodes & Physics fits here)

Could #103706 or #103700 (b247588dc0) be related, too? In any case, will change back to Modeling (dont think Nodes & Physics fits here)
Philipp Oeser added
Module
Modeling
and removed
Module
Nodes & Physics
labels 2023-02-23 11:52:55 +01:00
Member

Yeah, a race condition with a bitmap isn't that surprising. I thought I checked that but I might have missed the multires modifier.

Yeah, a race condition with a bitmap isn't _that_ surprising. I thought I checked that but I might have missed the multires modifier.
Hans Goudey added
Type
Bug
and removed
Type
Report
labels 2023-02-23 13:52:32 +01:00
Hans Goudey added this to the 3.5 milestone 2023-02-23 22:02:16 +01:00
Member

Thanks for the report and the investigation everyone. I should have caught this earlier since I've run into a similar issue before. Anyway, it's fixed by #105156.

Thanks for the report and the investigation everyone. I should have caught this earlier since I've run into a similar issue before. Anyway, it's fixed by #105156.
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-02-26 23:59:16 +01: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#104915
No description provided.