addons cause an EXCEPTION_ACCESS_VIOLATION possibly from mesh edit optimizations. #89261

Closed
opened 2021-06-18 10:06:57 +02:00 by MaybeLamia · 8 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 780 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.27

Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-06-17 22:22, hash: 94c4a9995e
Worked: 2 weeks ago.

Short description of error
Sorry if i can't explain this correctly it's way over my head, some addons that have operations that has something to do with bmesh or BVHtrees are causing an EXCEPTION_ACCESS_VIOLATION.

Exact steps for others to reproduce the error
Just enable an addon and use an operation.

[PolyQuilt ]] or [ https:*github.com/Jrome90/Fast-Loop | Fast-Loop are free for testing just enabling the addon go in to edit mode then press the addon in toolbar should cause an EXCEPTION_ACCESS_VIOLATION for both.

I will also leave a zip file with some crash logs.
Blender-3.0-crashes.zip

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 780 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.27 **Blender Version** Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-06-17 22:22, hash: `94c4a9995e` Worked: 2 weeks ago. **Short description of error** Sorry if i can't explain this correctly it's way over my head, some addons that have operations that has something to do with bmesh or BVHtrees are causing an EXCEPTION_ACCESS_VIOLATION. **Exact steps for others to reproduce the error** Just enable an addon and use an operation. [PolyQuilt ]] or [[ https:*github.com/Jrome90/Fast-Loop | Fast-Loop ](https:*github.com/sakana3/PolyQuilt) are free for testing just enabling the addon go in to edit mode then press the addon in toolbar should cause an EXCEPTION_ACCESS_VIOLATION for both. I will also leave a zip file with some crash logs. [Blender-3.0-crashes.zip](https://archive.blender.org/developer/F10179636/Blender-3.0-crashes.zip)
Author

Added subscriber: @MaybeLamia

Added subscriber: @MaybeLamia

blender/blender-addons#89311 was marked as duplicate of this issue

blender/blender-addons#89311 was marked as duplicate of this issue

Added subscribers: @ideasman42, @chemicalcrux

Added subscribers: @ideasman42, @chemicalcrux

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

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

I ran PolyQuilt with AddressSanitizer enabled and got this crash:

==16360==ERROR: AddressSanitizer: access-violation on unknown address 0x000000000000 (pc 0x7ff6f6450f16 bp 0x12d383a9a1d0 sp 0x00aed69fbef0 T0)
==16360==The signal is caused by a READ memory access.
==16360==Hint: address points to the zero page.
    - 0 0x7ff6f6450f15 in BM_mesh_calc_tessellation_ex D:\blender-git\blender\source\blender\bmesh\intern\bmesh_mesh_tessellate.c:274
    - 1 0x7ff6f6450fcb in BM_mesh_calc_tessellation D:\blender-git\blender\source\blender\bmesh\intern\bmesh_mesh_tessellate.c:283
    #2 0x7ff70065fa4c in C_BVHTree_FromBMesh D:\blender-git\blender\source\blender\python\mathutils\mathutils_bvhtree.c:972

So, it's reading a null pointer. Line 274 is:

bm_mesh_calc_tessellation__single_threaded(bm, looptris, params->face_normals);

The only thing that reads here is params->face_normals, so params is probably null. The function it's in, where params is the third argument, is invoked on line 283:

BM_mesh_calc_tessellation_ex(bm, looptris, false);

...and there's our null pointer! I suspect it should be passing a struct with a boolean member, rather than just a boolean :)

It looks like there was a commit four days ago that added some new tessellation features. @ideasman42 could you have a look at that, since your name's on the commit?

Here's a quick replication case: creating a BVHTree from a BMesh will cause the crash. Just run the script in the text editor.

tessellation-crash.blend

I ran `PolyQuilt` with AddressSanitizer enabled and got this crash: ``` ==16360==ERROR: AddressSanitizer: access-violation on unknown address 0x000000000000 (pc 0x7ff6f6450f16 bp 0x12d383a9a1d0 sp 0x00aed69fbef0 T0) ==16360==The signal is caused by a READ memory access. ==16360==Hint: address points to the zero page. - 0 0x7ff6f6450f15 in BM_mesh_calc_tessellation_ex D:\blender-git\blender\source\blender\bmesh\intern\bmesh_mesh_tessellate.c:274 - 1 0x7ff6f6450fcb in BM_mesh_calc_tessellation D:\blender-git\blender\source\blender\bmesh\intern\bmesh_mesh_tessellate.c:283 #2 0x7ff70065fa4c in C_BVHTree_FromBMesh D:\blender-git\blender\source\blender\python\mathutils\mathutils_bvhtree.c:972 ``` So, it's reading a null pointer. Line 274 is: ``` bm_mesh_calc_tessellation__single_threaded(bm, looptris, params->face_normals); ``` The only thing that reads here is `params->face_normals`, so `params` is probably null. The function it's in, where `params` is the third argument, is invoked on line 283: ``` BM_mesh_calc_tessellation_ex(bm, looptris, false); ``` ...and there's our null pointer! I suspect it should be passing a struct with a boolean member, rather than just a boolean :) It looks like there was a commit four days ago that added some new tessellation features. @ideasman42 could you have a look at that, since your name's on the commit? Here's a quick replication case: creating a BVHTree from a BMesh will cause the crash. Just run the script in the text editor. [tessellation-crash.blend](https://archive.blender.org/developer/F10180059/tessellation-crash.blend)

This issue was referenced by d52b7dbe26

This issue was referenced by d52b7dbe2695c673b3bad091b55893413e7b022b

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Germano Cavalcante self-assigned this 2021-06-18 20:22:28 +02:00

Added subscribers: @Nurb2Kea, @PratikPB2123

Added subscribers: @Nurb2Kea, @PratikPB2123
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
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#89261
No description provided.