Blender 3.5 crashes after frame render complete #106977
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#106977
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-13.3.1-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M2 1.2
Blender Version
Broken: version: 3.5.0, branch: blender-v3.5-release, commit date: 2023-03-29 02:56, hash:
1be25cfff18b
Worked: last 3.4 version
Short description of error
After rendering a frame, blender 3.5 crashes. Not all files seem to cause the crash, but it occurs on both my M2 air and M1 Studio Ultra. Crashes in both headless and normal mode.
Last regular log entry, then the failure...
Fra:1 Mem:6630.95M (Peak 7704.28M) | Time:00:57.24 | Compositing | De-initializing execution
libc++abi: terminating due to uncaught exception of type Iex_3_1::EnoentExc: No such file or directory.
Exact steps for others to reproduce the error
Download "Italian Flat" demo file from https://www.blender.org/download/demo-files/#cycles
Render a single frame. (Frame size percentage can be dialed down to allow render to compete faster.)
Simple file: simple_106977.blend
No repro on linux
@mano-wii : can you repro?
I can confirm the problem.
The error is in post processing.
It starts with an error when exporting EXR in composer:
Due to the error, OpenEXR itself forces Blender to close. It doesn't crash due to memory error or something.
I spent quite some time trying to find where the issue was introduced.
Apparently it was with library revision 63130 in Subversion: macOS Arm: library updates for 3.5
Before that, an error message appeared indicating that a directory was not found for the EXR.
Then, maybe the same error, forces Blender to close.
Here is a much smaller file which demonstrates the problem.
Apparently, the
try-catch
block does not catch OpenEXR exceptions by a const reference tostd::exception
, even though all the exception a publicly derived from thestd::exception
. Replacingcatch (const std::exception &exc) {
withcatch (const Iex::BaseExc &exc) {
in theopenexr_api.cpp
solves this problem.Verified that the
BaseExc
can be casted tostd::exception
by doing the following:The snippet compiles and is working properly.
Happens on both Intel and Apple Silicon devices, but not on Linux or windows.
It may be related to visibility, as explained under "Problems with C++ exceptions" here:
https://gcc.gnu.org/wiki/Visibility
The discussion here might be relevant:
https://github.com/AcademySoftwareFoundation/openexr/pull/868#issuecomment-779658097
It indeed could be, but it is not immediately clear to me how.
As a quicker solution which is also suitable for 3.5.1 is to follow what the OIIO does:
FYI https://archive.blender.org/developer/D13019
Similar bug was seen before: exception inheritance and catching issues
As far as I can tell the same issue should not happen for other libraries:
catch (const std::exception &ex)
, but also acatch (...)
fallback in case that fails.@brecht Thanks for checking!