Regression: UI freeze for Render Animation AND changing frame being previewed #100074

Closed
opened 2022-07-30 01:35:43 +02:00 by Ellen Dash · 14 comments

(NOTE: I am opening this on behalf of someone else, since I have a developer.blender.org account and she doesn't.)

System Information
Operating system: Manjaro Linux
Graphics card: 2x Radeon RX 6600 (only one used for Blender renders)

Blender Version
Broken: 3.2.0, 3.2.1, 3.2.2, c857405c0d
Worked: 3.1.2

This was tested in 3.2.1 on Windows 10, as well, and it had the same problem.

All of these were tested with the --factory-startup flag.

Short description of error

Exact steps for others to reproduce the error

  1. Open the attached LightSwitchScene.blend file.
  2. Render -> Render Animation.
  3. The first frame renders, then the Blender UI freezes.

If you choose Render -> Render Image, it works.

OR:

  1. Open the attached LightSwitchScene.blend file.
  2. Select a different frame. Any frame.
  3. As soon as it tries to render the preview for the newly-selected frame, the Blender UI freezes.

Notes about the file

There are two view layers. View Layer is the actual light switch, View Layer_001 is a watermark. These are composited together.

LightSwitchScene.blend

(**NOTE**: I am opening this on behalf of someone else, since I have a developer.blender.org account and she doesn't.) **System Information** Operating system: Manjaro Linux Graphics card: 2x Radeon RX 6600 (only one used for Blender renders) **Blender Version** Broken: 3.2.0, 3.2.1, 3.2.2, c857405c0d28 Worked: 3.1.2 This was tested in 3.2.1 on Windows 10, as well, and it had the same problem. All of these were tested with the `--factory-startup` flag. **Short description of error** **Exact steps for others to reproduce the error** 1. Open the attached LightSwitchScene.blend file. 2. Render -> Render Animation. 3. The first frame renders, then the Blender UI freezes. If you choose Render -> Render Image, it works. OR: 1. Open the attached LightSwitchScene.blend file. 2. Select a different frame. Any frame. 3. As soon as it tries to render the preview for the newly-selected frame, the Blender UI freezes. **Notes about the file** There are two view layers. `View Layer` is the actual light switch, `View Layer_001` is a watermark. These are composited together. [LightSwitchScene.blend](https://archive.blender.org/developer/F13326008/LightSwitchScene.blend)
Author

Added subscriber: @duckinator

Added subscriber: @duckinator
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Thanks for the report. In 3.2 and above version UI did not freeze instead rendering stuck at first frame is what I noticed.
While final render animation works in 3.1. I'll search for the affecting commit.

Thanks for the report. In 3.2 and above version UI did not freeze instead rendering stuck at first frame is what I noticed. While final render animation works in 3.1. I'll search for the affecting commit.
Member

Tried to bisect between 52a5f6856268 - e5a738af6d51 and pointed me to 8399375098 (I don't think this commit is responsible)

Tried to bisect between `52a5f6856268` - `e5a738af6d51` and pointed me to 8399375098 (I don't think this commit is responsible)

Added subscriber: @ErickNyanduKabongo

Added subscriber: @ErickNyanduKabongo

This sounds like the same problem as in #100061

This sounds like the same problem as in #100061
Pratik Borhade changed title from UI freeze for Render Animation AND changing frame being previewed to Regression: UI freeze for Render Animation AND changing frame being previewed 2022-08-02 08:02:30 +02:00
Member

Seems a regression so raising the priority.

Seems a regression so raising the priority.

Added subscribers: @neXyon, @brecht

Added subscribers: @neXyon, @brecht

The reason this was difficult to bisect is that what makes the difference is the ffmpeg library version. The same Blender code works with the older ffmpeg does not hang.

I verified it by temporarily restoring the old libraries like this (make update will set them to the latest again):

cd ../lib/linux_centos7_x86_64/ffmpeg
svn switch https://svn.blender.org/svnroot/bf-blender/tags/blender-3.1-release/lib/linux_centos7_x86_64/ffmpeg

Backtrace where it hangs in audaspace: P3130

CC @neXyon

The reason this was difficult to bisect is that what makes the difference is the ffmpeg library version. The same Blender code works with the older ffmpeg does not hang. I verified it by temporarily restoring the old libraries like this (`make update` will set them to the latest again): ``` cd ../lib/linux_centos7_x86_64/ffmpeg svn switch https://svn.blender.org/svnroot/bf-blender/tags/blender-3.1-release/lib/linux_centos7_x86_64/ffmpeg ``` Backtrace where it hangs in audaspace: [P3130](https://archive.blender.org/developer/P3130.txt) CC @neXyon

Proposed solution:

diff --git a/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp b/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp
index ad33c26..4ad6ff5 100644
--- a/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp
+++ b/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp
@@ -363,8 +363,10 @@ int FFMPEGReader::read_packet(void* opaque, uint8_t* buf, int buf_size)
 
        long long size = std::min(static_cast<long long>(buf_size), reader->m_membuffer->getSize() - reader->m_membufferpos);
 
+       if(size == 0)
+               return AVERROR_EOF;
        if(size < 0)
-               return -1;
+               return AVERROR(EIO);
 
        std::memcpy(buf, ((data_t*)reader->m_membuffer->getBuffer()) + reader->m_membufferpos, size);
        reader->m_membufferpos += size;

Based on what one ffmpeg's own tools does:
https://github.com/FFmpeg/FFmpeg/blob/master/tools/target_dem_fuzzer.c#L50

Proposed solution: ``` diff --git a/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp b/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp index ad33c26..4ad6ff5 100644 --- a/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp +++ b/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp @@ -363,8 +363,10 @@ int FFMPEGReader::read_packet(void* opaque, uint8_t* buf, int buf_size) long long size = std::min(static_cast<long long>(buf_size), reader->m_membuffer->getSize() - reader->m_membufferpos); + if(size == 0) + return AVERROR_EOF; if(size < 0) - return -1; + return AVERROR(EIO); std::memcpy(buf, ((data_t*)reader->m_membuffer->getBuffer()) + reader->m_membufferpos, size); reader->m_membufferpos += size; ``` Based on what one ffmpeg's own tools does: https://github.com/FFmpeg/FFmpeg/blob/master/tools/target_dem_fuzzer.c#L50
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Joerg Mueller self-assigned this 2022-08-05 19:34:56 +02:00
Member

This has already been fixed with e4fd2d5754

This has already been fixed with e4fd2d5754

Ok, this fix should have been committed to blender-v3.3-release, I will backport it.

Ok, this fix should have been committed to `blender-v3.3-release`, I will backport it.
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#100074
No description provided.