Crash rendering with EEVEE in mesh edit-mode #94230
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
10 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#94230
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: macOS-12.0.1-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro 575 OpenGL Engine ATI Technologies Inc. 4.1 ATI-4.7.29
Blender Version
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-12-14 00:16, hash:
c1f5d8d023
Worked: (newest version of Blender that worked as expected)
Caused by
aa6f0f3d1f
Short description of error
Crash guide
Exact steps for others to reproduce the error
@PratikPB2123
and
@lichtwerk
Open file then already have edit mode then push the F12 render cause crash any thing also edit mode select crash unknown how to explain. See youtube
Blender crash guide 3.1.0 December 17, 2021.txt
See youtube: https://youtu.be/XkKoX2lM-_0
Hand 9 fruit tree 1.1.0.blend
NOTE: The test file from this report is quite large, this is a simplified file with a command to redo the bug, @ideasman42
Test file: T94230_simple_test.blend
Command to reproduce the crash:
Added subscribers: @PratikPB2123, @lichtwerk, @Kent-Davis
#94652 was marked as duplicate of this issue
Youtube: https://youtu.be/XkKoX2lM-_0
Hello @Kent-Davis , thanks for the report. Can confirm the crash with your file.
Is it possible to reduce the file size? (Remove unwanted textures, shaders,objects from the scene. Also present file even has 4-5 additional scenes, try to remove them?).
~800mb file size is quite large.
Stack trace:
Hello @PratikPB2123
Oh well you are use Windows.
Would you like to go Macintosh only please. Do not use Windows.
Added subscriber: @michael64
@Kent-Davis Thanks for the report. It is good to test a bug on different systems though and here
we might have a bug than crashes differently on different systems.
The diff in D13628 fixes this crash on macOS 12.1/M1 for me.
@michael64
That is good your answer. I am wait for them to fix Blender non crash guide.
Me Intel year 2017.Macintosh
Changed status from 'Needs Triage' to: 'Confirmed'
Cannot repro the crash on my side, but will confirm, since we have two people apparently who can (and there is a potetial fix available already).
Blender crash guideto Compositor crash@lichtwerk
Ok no problem.
Hello @lichtwerk, I would to see D13628 applied and hope that @Kent-Davis sees a positive effect.
On macOS that was necessary to prevent one crash.
In the meantime I also tested on Windows with D13628 applied
which still crashed at the same site that @PratikPB2123 found.
Why wasn't Windows crashing in the function containing char[1000000]?
The default Windows stack size for a thread is 1MB (1024*1024) so either
it fits or the error is triggered even earlier than on macOS.
I have been running AddressSanitizer on Windows for this crash and have
seen that a Material instance is referenced at the crash site that has been
deallocated earlier.
To verify this one can simply comment out the line
in deg_node_id.cc and this prevents the crash.
That is obviously not a solution but uncommenting the DEG_DEBUG_COW_POINTERS
define helps in locating the root cause.
I am still slowly working on this bug the questions to be answered are:
I'll report back if I make any progress on Windows.
@michael64
Good job.
Added subscriber: @LazyDodo
While the logic of that argument will still stand, you're wrong on the numbers both here and in D13628, The Stack size for windows is 2MB, while on mac we use 1MB
and while I agree having such a a large array on the stack is without a doubt bad, and needs fixing, couple of things
DebugInfo::graphviz
is a contributing factor to the crash reported in this ticket.COM_EXPORT_GRAPHVIZ
is by defaultfalse
, in which case the compiler will do the right thing, eliminate all dead code and generate the following code forDebugInfo::graphviz
No large stack allocation, actually no real code at all, which leads me to the conclusion while the bug you found while investigating #94230 is annoying, D13628 is not a fix for #94230 (but a nice find nonetheless)
best to ignore this distraction for the remainder of this ticket, I will land D13628 though.
Hi @LazyDodo, in P2679 you have the full dump of the crash.
I compiled a lite build with '#define DEG_DEBUG_COW_POINTERS' enabled.
I also added the file and line information to the remapping log messages to see the two different ways the remapping is called.
Starting from the end of the paste maybe the situation is clear to some developer.
Feel free to mention a developer who knows these parts of the code well, I am gonna dig in deeper as well.
@michael64
I am really proud of you awesome about MacOS 12.1 and 12.2 Beta (21D5025f) too.
I do agree with you.
Added subscriber: @ideasman42
This crash can be easily reproduced without the scene file as follows:
Blender should now have crashed.
This bug was introduces in
aa6f0f3d1f
and is still present in the latest revision.In P2685 you find a small patch so that the crash can be easily investigated without using the AddressSanitizer.
If you'd run the latest master with the P2685 applied you'd see the following output when you follow the 5 steps above (abbreviated):
The crash happens in the following line in eevee_materials.c with ma==0x167b37288 being the id_cow that was deallocated so ma is a dangling pointer:
When not using AddressSanitizer the crash might also happen a little later when the code is running operations on previously-but-no-more defined memory.
Immediately before the crash get_evaluated_object_data_with_materials is called and the ID data is taken from the edit mesh because we are in edit mode and that is where the dangling pointer comes from.
The "Destroy CoW for MAMaterial" was triggered by the blender::deg::Depsgraph::~Depsgraph machinery that was called by render_pipeline_free on the render thread while the crash happens on the main but this is not a race-condition but simply a use-after-free error.
In my opinion somewhere near ~Depsgraph the edit_mesh needs to cleared of dangling pointers after the "Destroy CoW" but I cannot offer a good solution here.
Instead I'd like to ask @ideasman42 to take a look at this for a proper fix.
Added subscriber: @rjsilk
Compositor crashto Crash rendering with EEVEE in mesh edit-modeAdded subscribers: @mano-wii, @ankitm
Added subscriber: @brecht
Is this solved by {D13824}?
Now I am use Blender 3.2.0 Alpha.
Added subscriber: @Sergey
Changed status from 'Confirmed' to: 'Resolved'
Ive tested this bug with
0f89bcdbeb
and it does not happen, but it happens with the revision right prior to that. Quite sure the issue got fixed by the D13824.Thanks @everyone