Pasting a material crashes #108495

Closed
opened 2023-06-01 09:10:13 +02:00 by Campbell Barton · 5 comments

NOTE: reporting for reference.

Blender Version
Broken: 3.6x and main branch.
Worked: never

Short description of error

Pasting a material which references other ID's may crash.

Exact steps for others to reproduce the error

  • Click on the the "Shader" tab

  • Add a node that references an ID, examples (it may crash after any one of these).

    In the node editor:

    • Add -> Texture -> Image Texture, then create new image.
    • Add -> Script -> Script, then create a text data-block and reference it.
    • Add some nodes and move them into a group.
  • Copy the material in the material properties tab.

  • File -> New

  • Click on the shading tab.

  • Paste the material in the material properties tab.

  • Blender should crash.

_NOTE: reporting for reference._ **Blender Version** Broken: 3.6x and `main` branch. Worked: never **Short description of error** Pasting a material which references other ID's may crash. **Exact steps for others to reproduce the error** - Click on the the "Shader" tab - Add a node that references an ID, examples (it may crash after any one of these). In the node editor: - Add -> Texture -> Image Texture, then create new image. - Add -> Script -> Script, then create a text data-block and reference it. - _Add some nodes and move them into a group._ - Copy the material in the material properties tab. - File -> New - Click on the shading tab. - Paste the material in the material properties tab. - Blender should crash.
Campbell Barton added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-06-01 09:10:14 +02:00
Member

Can confirm

Can confirm
Philipp Oeser added
Status
Confirmed
Module
Core
and removed
Status
Needs Triage
labels 2023-06-01 10:43:44 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-06-02 02:20:55 +02:00
Author
Owner

Re-opening as this is still an issue in 3.6.

Re-opening as this is still an issue in 3.6.
Blender Bot added
Status
Needs Triage
and removed
Status
Resolved
labels 2023-06-02 04:00:28 +02:00
Pratik Borhade added
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-06-02 04:47:52 +02:00
Author
Owner

Committed a fix for this 5177e2f20b37eb5c97f0ed989febd7f783ae4f1f which was intended as a fix for 3.6x, however Bastien wasn't confident about this change.

I've stressed tested materials with complex node-trees from einar_v1.zip (with ASAN enabled) & could not find any problems:

  • copy/paste between files.
  • copy/paste into the same file after reloading.
  • copy/paste into the same file between undo/redo steps.
  • pasting the default material into complex materials (to ensure they are properly cleared).

So in I think it could be considered for 3.6x, an alternative could be to remove material copy/paste from 3.6x, as the crashes are fairly easy to reproduce and could loose users work.

Committed a fix for this `5177e2f20b37eb5c97f0ed989febd7f783ae4f1f` which was intended as a fix for 3.6x, however Bastien wasn't confident about this change. I've stressed tested materials with complex node-trees from `einar_v1.zip` (with ASAN enabled) & could not find any problems: - copy/paste between files. - copy/paste into the same file after reloading. - copy/paste into the same file between undo/redo steps. - pasting the default material into complex materials (to ensure they are properly cleared). So in I think it could be considered for 3.6x, an alternative could be to remove material copy/paste from 3.6x, as the crashes are fairly easy to reproduce and could loose users work.

I would prefer the fix to be backported. Looking at the code, I think there is not really a risk of breaking other functionality. This is a pretty obscure feature and already quite broken, so not really worried about it.

I would prefer the fix to be backported. Looking at the code, I think there is not really a risk of breaking other functionality. This is a pretty obscure feature and already quite broken, so not really worried about it.
Author
Owner

Submitted PR !108567.

Submitted PR !108567.
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-06-07 05:43:42 +02:00
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
3 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#108495
No description provided.