Crash on isect_ray_seg_v3 due to the v0 and v1 being the same vert #70386
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#70386
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce RTX 2080 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 436.30
Blender Version
Broken: version: 2.81 (sub 12), branch: master, commit date: 2019-09-29 19:10, hash:
24be998b98
Worked: (optional)
Short description of error
When moving verts with snap on, sometimes a crash occurs in the isect_ray_seg_v3, due to the same vert address being used by v0 and v1.
Exact steps for others to reproduce the error
blender.exe!isect_ray_seg_v3(const float * ray_origin, const float * ray_direction, const float * v0, const float * v1, float * r_lambda) Line 2120 C
blender.exe!test_projected_edge_dist(const DistProjectedAABBPrecalc * precalc, const float- [x] * clip_plane, const int clip_plane_len, const bool is_persp, const float * va, const float * vb, float * dist_px_sq, float * r_co) Line 1057 C
blender.exe!cb_snap_edge(void * userdata, int index, const DistProjectedAABBPrecalc * precalc, const float- [x] * clip_plane, const int clip_plane_len, BVHTreeNearest * nearest) Line 1141 C
The origin of the pointer "error" starts here.
filee: transform_snap_object.c
function: cb_snap_edge
line 1137
Both v_pairs get the same pointer address, which seems a result of some degenerated edge.
Attached production file (nothing critical inside), before any edits on our side, and the source fbx files. It's a SketchUp file imported to 3ds Max and prepared for offline rendering by a third-party, we are only handling the realtime part.
We exported as fbx (by layer) and imported in Blender.
The crash occurs with mix snapping on (vert and edge) when correcting mesh borders so they align perfectly (Object065 with Line002, :D great names), and also cleaning up the very messy mesh, since the target is to have it running as part of a bigger project in Unity ios project.
terreno_000.blend
Estradas.fbx
Edificios_Comuns.fbx
Lago.fbx
Passeios.fbx
Passeios_Comuns.fbx
Terra.fbx
Terra_Comum.fbx
Added subscriber: @dgsantana
Added subscriber: @ideasman42
Could you include a blend file with steps to redo the error?
Added subscriber: @lichtwerk
Canno really reproduce crashes, but indeed one of the meshes is invalid, you can check/correct with
So it is the
Group_2884
object, givingBKE_mesh_validate_arrays: Mesh select element 0 type 2 index 1335 is larger than data array size 0, resetting selection stack.
(havent checked if this is only related to selection flags?)
(generally I dont think we are considering anything a bug that involves degenerate geometry?)
Ah OK, I see you updated with FBX files, (I tested with
terreno_000.blend
only) need to check again...It was the standard fbx importer.
Ran the script and got more mesh errors, on other objects.
I believe the problem is with imported non-manifold meshes. Probably who handled the sketchup conversion in 3dsmax, just use "Convert To Poly" on every mesh, and this makes really bad non-manifold meshes that can cause crashes in 3dsMax (in certain conditions). I exported with "Triangulate" turn on, but in most cases, this isn't enough.
I also agreed that this isn't a "bug" since it's caused by bad geometry, but maybe it could be handled in a way to not crash blender :).
Marking as "Needs Info from User" until we know if validate fixes the problem (and we have exact instructions on which element to snap where -- because I still cannot reproduce a crash...)
Added subscriber: @mont29
Changed status from 'Open' to: 'Archived'
More than a week without reply or activity. Due to the policy of the tracker archiving for until required info/data are provided.
Sorry, but finally got the crash again. This was after leaving edit mode. Focus select, enter edit mode, select vertice, focus zoom, and 'g' to start moving. Attaching screenshot with the vertex that cause the crash and the file (its the same but with more edits).
Crash was again in line 2120 of math_geom.c in the isect_ray_seg_v3.
Vertex that cause the problem in object
Object065
Area edit before the crash.
File just before the crash.
terreno_003.blend
Crash use to reproduce crash (I did some edits before the crash).
terreno_003.blend1
Changed status from 'Archived' to: 'Open'
So the edits I did, were, turn wireframe overlay on.
Video showing the crash ;).
QLoNVacGZF.mp4
Forgot to say that this was in master at this commit
3cdcd1fa9f0896632b05cc217649ac529f8e2e08
of 15 Oct 2019, 09:27 UTCCan confirm now.
Seems like the edge is valid, their verts are somewhat valid [have proper coords], but something is wrong with their BMHeader index [gives -1].
Will check on this...
Great. Let me know if you need anything.
Opening
terreno_003.blend1
[without doing edits] I can often repro if I select a vert, then doView
>Frame Selected
prior to moving, and I can never repro if I dont do this prior [and zoom in "by hand"](played with lowering the range of viewport clipping, but that didnt help)
So
View
>Frame Selected
definitely has a role in this, checking further...Added subscriber: @mano-wii
Here is the backtrace btw.
running into assert because for the particular vert index is -1 (see above)
BLI_assert failed: /blender/source/blender/bmesh/intern/bmesh_mesh.h:97, BM_vert_at_index(), at '(index >= 0) && (index < bm->totvert)'
@mano-wii: snapping is your playground: interested? (not sure we are running into precission issues if we zoom in too much?)
I don't the fully know blender internals, but wouldn't an index -1 correspond to not found? Shouldn't this be handled, and just abort snapping?
From my experience with BVH trees and Octree, precision does indeed make a lot of difference.
@lichtwerk, I didn't quite understand the steps to reproduce the problem, but from backtrace, putting
BM_mesh_elem_index_ensure (em->bm, BM_VERT);
beforeBLI_bvhtree_find_nearest_projected
should work.But I will try a solution without reading the indexes.
This issue was referenced by
cfb6ffd48f
Changed status from 'Open' to: 'Resolved'