Compositor: Crash when scaling image beyond 100k x 100k pixels #126318

Open
opened 2024-08-14 15:55:38 +02:00 by bouam sidi abderrahmane · 6 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 560.81
RAM : 64GB
CPU : Ryzen 5800X

Blender Version
Broken: version: 4.2.0, branch: blender-v4.2-release, commit date: 2024-07-16 06:20, hash: a51f293548ad
Broken: version: 4.3.0, Commit date: 2024-08-13 22:21, Hash 8f996f178604
Worked: Tested and working with 4.0

Short description of error
The compositor crashes whith certain nodes when rendering at large resolutions (eg : 5120x2160 ). I tried both CPU and GPU compositing, and there is plenty of free RAM and VRAM. Both 4.2 and the latest build of 4.3 have the issue, even with factory settings.
This worked fine with older versions of blender with the old compositor.
image
image

Exact steps for others to reproduce the error
Open the attached file and start a render. It will crash immediately after the denoising finishes.

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 560.81 RAM : 64GB CPU : Ryzen 5800X **Blender Version** Broken: version: 4.2.0, branch: blender-v4.2-release, commit date: 2024-07-16 06:20, hash: `a51f293548ad` Broken: version: 4.3.0, Commit date: 2024-08-13 22:21, Hash `8f996f178604` Worked: Tested and working with 4.0 **Short description of error** The compositor crashes whith certain nodes when rendering at large resolutions (eg : 5120x2160 ). I tried both CPU and GPU compositing, and there is plenty of free RAM and VRAM. Both 4.2 and the latest build of 4.3 have the issue, even with factory settings. This worked fine with older versions of blender with the old compositor. ![image](/attachments/ee5455b7-d90d-4abb-97d5-526aa89443e0) ![image](/attachments/28d1b3ce-5a97-414f-a8bb-22db3b5e67b7) **Exact steps for others to reproduce the error** Open the attached file and start a render. It will crash immediately after the denoising finishes.
bouam sidi abderrahmane added the
Severity
Normal
Status
Needs Triage
Type
Bug
labels 2024-08-14 15:55:39 +02:00
Iliya Katushenock added the
Interest
Compositing
Interest
VFX & Video
labels 2024-08-14 16:21:24 +02:00

This did crash for me, but only with GPU device and with different trace.

blender::gpu::GLStateManager::image_bind(blender::gpu::GLStateManager * const this, blender::gpu::Texture * tex_, int unit) (/home/me/blender-git/1/source/blender/gpu/opengl/gl_state.cc:563)
GPU_texture_image_bind(GPUTexture * tex, int unit) (/home/me/blender-git/1/source/blender/gpu/intern/gpu_texture.cc:596)
blender::realtime_compositor::Result::bind_as_image(const blender::realtime_compositor::Result * const this, GPUShader * shader, const char * image_name, bool read) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/intern/result.cc:245)
blender::realtime_compositor::horizontal_pass(blender::realtime_compositor::Context & context, blender::realtime_compositor::Result & input, float radius, int filter_type, bool extend_bounds, bool gamma_correct) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/algorithms/intern/symmetric_separable_blur.cc:82)
blender::realtime_compositor::symmetric_separable_blur(blender::realtime_compositor::Context & context, blender::realtime_compositor::Result & input, blender::realtime_compositor::Result & output, blender::float2 radius, int filter_type, bool extend_bounds, bool gamma_correct) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/algorithms/intern/symmetric_separable_blur.cc:144)
blender::nodes::node_composite_blur_cc::BlurOperation::execute(blender::nodes::node_composite_blur_cc::BlurOperation * const this) (/home/me/blender-git/1/source/blender/nodes/composite/nodes/node_composite_blur.cc:118)
blender::realtime_compositor::Operation::evaluate(blender::realtime_compositor::Operation * const this) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/intern/operation.cc:35)
blender::realtime_compositor::NodeOperation::evaluate(blender::realtime_compositor::NodeOperation * const this) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/intern/node_operation.cc:54)
blender::realtime_compositor::Evaluator::compile_and_evaluate_node(blender::realtime_compositor::Evaluator * const this, blender::nodes::DNode node, blender::realtime_compositor::CompileState & compile_state) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/intern/evaluator.cc:128)
blender::realtime_compositor::Evaluator::compile_and_evaluate(blender::realtime_compositor::Evaluator * const this) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/intern/evaluator.cc:106)
blender::realtime_compositor::Evaluator::evaluate(blender::realtime_compositor::Evaluator * const this) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/intern/evaluator.cc:33)
blender::render::RealtimeCompositor::execute(blender::render::RealtimeCompositor * const this, const blender::render::ContextInputData & input_data) (/home/me/blender-git/1/source/blender/render/intern/compositor.cc:649)
Render::compositor_execute(Render * const this, const Scene & scene, const RenderData & render_data, const bNodeTree & node_tree, const char * view_name, blender::realtime_compositor::RenderContext * render_context, blender::realtime_compositor::Profiler * profiler) (/home/me/blender-git/1/source/blender/render/intern/compositor.cc:689)
RE_compositor_execute(Render & render, const Scene & scene, const RenderData & render_data, const bNodeTree & node_tree, const char * view_name, blender::realtime_compositor::RenderContext * render_context, blender::realtime_compositor::Profiler * profiler) (/home/me/blender-git/1/source/blender/render/intern/compositor.cc:710)
COM_execute(Render * render, RenderData * render_data, Scene * scene, bNodeTree * node_tree, const char * view_name, blender::realtime_compositor::RenderContext * render_context, blender::realtime_compositor::Profiler * profiler) (/home/me/blender-git/1/source/blender/compositor/intern/COM_compositor.cc:86)
ntreeCompositExecTree(Render * render, Scene * scene, bNodeTree * ntree, RenderData * rd, const char * view_name, blender::realtime_compositor::RenderContext * render_context, blender::realtime_compositor::Profiler * profiler) (/home/me/blender-git/1/source/blender/nodes/composite/node_composite_tree.cc:187)
do_render_compositor(Render * re) (/home/me/blender-git/1/source/blender/render/intern/pipeline.cc:1368)
do_render_full_pipeline(Render * re) (/home/me/blender-git/1/source/blender/render/intern/pipeline.cc:1591)
RE_RenderFrame(Render * re, Main * bmain, Scene * scene, ViewLayer * single_layer, Object * camera_override, const int frame, const float subframe, const bool write_still) (/home/me/blender-git/1/source/blender/render/intern/pipeline.cc:2028)
render_startjob(void * rjv, wmJobWorkerStatus * worker_status) (/home/me/blender-git/1/source/blender/editors/render/render_internal.cc:723)

