VSE scrubbing locks up blender #87090

Closed
opened 2021-03-31 17:00:00 +02:00 by Georg K · 20 comments

System Information
Operating system: Linux-5.11.6-1-MANJARO-x86_64-with-glibc2.33 64 Bits
Graphics card: AMD VERDE (DRM 2.50.0, 5.11.6-1-MANJARO, LLVM 11.1.0) AMD 4.5 (Core Profile) Mesa 20.3.4

Blender Version
Broken: version: 2.91 - 2.93.0 Alpha, branch: master, commit date: 2021-03-31 13:01, hash: 23c1e48e19
Worked: ?

Short description of error
After scrubbing the timeline in the VSE (image sequence + speed control + image) for some time, blender locks up and has to be terminated from the process table. Sometimes it takes several minutes until it locks up. It is unclear if the speed control and image are necessary for the bug to occur or if they just make it occur earlier.

There is no error in the terminal.

In 2.91, every time the timeline passes over the sequence, 0.5 percentage points of RAM are consumed and once the RAM is at 99.2%, the whole system locks up (since I have no swap).
From 2.92 onward, RAM consumption stops at 43% and does not increase further even if scrubbing continues, but still: blender locks up after up to 5 mins of scrubbing.

Exact steps for others to reproduce the error
Open blender with VSE layout,
load an image sequence (HD, openexr),
apply a speed control effect strip (0.85x speed),
add a transparent png and extend it to the length of the image sequence
scrub the timeline until blender locks up

**System Information** Operating system: Linux-5.11.6-1-MANJARO-x86_64-with-glibc2.33 64 Bits Graphics card: AMD VERDE (DRM 2.50.0, 5.11.6-1-MANJARO, LLVM 11.1.0) AMD 4.5 (Core Profile) Mesa 20.3.4 **Blender Version** Broken: version: 2.91 - 2.93.0 Alpha, branch: master, commit date: 2021-03-31 13:01, hash: `23c1e48e19` Worked: ? **Short description of error** After scrubbing the timeline in the VSE (image sequence + speed control + image) for some time, blender locks up and has to be terminated from the process table. Sometimes it takes several minutes until it locks up. It is unclear if the speed control and image are necessary for the bug to occur or if they just make it occur earlier. There is no error in the terminal. In 2.91, every time the timeline passes over the sequence, 0.5 percentage points of RAM are consumed and once the RAM is at 99.2%, the whole system locks up (since I have no swap). From 2.92 onward, RAM consumption stops at 43% and does not increase further even if scrubbing continues, but still: blender locks up after up to 5 mins of scrubbing. **Exact steps for others to reproduce the error** Open blender with VSE layout, load an image sequence (HD, openexr), apply a speed control effect strip (0.85x speed), add a transparent png and extend it to the length of the image sequence scrub the timeline until blender locks up
Author

Added subscriber: @georgK

Added subscriber: @georgK

Added subscriber: @mano-wii

Added subscriber: @mano-wii

I cannot reproduce the problem.
I used this file:
vse_seq.blend
Does it need to be an HD and openexr sequence?

