Movie Clip Editor: Crash on Detect Features Threshold change when using H.265 / HEVC files #86847

Closed
opened 2021-03-23 10:45:56 +01:00 by Daniel · 19 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 461.92

Blender Version
Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-03-22 17:02, hash: 62987a6f98
Worked: (newest version of Blender that worked as expected)

Short description of error
Blender crashes when detecting features in movie clip editor and setting Threshold to anything except 0.5
Reproduced using any H.265 .mp4 clip.
Blender also crashes when preloading a H.265 video file.

Exact steps for others to reproduce the error

  • Default setup
  • Select Movie Clip Editor
  • Load a Video file (at least 1080p)
  • Detect Features, in Detect Features setting window, change Threshold
**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 461.92 **Blender Version** Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-03-22 17:02, hash: `62987a6f98` Worked: (newest version of Blender that worked as expected) **Short description of error** Blender crashes when detecting features in movie clip editor and setting Threshold to anything except 0.5 Reproduced using any H.265 .mp4 clip. Blender also crashes when preloading a H.265 video file. **Exact steps for others to reproduce the error** - Default setup - Select Movie Clip Editor - Load a Video file (at least 1080p) - Detect Features, in Detect Features setting window, change Threshold
Author

Added subscriber: @elkoled-1

Added subscriber: @elkoled-1
Member

Added subscriber: @filedescriptor

Added subscriber: @filedescriptor
Member

I cannot reproduce this issue on the latest 2.93.0 Alpha, branch: master, commit date: 2021-03-23 07:34, hash: ec97450ac6.

I cannot reproduce this issue on the latest 2.93.0 Alpha, branch: master, commit date: 2021-03-23 07:34, hash: `ec97450ac6`.
Author

It does not happen for me using image sequences (even >8MP). I just discovered that some video files work and others don't.
I will provide an example video file that crashes Blender for me.

Prefetching the above mentioned .mp4 files also crashes blender, even when setting Memory limit to 16GB (System has 32GB)

It does not happen for me using image sequences (even >8MP). I just discovered that some video files work and others don't. I will provide an example video file that crashes Blender for me. Prefetching the above mentioned .mp4 files also crashes blender, even when setting Memory limit to 16GB (System has 32GB)
Author

It is related to HEVC/H.265 encoding. A working video file in H.264 does not work re-encoded in H.265.

It is related to HEVC/H.265 encoding. A working video file in H.264 does not work re-encoded in H.265.
Daniel changed title from Movie Clip Editor: Crash on Detect Features Threshold change to Movie Clip Editor: Crash on Detect Features Threshold change when using H.265 / HEVC files 2021-03-23 11:49:04 +01:00
Member

Still cannot reproduce here on linux. I used a 1920x1080 clip with H.265 encoding.

Still cannot reproduce here on linux. I used a 1920x1080 clip with H.265 encoding.
Author

H_265_720p.mp4 H_265.mp4
Okay, maybe related to Windows?
With these files, "Detect Features" and "Prefetch" crash Blender.

[H_265_720p.mp4](https://archive.blender.org/developer/F9905420/H_265_720p.mp4) [H_265.mp4](https://archive.blender.org/developer/F9905418/H_265.mp4) Okay, maybe related to Windows? With these files, "Detect Features" and "Prefetch" crash Blender.
Member

Yes, this might be Windows specific. Both files work fine for me. Prefetching and detecting features with no issue.
image.png

Yes, this might be Windows specific. Both files work fine for me. Prefetching and detecting features with no issue. ![image.png](https://archive.blender.org/developer/F9905435/image.png)
Member

I tried a debug build with ASAN enabled and I am getting some errors that might hint at the problem:

/.../blender/source/blender/blenkernel/intern/tracking.c:3254:22: runtime error: signed integer overflow: -2147483647 - 2147483647 cannot be represented in type 'int'
/.../blender/source/blender/blenkernel/intern/tracking.c:3293:26: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
/.../blender/source/blender/blenkernel/intern/tracking.c:3290:11: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
/.../blender/source/blender/editors/space_clip/clip_utils.c:126:11: runtime error: division by zero
I tried a debug build with ASAN enabled and I am getting some errors that might hint at the problem: ``` /.../blender/source/blender/blenkernel/intern/tracking.c:3254:22: runtime error: signed integer overflow: -2147483647 - 2147483647 cannot be represented in type 'int' /.../blender/source/blender/blenkernel/intern/tracking.c:3293:26: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' /.../blender/source/blender/blenkernel/intern/tracking.c:3290:11: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' /.../blender/source/blender/editors/space_clip/clip_utils.c:126:11: runtime error: division by zero ```

Added subscriber: @mano-wii

Added subscriber: @mano-wii

In #86847#1134597, @filedescriptor wrote:
I tried a debug build with ASAN enabled and I am getting some errors that might hint at the problem:

/.../blender/source/blender/blenkernel/intern/tracking.c:3254:22: runtime error: signed integer overflow: -2147483647 - 2147483647 cannot be represented in type 'int'
/.../blender/source/blender/blenkernel/intern/tracking.c:3293:26: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
/.../blender/source/blender/blenkernel/intern/tracking.c:3290:11: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
/.../blender/source/blender/editors/space_clip/clip_utils.c:126:11: runtime error: division by zero

I think these errors deserve some attention from the #vfx_video team

> In #86847#1134597, @filedescriptor wrote: > I tried a debug build with ASAN enabled and I am getting some errors that might hint at the problem: > ``` > /.../blender/source/blender/blenkernel/intern/tracking.c:3254:22: runtime error: signed integer overflow: -2147483647 - 2147483647 cannot be represented in type 'int' > /.../blender/source/blender/blenkernel/intern/tracking.c:3293:26: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' > /.../blender/source/blender/blenkernel/intern/tracking.c:3290:11: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' > /.../blender/source/blender/editors/space_clip/clip_utils.c:126:11: runtime error: division by zero > ``` I think these errors deserve some attention from the #vfx_video team
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

OK, will set to Needs Information from developers (to check above errors)

OK, will set to Needs Information from developers (to check above errors)

Added subscriber: @Sergey

Added subscriber: @Sergey
Sergey Sharybin self-assigned this 2021-03-29 14:45:28 +02:00

I've committed a fix for the integer overflow in 8f38534300. It might potentially fix the crash as well, as it was causing a bad allocation.
Since I could not reproduce the crash myself, I'm asking you to see if the crash is fixed or not and let us know :)

I've committed a fix for the integer overflow in 8f38534300. It might potentially fix the crash as well, as it was causing a bad allocation. Since I could not reproduce the crash myself, I'm asking you to see if the crash is fixed or not and let us know :)
Author

Hi Sergey,
I built blender master with this info:

Blender:
===========================================

version: 2.93.0 Alpha, branch: master, commit date: 2021-03-29 14:19, hash: 2e7e13442c91, type: 
build date: 2021-03-29, 14:55:36
platform: Windows

With this build, the bug did notoccour.
With the newest 2.93.0 alpha build from blender website, the error does also notoccour.
Thanks for resolving it!
Daniel

Hi Sergey, I built blender master with this info: ``` Blender: =========================================== version: 2.93.0 Alpha, branch: master, commit date: 2021-03-29 14:19, hash: 2e7e13442c91, type: build date: 2021-03-29, 14:55:36 platform: Windows ``` With this build, the bug did **not**occour. With the newest 2.93.0 alpha build from blender website, the error does also **not**occour. Thanks for resolving it! Daniel

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'

Thanks for testing. Closing as resolved!

Thanks for testing. Closing as 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#86847
No description provided.