I would like to see what others can reproduce, since I am not sure if my crash is related.

This did crash for me, but only with GPU device and with different trace. ``` blender::gpu::GLStateManager::image_bind(blender::gpu::GLStateManager * const this, blender::gpu::Texture * tex_, int unit) (/home/me/blender-git/1/source/blender/gpu/opengl/gl_state.cc:563) GPU_texture_image_bind(GPUTexture * tex, int unit) (/home/me/blender-git/1/source/blender/gpu/intern/gpu_texture.cc:596) blender::realtime_compositor::Result::bind_as_image(const blender::realtime_compositor::Result * const this, GPUShader * shader, const char * image_name, bool read) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/intern/result.cc:245) blender::realtime_compositor::horizontal_pass(blender::realtime_compositor::Context & context, blender::realtime_compositor::Result & input, float radius, int filter_type, bool extend_bounds, bool gamma_correct) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/algorithms/intern/symmetric_separable_blur.cc:82) blender::realtime_compositor::symmetric_separable_blur(blender::realtime_compositor::Context & context, blender::realtime_compositor::Result & input, blender::realtime_compositor::Result & output, blender::float2 radius, int filter_type, bool extend_bounds, bool gamma_correct) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/algorithms/intern/symmetric_separable_blur.cc:144) blender::nodes::node_composite_blur_cc::BlurOperation::execute(blender::nodes::node_composite_blur_cc::BlurOperation * const this) (/home/me/blender-git/1/source/blender/nodes/composite/nodes/node_composite_blur.cc:118) blender::realtime_compositor::Operation::evaluate(blender::realtime_compositor::Operation * const this) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/intern/operation.cc:35) blender::realtime_compositor::NodeOperation::evaluate(blender::realtime_compositor::NodeOperation * const this) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/intern/node_operation.cc:54) blender::realtime_compositor::Evaluator::compile_and_evaluate_node(blender::realtime_compositor::Evaluator * const this, blender::nodes::DNode node, blender::realtime_compositor::CompileState & compile_state) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/intern/evaluator.cc:128) blender::realtime_compositor::Evaluator::compile_and_evaluate(blender::realtime_compositor::Evaluator * const this) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/intern/evaluator.cc:106) blender::realtime_compositor::Evaluator::evaluate(blender::realtime_compositor::Evaluator * const this) (/home/me/blender-git/1/source/blender/compositor/realtime_compositor/intern/evaluator.cc:33) blender::render::RealtimeCompositor::execute(blender::render::RealtimeCompositor * const this, const blender::render::ContextInputData & input_data) (/home/me/blender-git/1/source/blender/render/intern/compositor.cc:649) Render::compositor_execute(Render * const this, const Scene & scene, const RenderData & render_data, const bNodeTree & node_tree, const char * view_name, blender::realtime_compositor::RenderContext * render_context, blender::realtime_compositor::Profiler * profiler) (/home/me/blender-git/1/source/blender/render/intern/compositor.cc:689) RE_compositor_execute(Render & render, const Scene & scene, const RenderData & render_data, const bNodeTree & node_tree, const char * view_name, blender::realtime_compositor::RenderContext * render_context, blender::realtime_compositor::Profiler * profiler) (/home/me/blender-git/1/source/blender/render/intern/compositor.cc:710) COM_execute(Render * render, RenderData * render_data, Scene * scene, bNodeTree * node_tree, const char * view_name, blender::realtime_compositor::RenderContext * render_context, blender::realtime_compositor::Profiler * profiler) (/home/me/blender-git/1/source/blender/compositor/intern/COM_compositor.cc:86) ntreeCompositExecTree(Render * render, Scene * scene, bNodeTree * ntree, RenderData * rd, const char * view_name, blender::realtime_compositor::RenderContext * render_context, blender::realtime_compositor::Profiler * profiler) (/home/me/blender-git/1/source/blender/nodes/composite/node_composite_tree.cc:187) do_render_compositor(Render * re) (/home/me/blender-git/1/source/blender/render/intern/pipeline.cc:1368) do_render_full_pipeline(Render * re) (/home/me/blender-git/1/source/blender/render/intern/pipeline.cc:1591) RE_RenderFrame(Render * re, Main * bmain, Scene * scene, ViewLayer * single_layer, Object * camera_override, const int frame, const float subframe, const bool write_still) (/home/me/blender-git/1/source/blender/render/intern/pipeline.cc:2028) render_startjob(void * rjv, wmJobWorkerStatus * worker_status) (/home/me/blender-git/1/source/blender/editors/render/render_internal.cc:723) ``` I would like to see what others can reproduce, since I am not sure if my crash is related.
Member

