Loading complete image after border render crashes Blender #25775

Closed
opened 2011-01-23 16:43:00 +01:00 by Maurice Raybaud · 9 comments

%%%When using POV-Ray exporter, border render generates a padded full sized image, where blender internal expects a cropped tile. It crashes.

An old functionality for partial image reading removed by Brecht Van Lommel, and which he would not disagree to see restored might provide a way to read an image that is different from the expected file size and allow the POV rendered image to load back to Blender when using border render. %%%

%%%When using POV-Ray exporter, border render generates a padded full sized image, where blender internal expects a cropped tile. It crashes. An old functionality for partial image reading removed by Brecht Van Lommel, and which he would not disagree to see restored might provide a way to read an image that is different from the expected file size and allow the POV rendered image to load back to Blender when using border render. %%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'

%%%even if old functionality is added back the crash should be fixed,%%%

%%%even if old functionality is added back the crash should be fixed,%%%

%%%note, the offset value in do_merge_tile() can become negative which causes a crash and points to the renderlayer created from python being incorrect however the values here don't make any sense to me since the max values are always smaller then the min values even when using blender internal.

assigning to Ton.%%%

%%%note, the offset value in do_merge_tile() can become negative which causes a crash and points to the renderlayer created from python being incorrect however the values here don't make any sense to me since the max values are always smaller then the min values even when using blender internal. assigning to Ton.%%%
Member

%%%I'll pass it on to Brecht, getting this tested will just give me too much overhead :)%%%

%%%I'll pass it on to Brecht, getting this tested will just give me too much overhead :)%%%

%%%(below might be somewhat redundant info…)

As far as I know, the problem is that, in RE_engine_begin_result (source/blender/render/intern/source/pipeline.c), when the external render tries to get a RenderResult corresponding to the border-rendered region (e.g. [100, 50, 300, 200]), the current re->result rectx/y is [200, 150] (i.e. the size of the “render display” automatically set by Blender), which will obviously gives wrong results (and segfaults at the end), due to the tests and clamping done on the given coordinates and dimensions.

Commenting out these tests (as in attached patch) makes the border render work with external engines and py API (at least, with the tested POV Ray addon).

However, I do not truly understand why the problem does not arise with internal render? And I’m not sure at all erasing those tests are a good thing (I don’t expect it to break anything, but I guess it introduces possible problems if render scripts make mistakes at this point!). It might be better to invalidate the resizing of the render display when using external engines? Or otherwise solve that mismatch? Thing is, I’m not enough at ease with this part of the code yet to propose a better solution…%%%

%%%(below might be somewhat redundant info…) As far as I know, the problem is that, in RE_engine_begin_result (source/blender/render/intern/source/pipeline.c), when the external render tries to get a RenderResult corresponding to the border-rendered region (e.g. [100, 50, 300, 200]), the current re->result rectx/y is [200, 150] (i.e. the size of the “render display” automatically set by Blender), which will obviously gives wrong results (and segfaults at the end), due to the tests and clamping done on the given coordinates and dimensions. Commenting out these tests (as in attached patch) makes the border render work with external engines and py API (at least, with the tested POV Ray addon). However, I do not truly understand why the problem does not arise with internal render? And I’m not sure at all erasing those tests are a good thing (I don’t expect it to break anything, but I guess it introduces possible problems if render scripts make mistakes at this point!). It might be better to invalidate the resizing of the render display when using external engines? Or otherwise solve that mismatch? Thing is, I’m not enough at ease with this part of the code yet to propose a better solution…%%%
Member

%%%Internal render system uses own buffers (per tile) and copies this to the final 'result' with a function respecting the border and actual image size.
To me it seems the external engines should do same?%%%

%%%Internal render system uses own buffers (per tile) and copies this to the final 'result' with a function respecting the border and actual image size. To me it seems the external engines should do same?%%%

%%%@Ton, this isn't about the tile system, even though the bug may be here, the problem is that blender crashes when reading an un-cropped border render from an external engine.%%%

%%%@Ton, this isn't about the tile system, even though the bug may be here, the problem is that blender crashes when reading an un-cropped border render from an external engine.%%%

%%%Fix in svn, thanks for the report.%%%

%%%Fix in svn, thanks for the report.%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
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
5 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#25775
No description provided.