Crash on Boolean modifier when ob_src->totcol > ob_dst->totcol #91339
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#91339
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: Linux-5.4.0-84-generic-x86_64-with-glibc2.31 64 Bits
Graphics card: GeForce GTX 1060 3GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.91.03
Blender Version
Broken: version: 3.0.0 Alpha, branch: Unknown, commit date: Unknown Unknown, hash:
rBUnknown
Worked: Unknown
Also Broken: 2.93.2, 2.93.4
Worked: 2.92
Short description of error
In the attached blender file, if you add a Boolean modifier to the Bottom object and then use the object picker to subtract the Top object, Blender will crash.
Patch description
https://developer.blender.org/D12460
I'm very new here so please be kind :) I scanned the tickets and nothing jumped out and me, but that may be due to my inexperience searching here.
Seeing the bug was happening in BKE_object_material_remap_calc I looked there and saw that the comment on the function indicates that remap_src_to_dst should be at least ob_src->totcol entries long, the caller in the stacktrace, get_material_remap (MOD_boolean.c) is allocating an array of size dest_ob->totcol
After changing that call site to pass the larger array, in my case source totcol was 13 and destination totcol was 1, my particular crash goes away.
I've submitted the patch, in spite of its simplicity, absolutely happy to chase this further if necessary.
Test File:
crash-on-boolean-bottom-minus-top.blend
Stacktrace
This frame has 12 object(s):
[48, 56) ''
[80, 88) ''
[112, 120) ''
[144, 152) ''
[176, 184) ''
[208, 216) ''
[240, 272) ''
[304, 336) '' <== Memory access at offset 336 overflows this variable
[368, 400) ''
[432, 504) 'meshes' (line 402)
[544, 616) 'obmats' (line 403)
[656, 824) 'material_remaps' (line 404)
Added subscriber: @Jacob-Lewallen
Attaching Blender file.
crash-on-boolean-bottom-minus-top.blend
Added subscriber: @PratikPB2123
Hi, thanks for the report. This is actually duplicate of #90818 (Crash to desktop with boolean modifier)
Will merge this report into
#90818
Closed as duplicate of #90818
This issue was referenced by
7d2b6a213f
This issue was referenced by
12c66854bd
Changed status from 'Duplicate' to: 'Resolved'