Regression: Knife Project crashes Blender 3.4 and 3.3 #101721

Closed
opened 2022-10-10 11:06:58 +02:00 by Lucas · 10 comments

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

Blender Version
Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-10-10 00:22, hash: a24f11e0ec
Worked: 3.1.2

Caused by 690ecaae20

Short description of error
Knife Project crashes Blender 3.4 and 3.3 when using on multiple objects

Exact steps for others to reproduce the error
Open attached blend file, go to mesh>Knife Project>Crash
knifeProjectCrash.blend

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 517.40 **Blender Version** Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-10-10 00:22, hash: `a24f11e0ec` Worked: 3.1.2 Caused by 690ecaae20 **Short description of error** Knife Project crashes Blender 3.4 and 3.3 when using on multiple objects **Exact steps for others to reproduce the error** Open attached blend file, go to mesh>Knife Project>Crash [knifeProjectCrash.blend](https://archive.blender.org/developer/F13647358/knifeProjectCrash.blend)
Author

Added subscriber: @Xorrito

Added subscriber: @Xorrito
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Can confirm, will check

Can confirm, will check
Member

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Member

Caused by 690ecaae20

@ideasman42 : we can still run into the situation that we are using a tri_index (from raycast) in knife_bm_tri_cagecos_get that is not from the original uncut mesh (so BVH is updated?).

As in: the following does not crash (with the example file, we are getting there with a tri_index of 13 -- and the cube only has up to 11...):



diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index e9897021b4a..68e6afb0bd4 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1164,7 +1164,7 @@ static const int *knife_bm_tri_index_get(const KnifeTool_OpData *kcd,
 {
   const KnifeObjectInfo *obinfo = &kcd->objects_info[base_index];
   if (obinfo->tri_indices) {
-    return obinfo->tri_indices[tri_index];
+    //return obinfo->tri_indices[tri_index];
   }
   for (int i = 0; i < 3; i++) {
     tri_index_buf[i] = BM_elem_index_get(obinfo->em->looptris[tri_index][i]->v);
Caused by 690ecaae20 @ideasman42 : we can still run into the situation that we are using a `tri_index` (from raycast) in `knife_bm_tri_cagecos_get` that is not from the original uncut mesh (so BVH **is** updated?). As in: the following does not crash (with the example file, we are getting there with a `tri_index` of 13 -- and the cube only has up to 11...): ``` diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index e9897021b4a..68e6afb0bd4 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -1164,7 +1164,7 @@ static const int *knife_bm_tri_index_get(const KnifeTool_OpData *kcd, { const KnifeObjectInfo *obinfo = &kcd->objects_info[base_index]; if (obinfo->tri_indices) { - return obinfo->tri_indices[tri_index]; + //return obinfo->tri_indices[tri_index]; } for (int i = 0; i < 3; i++) { tri_index_buf[i] = BM_elem_index_get(obinfo->em->looptris[tri_index][i]->v); ```
Campbell Barton self-assigned this 2022-10-11 01:32:52 +02:00

This issue was referenced by 7881a797a0

This issue was referenced by 7881a797a063bb8ed0aa8c6b7329812c027b6fbf

This issue was referenced by 2bacf1cb26

This issue was referenced by 2bacf1cb26fca29091b9e249436adafc379434c0

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' 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
5 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#101721
No description provided.