Blender crashes immediately after loading attached file in ~80% of my attempts #59338
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#59338
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: Ubuntu 17.10
Graphics card: Nvidia GeForce GTX 1050
Blender Version
Broken: 2.80,
81ea815dcb
, 2018-12-12Worked: -
Short description of error
Blender crashes immediately after loading the second file (machin3_2_decals_crash_after_loading.blend)
I have observed the following:
Exact steps for others to reproduce the error
I can replicate this with a factory reset Blender too.
machin3_1_decal_loads_fine.blend
machin3_2_decals_crash_after_loading.blend
Added subscriber: @MACHIN3
Blender crashes immedeately after loading attached file in ~80% of my attemptsto Blender crashes immediately after loading attached file in ~80% of my attemptsAdded subscriber: @brhumphe
Confirmed on
be0c8ed734
on windows. It's intermittent for me too: sometimes it will crash immediately, sometimes I have to revert the file a couple of times, always with anEXCEPTION_ACCESS_VIOLATION
error.Added subscribers: @mont29, @ZedDB
I can reproduce this issue too.
This is the backtrace I get:
@mont29 do you want to take a crack at this?
Hmpf… draw code gets a mesh without MLoop CD layer (among others)… hmrrrrpff…
Just checking to see if there is any update on this. Not expecting a fix before the stable release, just curious.
For my needs, I just keep the Data Transfer mods turned off for now, but I've observed that it's not just loading of files(with the mods enabled) that tends to crash often, but also generally working with the files(with the mods enabled) becomes quite unstable.
Thanks!
Added subscribers: @fclem, @Sergey
Well, looks like this is a threading issue between (presumably) draw code and scene evaluation (aka depsgraph eval), so would like to summon @Sergey and @fclem here.
If you run Blender with a single thread (
-t 1
option in commandline), everything is fine.Otherwise, draw code (
mesh_render_data_create_ex()
) is using a mesh which has a validmloop
pointer, but noCD_MLOOP
corresponding layer in itsldata
cddata container. While inmesh_calc_modifiers()
, both orig mesh (at the beginning) andr_final
evaluated one (at the end) have both “loop data” properly set, as expected…Note that code is failing on drawing
MECube
here (i.e. the main 'ball', not the smaller 'decals').I can keep digging in the dark here to try to understand the why of that situation, but wouldn’t mind some enlightenment from devs knowing that code better. E.g., isn’t depsgraph evaluation supposed to happen fully outside of the draw loop? In other words, how can draw code have access to partially updated evaluated data (which seems to be happening here)?
@mont29, scene evaluation is done before the drawing happens. Drawing code shouldn't be calling
mesh_calc_modifiers
, it should draw what is already evaluated. Same should be true for normals, tangents and so on..If there is something what draw manager is expecting to have evaluated, this is to be coming from customdata mask on dependency graph nodes (similar to curve paths and
DEG_add_customdata_mask
).@Sergey drawing code is not calling
mesh_calc_modifier
(afaik). Drawing code is getting an evaluated mesh which, somehow, is missing CD_MLOOP data. This should not happen, ever, and seems to only happen in case of threaded evaluation with several mesh objects…This data layer is part of 'core' mesh data (the CD_MASK_BAREMESH mask), like polygons etc., those should never have to be cared about in DEG_add_customdata_mask & others, they are assumed to always be there, since a surface mesh without them is completely invalid. We have a function (
BKE_mesh_update_customdata_pointers
) to ensure that both the CD layer and the matching pointer in Mesh struct are kept in sync. In other words, no code should ever generate a mesh without those CDLayers (CD_MVERT, CD_MLOOP, etc.).Will keep digging tomorrow to try to understand what's happening here…
This issue was referenced by
fab573bac0
Changed status from 'Open' to: 'Resolved'
Note that commit above fixes the crash by preventing forbidden behavior in data transfer modifier, however that one will now be 'broken' regarding normals in some cases (basically, when Mesh's autosmooth of target/source object is not enabled). Proper fix for that is a bit involved, working on it still.