Regression: Immediate Blender Crash in 4.0 when updating image data blocks during playback #109168
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#109168
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: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 535.98
Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-06-17 23:39, hash:
0b71a1f054c1
Caused by
65fc10bd33
Short description of error
Immediate crash when updating image data blocks from frame change handler & frame change handler is no longer visited after stopping playback (as it was in 3.6)
Exact steps for others to reproduce the error
IMPORTANT - The crash only happens if not debugging, so ensure Blender is launched from the exe directly, not from vs code etc
The addon has been reduced as much as possible from 8000 lines of code to a few hundred. The addon is doing the following:
test1
test 2
Related frame change handler bugs: #109127
Unable to repro a crash on linux in 4.0 hash
c78ea4cefc
Unable to repro this in 4.0 either, do you mean the Render Layer node is supposed to be unmuted after playback stopped?
(this does not appear to be working in 3.6 either).
Could
16d329da28
help here in any way?@lichtwerk just tried todays 4.0 build. It didn't crash immediately, but after leaving it to run for 30 seconds and stopping and starting playback a few times it did crash again, and then afterwards every time I opened Blender and tried again, it then crashed immediately each time. Perhaps windows related?
logs attached.
I don't think
16d329da28
will help, because in our case render.render is being used to force the playhead to not move to the next frame until the compositor has finished processing. Without doing that the playhead will move to the next frame with the backdrop only partially drawn.For us the frame change handler is definitely being revisited when the playhead stops, and therefore able to unmute the render layer node. Video attached of 3.6 and below behaviour, render layer node is initially un-muted, then after pressing play it's muted, then when stopping playback it's once again un-muted by line 60 in handlers.py
Checked 3.6 again, muted nodes dont get unmuted there for me.
Revisited 4.0 again as well, what I can say (without further checking yet) is that I indeed get a freeze if I
I can not reproduce on macOS, neither in release nor debug+ASAN modes. Don't currently have access to Windows machine, maybe someone around the bug tracker can try testing it there? =
@Julieta-Riley You mentioned running Blender from outside of VS Code is crucial. Am I right that you have a Blender development environment? If so, maybe you can try building
RelWithDebInfo
configuration, run it, when it crashes make a dump, and open the dump with WinDbg to get a meaningful backtrace?@lichtwerk I've just retried in 3.6 starting in factory mode then re-enabled the addon, and the handler is still being hit one final time and successfully unmuting the render layer node when playback stops. Really strange that it's not happening for you. Possibly OS related? Although that would be strange because we have a few thousand users and non have reported this issue in 3.6 and below.
After you get the freeze, if you then force blender to close, and re-start/re-open the file and press play, do you then get an immediate crash the same as us?
@Sergey We're just using Jacques Lucke's VS code extension to allow us to debug the python addons. We're not set up for Blender development.
@Sergey we can try though if someone can provide us a link to step by step instructions to do what you've said?
Can confirm, will bisect.
Immediate Blender Crash in 4.0 when updating image data blocks during playback (works in 3.6 and below) & frame change handler is no longer visited after stopping playbackto Immediate Blender Crash in 4.0 when updating image data blocks during playbackImmediate Blender Crash in 4.0 when updating image data blocks during playbackto Regression: Immediate Blender Crash in 4.0 when updating image data blocks during playbackCC @brecht
@Julieta-Riley
This seems to be same in latest 3.6 build, so it is different issue. Can you create new report? That broke between
c49a0fa474
and43fe7bec4f
@iss Yes I'll recreate a new report for the frame change handler. I must have been using an older 3.6 build.
For reference, this was reported in #109218
@Julieta-Riley I see. Since Richard managed to reproduce the crash perhaps the hassle of you setting up a development environment is not needed them :)
@iss Did you reproduce the original issue (with just playback, without muting and such) ? Can you share backtrace? And was that on Windows?
@Sergey I've got this in .crash.txt file:
But now I noticed
Win32 Error# (170): Device or resource busy.
in console (translated from czech)Will try to get more info with what you suggested above
When I do this, I see the following:
@lichtwerk I do not think it is really a freeze. Not sure if it is addon doing directly, or somehow indirectly triggers it, but following those steps makes Cycles to render the scene.
The
vptr
UBSAN error you'll see with starting--factory-startup
and doing a Cycles render.If you set the number of samples to 1 in the file from this report, following yours steps will make playback very slow, but it is not a freeze.
@iss Unfortunately, this is very generic place to crash. Having a backtrace will give more hints.
@Sergey when the render layers node is muted the 3d scene isn't rendered, only the compositor (historically at least). Prior to 4.0, we generally get around 30 fps for a simple compositor that just loads the new EXR to the existing image datablock, then calls render.render() to force the playhead to wait until the compositor has finished processing before moving onto the next frame.
i've managed to build and am running a RelWithDebInfo build of blender so that I can get a meaningful backtrace from the dump file using windbg (windows 10). Could anyone advise how I create a dump after blender crashes? Or is the dump created somewhere by that build automatically?
Sorry I only usually work with Python and VS code, so this is a bit outside of my comfort zone.
OK, I couldn't find a dump after Blender crashes in the system directory or minidump directory, so I ran the RelWithDebInfo build from the file named 'blender_debug_log.cmd' and got the attached files generated:
I've got new error:
GHOST_ContextWGL.cc:71: [::wglDeleteContext(m_hGLRC)] -> Win32 Error# (170): Resource is being used
Also crash doesn't happen when
--debug-depsgraph is used.
I got trace now:
Same as #109218, couldnt the avoidance of the extra DG update from
d8388ef36a
the culprit here?@iss : could you check
d8388ef36a
and the previous commit?Would that make a difference considering the crash usually happens during initial playback directly after opening the blend file? Or is Jacque's new code called once on file load perhaps?
If this crash is caused by
65fc10bd33
, then #108909 may fix it since it changes this code further. At least thatGHOST_ContextWGL.cc:71
error is likely avoided, since the context will be persistent and not freed during animation playback.I can not see a clear relation between
65fc10bd33
and the backtrace that points to a crash in image loading though. Is that really the thread that is crashing, or perhaps just whatever the main thread is doing while another thread crashes?The crash happened much deeper in stack, but I don't have symbols. will re-check just to be sure
#108909 was merged by the way, though I would not expect that to address the root cause.
Hi, I know you've yet to find the root cause, but I just wanted to say I'm no longer getting the crash in the tiled compositor or the full frame compositor in Blender 4.0.0
I am getting an immediate ACCESS violation during playback still if I set the compositor to 'Realtime GPU' execution mode (changing frames with the arrow keys doesn't produce the crash). I'm unsure if it's related to this report though, so I've created a separate report and modified the test addon a little:
#109676
I looked into this a bit more but could not reproduce it anymore either. I did find another crash with the Full Frame compositor and fixed that in
4c6653274c
.I will considered this resolved unless someone encounters this problem again.