I cannot reproduce the problem. I used this file: [vse_seq.blend](https://archive.blender.org/developer/F9917245/vse_seq.blend) Does it need to be an HD and openexr sequence?
Author

After replacing the missing images files, I also could not reproduce the issue with this blend.
My impression is that it is very difficult or impossible to reproduce with simple setups. It might be necessary to use a more real project like in my case 2500 rgba frames in 1920x1080 at 29.97 fps and even then it gets quite tedious, but sometimes the lock-up happened after just one minute.

edit:
It also locked-up using a jpg sequence and without the alpha png on top. It did not lock-up with the sequence only without effect strip, but did not lock-up after adding the speed control again - that's odd.

After replacing the missing images files, I also could not reproduce the issue with this blend. My impression is that it is very difficult or impossible to reproduce with simple setups. It might be necessary to use a more real project like in my case 2500 rgba frames in 1920x1080 at 29.97 fps and even then it gets quite tedious, but sometimes the lock-up happened after just one minute. edit: It also locked-up using a jpg sequence and without the alpha png on top. It did not lock-up with the sequence only without effect strip, but did not lock-up after adding the speed control again - that's odd.

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

Would it be possible to check if this didn't happen in an earlier version of blender?
With the information given, I fear this can't be triaged as a complete bug report.
For the development team to be able to help, there needs to be either reproducible steps (start blender, press this, then that ...) or at least a known regression (Blender version X worked, but not version Y).

Would it be possible to check if this didn't happen in an earlier version of blender? With the information given, I fear this can't be triaged as a complete bug report. For the development team to be able to help, there needs to be either reproducible steps (start blender, press this, then that ...) or at least a known regression (Blender version X worked, but not version Y).
Author

Have you tried it with a larger project?

Since I am still not sure what is triggering the issue and if continuing to scrub after 10 minutes would trigger it, it is quite difficult and not possible to rule out the issue in a specific version. I could not reproduce it in 2.83.8 in 8 minutes, but perhaps it would have taken 12 minutes, I don't know.

Would using a debug build generate useful output?

Have you tried it with a larger project? Since I am still not sure what is triggering the issue and if continuing to scrub after 10 minutes would trigger it, it is quite difficult and not possible to rule out the issue in a specific version. I could not reproduce it in 2.83.8 in 8 minutes, but perhaps it would have taken 12 minutes, I don't know. Would using a debug build generate useful output?

Realistically, without a reliable way to reproduce the problem, there is not much what developers can do.

You can try the latest daily build and run blender_debug_log.cmd that is included in the download.
After Blender closes, the logs will be in a text file which can be attached here.
Most likely it will contain more information about the error.

Realistically, without a reliable way to reproduce the problem, there is not much what developers can do. You can try the [latest daily build ](https://builder.blender.org/download/) and run `blender_debug_log.cmd` that is included in the download. After Blender closes, the logs will be in a text file which can be attached here. Most likely it will contain more information about the error.
Author

Sorry, I downloaded https://builder.blender.org/download/blender-2.93.0-d91fec1a85d9-linux64.tar.xz but there is no blender_debug_log.cmd included.

Sorry, I downloaded https://builder.blender.org/download/blender-2.93.0-d91fec1a85d9-linux64.tar.xz but there is no blender_debug_log.cmd included.
Author

With my project, I can reproduce the issue quite reliably in 5 minutes, but sometimes it does not work.
I compiled a debug build and tried it in the terminal: no output on lock-up, so I ran the debug build from QTCreator and as Blender locked up, I clicked Interrupt GDB and copied the stack trace:

1  ghash_bucket_index            BLI_ghash.c       165  0x94a119f 
2  BLI_ghash_remove              BLI_ghash.c       906  0x94a119f 
3  seq_cache_recycle_linked      image_cache.c     980  0x41d1d4c 
4  seq_cache_recycle_item        image_cache.c     1064 0x41d1fc6 
5  seq_cache_put_if_possible     image_cache.c     1396 0x41d2e30 
6  SEQ_render_give_ibuf          render.c          2012 0x41e0780 
7  sequencer_ibuf_get            sequencer_draw.c  1334 0x472318b 
8  sequencer_draw_preview        sequencer_draw.c  1878 0x472464b 
9  sequencer_preview_region_draw space_sequencer.c 716  0x47387f1 
10 ED_region_do_draw             area.c            558  0x41937ea 
11 wm_draw_window_offscreen      wm_draw.c         724  0x3731a69 
12 wm_draw_window                wm_draw.c         864  0x3732016 
13 wm_draw_update                wm_draw.c         1065 0x373264e 
14 WM_main                       wm.c              652  0x372ec29 
15 main                          creator.c         520  0x30fd661 

on the second try/lockup, this was the trace:

1  seq_hash_render_data          image_cache.c     735  0x41d161a 
2  seq_cache_hashhash            image_cache.c     743  0x41d1649 
3  ghash_keyhash                 BLI_ghash.c       148  0x94a117d 
4  BLI_ghash_remove              BLI_ghash.c       905  0x94a117d 
5  seq_cache_recycle_linked      image_cache.c     980  0x41d1d4c 
6  seq_cache_recycle_item        image_cache.c     1064 0x41d1fc6 
7  seq_cache_put_if_possible     image_cache.c     1396 0x41d2e30 
8  SEQ_render_give_ibuf          render.c          2012 0x41e0780 
9  sequencer_ibuf_get            sequencer_draw.c  1334 0x472318b 
10 sequencer_draw_preview        sequencer_draw.c  1878 0x472464b 
11 sequencer_preview_region_draw space_sequencer.c 716  0x47387f1 
12 ED_region_do_draw             area.c            558  0x41937ea 
13 wm_draw_window_offscreen      wm_draw.c         724  0x3731a69 
14 wm_draw_window                wm_draw.c         864  0x3732016 
15 wm_draw_update                wm_draw.c         1065 0x373264e 
16 WM_main                       wm.c              652  0x372ec29 
17 main                          creator.c         520  0x30fd661 

Hope this helps.

With my project, I can reproduce the issue quite reliably in 5 minutes, but sometimes it does not work. I compiled a debug build and tried it in the terminal: no output on lock-up, so I ran the debug build from QTCreator and as Blender locked up, I clicked Interrupt GDB and copied the stack trace: ``` 1 ghash_bucket_index BLI_ghash.c 165 0x94a119f 2 BLI_ghash_remove BLI_ghash.c 906 0x94a119f 3 seq_cache_recycle_linked image_cache.c 980 0x41d1d4c 4 seq_cache_recycle_item image_cache.c 1064 0x41d1fc6 5 seq_cache_put_if_possible image_cache.c 1396 0x41d2e30 6 SEQ_render_give_ibuf render.c 2012 0x41e0780 7 sequencer_ibuf_get sequencer_draw.c 1334 0x472318b 8 sequencer_draw_preview sequencer_draw.c 1878 0x472464b 9 sequencer_preview_region_draw space_sequencer.c 716 0x47387f1 10 ED_region_do_draw area.c 558 0x41937ea 11 wm_draw_window_offscreen wm_draw.c 724 0x3731a69 12 wm_draw_window wm_draw.c 864 0x3732016 13 wm_draw_update wm_draw.c 1065 0x373264e 14 WM_main wm.c 652 0x372ec29 15 main creator.c 520 0x30fd661 ``` on the second try/lockup, this was the trace: ``` 1 seq_hash_render_data image_cache.c 735 0x41d161a 2 seq_cache_hashhash image_cache.c 743 0x41d1649 3 ghash_keyhash BLI_ghash.c 148 0x94a117d 4 BLI_ghash_remove BLI_ghash.c 905 0x94a117d 5 seq_cache_recycle_linked image_cache.c 980 0x41d1d4c 6 seq_cache_recycle_item image_cache.c 1064 0x41d1fc6 7 seq_cache_put_if_possible image_cache.c 1396 0x41d2e30 8 SEQ_render_give_ibuf render.c 2012 0x41e0780 9 sequencer_ibuf_get sequencer_draw.c 1334 0x472318b 10 sequencer_draw_preview sequencer_draw.c 1878 0x472464b 11 sequencer_preview_region_draw space_sequencer.c 716 0x47387f1 12 ED_region_do_draw area.c 558 0x41937ea 13 wm_draw_window_offscreen wm_draw.c 724 0x3731a69 14 wm_draw_window wm_draw.c 864 0x3732016 15 wm_draw_update wm_draw.c 1065 0x373264e 16 WM_main wm.c 652 0x372ec29 17 main creator.c 520 0x30fd661 ``` Hope this helps.

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Developer To Reproduce' to: 'Needs User Info'

Changed status from 'Needs Developer To Reproduce' to: 'Needs User Info'

@georgK I am trying to cause this bug, but no luck so far.

In order to aid with reproducibility, can you create .blend with least strips that are needed, but that chance to reproduce is maximized? Make it as long as you need with as many images as you need. Then my plan is to get one image, copy it into n-images depending on length, re-check that chance to cause this bugs are about same.

Finally upload this .blend file with ideally 1 image that you used so I can repeat this process and you don't have to upload GB of data?

@georgK I am trying to cause this bug, but no luck so far. In order to aid with reproducibility, can you create .blend with least strips that are needed, but that chance to reproduce is maximized? Make it as long as you need with as many images as you need. Then my plan is to get one image, copy it into n-images depending on length, re-check that chance to cause this bugs are about same. Finally upload this .blend file with ideally 1 image that you used so I can repeat this process and you don't have to upload GB of data?
Author

It did not lock up if I used one frame stretched to the whole duration, it seems to be necessary to use a real image sequence.
Since VSE can't pack images, you could try any image sequence you have on your harddisk (please don't delete & create but edit the path in the sequences, just to be sure). If you don't have one, you could use ffmpeg to convert e.g. a blender movie to single frames

ffmpeg -i input.mp4 -t 01:44 -vf fps=25 out%04d.jpg

In the attached blend file, I added more strips in the hope to make it lock up faster, so you would not have to keep trying more than 6 minutes (but that may be hardware dependent).
Please grab the timeline, scrub left and right and randomly all across the screen for at least 5 minutes until it locks up (keep LMB pressed for the whole duration).
ScrubbingLockUp.blend

It did not lock up if I used one frame stretched to the whole duration, it seems to be necessary to use a real image sequence. Since VSE can't pack images, you could try any image sequence you have on your harddisk (please don't delete & create but edit the path in the sequences, just to be sure). If you don't have one, you could use ffmpeg to convert e.g. a blender movie to single frames ``` ffmpeg -i input.mp4 -t 01:44 -vf fps=25 out%04d.jpg ``` In the attached blend file, I added more strips in the hope to make it lock up faster, so you would not have to keep trying more than 6 minutes (but that may be hardware dependent). Please grab the timeline, scrub left and right and randomly all across the screen for at least 5 minutes until it locks up (keep LMB pressed for the whole duration). [ScrubbingLockUp.blend](https://archive.blender.org/developer/F9922158/ScrubbingLockUp.blend)