I did get a bunch of these errors on latest main but it didn't crash on me 🤔

WARN (bpy.rna): source/blender/python/intern/bpy_rna.cc:1360 pyrna_enum_to_py: current value '2' matches no enum in 'CyclesRenderSettings', '', 'preview_denoiser'
I did get a bunch of these errors on latest main but it didn't crash on me 🤔 ``` WARN (bpy.rna): source/blender/python/intern/bpy_rna.cc:1360 pyrna_enum_to_py: current value '2' matches no enum in 'CyclesRenderSettings', '', 'preview_denoiser' ```
Member

Regardless of the crash, you are trying to create an image of width 107520, that's like 184GB of data just for a single image. So your node tree will probably fail even if Blender didn't crash.

Regardless of the crash, you are trying to create an image of width `107520`, that's like 184GB of data just for a single image. So your node tree will probably fail even if Blender didn't crash.

Regardless of the crash, you are trying to create an image of width 107520

I missed that, my bad.
Mixing the 256x256 image with the original render was a workaround for the old blender compositor to extend the smaller image's bounds to the rendered image size, otherwise it only applied the effect on a 256x256 square.
The new compositor's seems to extend the bounds of an image when scaling, and because I mixed it with the render, it's now trying to scale a 5120x2160 image instead of the 256x256 image, so that explains it.

I got rid of the old workaround and now it works as intended.

> Regardless of the crash, you are trying to create an image of width 107520 I missed that, my bad. Mixing the 256x256 image with the original render was a workaround for the old blender compositor to extend the smaller image's bounds to the rendered image size, otherwise it only applied the effect on a 256x256 square. The new compositor's seems to extend the bounds of an image when scaling, and because I mixed it with the render, it's now trying to scale a 5120x2160 image instead of the 256x256 image, so that explains it. I got rid of the old workaround and now it works as intended.
Member

Hi @AbdouBouam so does this mean the problem has been resolved? I guess we can close this?

Hi @AbdouBouam so does this mean the problem has been resolved? I guess we can close this?
Member

This is still technically a bug or a known issue, since we should try not to crash even if such allocations fail. But I am not sure what should be done in that case or if we should communicate it to the user somehow.

This is still technically a bug or a known issue, since we should try not to crash even if such allocations fail. But I am not sure what should be done in that case or if we should communicate it to the user somehow.
Omar Emara changed title from compositor with large resolution renders causes Exception Access Violation and Crash to Compositor: Crash when scaling image beyond 100k x 100k pixels 2024-08-15 14:08:12 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
4 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#126318
No description provided.