Crash when removing second material slot from data-linked objects #52953
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#52953
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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
Win7 64bit ATI HD4670
Blender Version
Broken: 2.79
Short description of error
If you Alt-D duplicate many objects and create second slot for material in one of them, then Blender will crash after atempting to remove it.
Exact steps for others to reproduce the error
Open file, remove second slot.
Crash_mat_slot.blend
Changed status to: 'Open'
Added subscriber: @SergeL
Added subscriber: @LazyDodo
id has a bogus pointer at
Added subscriber: @RainerTrummer
It must be buried somewhere in the code that handles the material link type (i.e. if it is set to 'OBJECT' or 'DATA'). In the given file, the material link is set to 'OBJECT'. If you set the link to 'DATA'on all cube instances, the slot can be removed without a crash. I have done that material link change in the file provided here:
No_Crash_mat_slot.blend
It's the same file as in the initial bug report, just the link type has been changed. However, it is not sufficient to only do the change on one cube instance. In that case, the crash would still happen.
We're also using 'OBJECT' link type here in the studio a lot, so we rammed into a similar issue today. The 'solution' is identical. Hope this helps to track down the bug.
Added subscriber: @ChingPingSun
By simplifying the original file, I reduce them to 2 objects, and add another 2 objects for comparison.
In the attached file (test_case_2.blend), the left side 2 cubes, will cause crash. While the right side 2 cubes won't.
It would be helpful to know HOW those cubes are created ? test_case_2.blend
Comment: The crash was also happened on macOS, system information:
System Information
macOS 10.13.2
Blender Version
Broken: 2.79, 2.80(2017-11-25)
It doesn't crash with Data option, only Object
I changed the right side cubes to Object, then Alt-D to duplicate, after that, deleting does not crash.
While the left side cubes will.
So, I am curious about how did you create the left cubes ?
Please see the attached : test_case_3.blend{F1522174}
I did same thing, Alt-D cube with one Object material many times, than add another slot to one cube (others will not have second slot).
Here is yours altered file:
test_case_3_altered.blend
OK, we get some observations now:
There is a strange place in the code, it seems that the active current material index is not decremented (when it should be).
Attached is the patch, It only passed the crash test, not sure for that it is a correct fix, is there anybody can{F1586868} help to review?
Changed status from 'Open' to: 'Resolved'
This issue was referenced by
0becc8a7dd