In #87090#1141873, @georgK wrote:
It did not lock up if I used one frame stretched to the whole duration, it seems to be necessary to use a real image sequence.

What I meant is that I would take 1 image provided and copy it on disk to whatever number of files that is necessary.

I will try to reproduce with data you provided now and see whether I will be able to reproduce the issue.

> In #87090#1141873, @georgK wrote: > It did not lock up if I used one frame stretched to the whole duration, it seems to be necessary to use a real image sequence. What I meant is that I would take 1 image provided and copy it on disk to whatever number of files that is necessary. I will try to reproduce with data you provided now and see whether I will be able to reproduce the issue.

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'

Can confirm this - speed effect caused , that some raw frames are re-used for multiple final frames. When cached final frame is freed due to memory being full, it tried to free also lower level cached frames that were used during compositing. Some lower level cached frames were already freed by different final frame and BLI_ghash_remove() failed.

Can confirm this - speed effect caused , that some raw frames are re-used for multiple final frames. When cached final frame is freed due to memory being full, it tried to free also lower level cached frames that were used during compositing. Some lower level cached frames were already freed by different final frame and `BLI_ghash_remove()` failed.
Richard Antalik was assigned by Dalai Felinto 2021-04-08 17:40:29 +02:00

This issue was referenced by 0ba0d27d36

This issue was referenced by 0ba0d27d368422b29db42c09f0ef658ce5b1e604

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' 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
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#87090
No description provided.