Blender crashes randomly when editing video #95688

Closed
opened 2022-02-10 22:48:56 +01:00 by Rainer · 20 comments

System Information
Operating system: Linux-5.16.8-arch1-1-x86_64-with-glibc2.33 64 Bits
Graphics card: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 510.47.03

Blender Version
Broken: version: 3.0.1, branch: makepkg (modified), commit date: 2022-01-25 17:19, hash: dc2d180181
Worked: Crashes randomly in all versions I tried

Short description of error
While editing videos I experience in average one crash every hour. The crashes happen quite randomly and cannot really be reproduced.
I have the feeling that the likelihood of a crash increases after I just added a new video strip (referring to a mp4 video file on my disk) and are especially high while blender is "Building Proxies".

Exact steps for others to reproduce the error
Cannot exactly reproduce the error.
Simply try to cut together a video from multiple external video files for some time and observe about one crash every hour.

Attached you can find the crash.txt and the .blend file (however I don't know how much help the .blend file is as is refers tu many gigabytes of external mp4 files)

keller_bohrung_2546_autosave.blend

keller_bohrung.crash.txt

**System Information** Operating system: Linux-5.16.8-arch1-1-x86_64-with-glibc2.33 64 Bits Graphics card: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 510.47.03 **Blender Version** Broken: version: 3.0.1, branch: makepkg (modified), commit date: 2022-01-25 17:19, hash: `dc2d180181` Worked: Crashes randomly in all versions I tried **Short description of error** While editing videos I experience in average one crash every hour. The crashes happen quite randomly and cannot really be reproduced. I have the feeling that the likelihood of a crash increases after I just added a new video strip (referring to a mp4 video file on my disk) and are especially high while blender is "Building Proxies". **Exact steps for others to reproduce the error** Cannot exactly reproduce the error. Simply try to cut together a video from multiple external video files for some time and observe about one crash every hour. Attached you can find the crash.txt and the .blend file (however I don't know how much help the .blend file is as is refers tu many gigabytes of external mp4 files) [keller_bohrung_2546_autosave.blend](https://archive.blender.org/developer/F12861111/keller_bohrung_2546_autosave.blend) [keller_bohrung.crash.txt](https://archive.blender.org/developer/F12861110/keller_bohrung.crash.txt)
Author

Added subscriber: @Rainer

Added subscriber: @Rainer
Author

Just hit another crash.
Had just added another video strip (drag and drop a file), then enabled "Display waveform" on the audio track and then immediately started cutting the fresh strip (While proxies were still building)

keller_bohrung_6623_autosave.blend

keller_bohrung.crash.txt

Just hit another crash. Had just added another video strip (drag and drop a file), then enabled "Display waveform" on the audio track and then immediately started cutting the fresh strip (While proxies were still building) [keller_bohrung_6623_autosave.blend](https://archive.blender.org/developer/F12861124/keller_bohrung_6623_autosave.blend) [keller_bohrung.crash.txt](https://archive.blender.org/developer/F12861123/keller_bohrung.crash.txt)
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

I can't reproduce on either 3.0 or master. But the stack trace indeed indicates that the crash happens after it finish building the proxies.

I can't reproduce on either 3.0 or master. But the stack trace indeed indicates that the crash happens after it finish building the proxies.

Added subscribers: @iss, @mano-wii

Added subscribers: @iss, @mano-wii

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

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

The crash is random and may depend on the hardware.
I don't see much option to investigate other than relying on backtrace:

# backtrace
blender(BLI_system_backtrace+0x38) [0x558da7de49d8]
blender(+0xec8e06) [0x558da702de06]
/usr/lib/libc.so.6(+0x3cda0) [0x7f66ccb2bda0]
blender(SEQ_proxy_rebuild_finish+0x50) [0x558da76e0940]
blender(+0x157b9f5) [0x558da76e09f5]
blender(wm_jobs_timer+0xd2) [0x558da7218e62]
blender(wm_window_process_events+0x2e2) [0x558da723a8d2]
blender(WM_main+0x19) [0x558da71f7139]
blender(main+0x372) [0x558da6ff1222]
/usr/lib/libc.so.6(__libc_start_main+0xd5) [0x7f66ccb16b25]
blender(_start+0x2e) [0x558da7020b0e]

@iss, any idea what might be going on?

The crash is random and may depend on the hardware. I don't see much option to investigate other than relying on backtrace: ``` # backtrace blender(BLI_system_backtrace+0x38) [0x558da7de49d8] blender(+0xec8e06) [0x558da702de06] /usr/lib/libc.so.6(+0x3cda0) [0x7f66ccb2bda0] blender(SEQ_proxy_rebuild_finish+0x50) [0x558da76e0940] blender(+0x157b9f5) [0x558da76e09f5] blender(wm_jobs_timer+0xd2) [0x558da7218e62] blender(wm_window_process_events+0x2e2) [0x558da723a8d2] blender(WM_main+0x19) [0x558da71f7139] blender(main+0x372) [0x558da6ff1222] /usr/lib/libc.so.6(__libc_start_main+0xd5) [0x7f66ccb16b25] blender(_start+0x2e) [0x558da7020b0e] ``` @iss, any idea what might be going on?

Will check this, Could be use after free as SEQ_proxy_rebuild_finish may need to access original data. I thought that d7f0de0e3a, could be related, but 3.0.1 is more recent.

Will check this, Could be use after free as `SEQ_proxy_rebuild_finish` may need to access original data. I thought that d7f0de0e3a, could be related, but 3.0.1 is more recent.

I checked this quickly and wasn't able to reproduce crash. @Rainer just to clarify, are you using automatic proxy building? See preferences > System > Video Sequencer

I checked this quickly and wasn't able to reproduce crash. @Rainer just to clarify, are you using automatic proxy building? See preferences > System > Video Sequencer
Author

Hi @iss Yes Problem is not easy to reproduce. Correct I use automatic proxy building.
I have the feeling that I sometimes experience crashes also when no proxies are building. Will be cutting another video end of the Week, when crashes happen again, I will upload the crash.txt here. Maybe you can get additional info from multiple reports, to see if callstack is similar / same.

Thanks for looking into this :-) I know problems like this are hard to debug...

Hi @iss Yes Problem is not easy to reproduce. Correct I use automatic proxy building. I have the feeling that I sometimes experience crashes also when no proxies are building. Will be cutting another video end of the Week, when crashes happen again, I will upload the crash.txt here. Maybe you can get additional info from multiple reports, to see if callstack is similar / same. Thanks for looking into this :-) I know problems like this are hard to debug...
Author

OK, I did some more video editing the last days. I noticed the following:

The crash can be reproduced with a high likelyhood:

  • Drag/Drop a large video file into the Sequencer (>1Gbyte H.264 MPEG-4 file).
  • Then Proxy-Building starts automatically.
  • Now wait until Proxy is almost complete (95...100%) Not sure when exactly.
  • Then in the freshly added clip do a cut while Proxy is still building (Select Video and Audio, Place cursor somewhere and press K).
  • Observe nice crash

Also see this on different machines (also Arch-Linux but completely different HW (AMD GPU, Ryzen CPU vs Nvidia GPU, Intel CPU))

I disabled automatic proxy building and did not observe any crash until now (not building any proxies).

OK, I did some more video editing the last days. I noticed the following: The crash can be reproduced with a high likelyhood: - Drag/Drop a large video file into the Sequencer (>1Gbyte H.264 MPEG-4 file). - Then Proxy-Building starts automatically. - Now wait until Proxy is almost complete (95...100%) Not sure when exactly. - Then in the freshly added clip do a cut while Proxy is still building (Select Video and Audio, Place cursor somewhere and press K). - Observe nice crash Also see this on different machines (also Arch-Linux but completely different HW (AMD GPU, Ryzen CPU vs Nvidia GPU, Intel CPU)) I disabled automatic proxy building and did not observe any crash until now (not building any proxies).

I wasn't able to reproduce this even with clarified steps.

I can see how crash could be caused if you would split strips at exact moment when proxy building finishes, but this would be quite difficult to reproduce. Also if this would be actual issue it would be nearly impossible to fix

I have created test build to check this.
First please download latest alpha build from https://builder.blender.org/download/daily/ and check if you can reproduce. It may be, that proxies won't build, because now process is optimized to only build proxies for "slow" files. If this happens, please try starting proxy building manually.
If you was able to reproduce crash in latest alpha, download build D14209 from https://builder.blender.org/download/patch/ and try to reproduce again. I have "protected" splitting to not crash. Please do not try to delete strips only split, same with alpha, otherwise I can't be sure whether I located the problem correctly. crash logs for both tests would be appreciated.

Note for me mainly: In meanwhile I will investigate whether accessing seqbase from thread is necessary. Locking with mutex is not really great fix as there are many functions modifying it and it is DNA member so it can be accessed pretty much from everywhere in codebase.

I wasn't able to reproduce this even with clarified steps. I can see how crash could be caused if you would split strips at exact moment when proxy building finishes, but this would be quite difficult to reproduce. Also if this would be actual issue it would be nearly impossible to fix I have created test build to check this. First please download latest alpha build from https://builder.blender.org/download/daily/ and check if you can reproduce. It may be, that proxies won't build, because now process is optimized to only build proxies for "slow" files. If this happens, please try starting proxy building manually. If you was able to reproduce crash in latest alpha, download build [D14209](https://archive.blender.org/developer/D14209) from https://builder.blender.org/download/patch/ and try to reproduce again. I have "protected" splitting to not crash. Please do not try to delete strips only split, same with alpha, otherwise I can't be sure whether I located the problem correctly. crash logs for both tests would be appreciated. Note for me mainly: In meanwhile I will investigate whether accessing seqbase from thread is necessary. Locking with mutex is not really great fix as there are many functions modifying it and it is DNA member so it can be accessed pretty much from everywhere in codebase.

I have created another build, D14210. This should be technically complete fix with no ifs and buts, so please check mainly this one and latest alpha as I described above.

I have created another build, [D14210](https://archive.blender.org/developer/D14210). This should be technically complete fix with no ifs and buts, so please check mainly this one and latest alpha as I described above.
Author

Hi Richard,
Thank you for looking into this.
I just tried to reproduce again and finally have a refined process of reproducing the problem in ALL attempts (still using stock Arch linux provided blender v3.0.1):

  • Open Blender and do File->New->Video Editing
  • Drag/Drop video file into Sequencer for which no proxies are built yet (Size does not really matter, but not too small, so that proxy building can be observed (50...150Mbyte h264 is good for me))
  • Carefully observe Proxy building progress
  • Now while proxy is still building, move FrameMarker/Cursor to a place in the clip and press K to cut both audio and video
  • Now still while proxy is building select the LEFT part of the cut (audio + video with left-click-drag box select) and press "del" key to delete. It won't reproduce when deleting the "right" part of the video
  • Now wait for proxy building to complete to 100%
  • Observe when Proxy building hits 100%, Blender fill freeze up and crash

Tried this about 5 times on both my PCs and hit the bug in all 5 times.
Was not able to reproduce without deleting the clip.
Could you try this procedure again and tell me if you succeeded to reproduce? If not, I can try with your builds.

Hi Richard, Thank you for looking into this. I just tried to reproduce again and finally have a refined process of reproducing the problem in ALL attempts (still using stock Arch linux provided blender v3.0.1): - Open Blender and do File->New->Video Editing - Drag/Drop video file into Sequencer for which no proxies are built yet (Size does not really matter, but not too small, so that proxy building can be observed (50...150Mbyte h264 is good for me)) - Carefully observe Proxy building progress - Now while proxy is still building, move FrameMarker/Cursor to a place in the clip and press K to cut both audio and video - Now still while proxy is building select the LEFT part of the cut (audio + video with left-click-drag box select) and press "del" key to delete. It won't reproduce when deleting the "right" part of the video - Now wait for proxy building to complete to 100% - Observe when Proxy building hits 100%, Blender fill freeze up and crash Tried this about 5 times on both my PCs and hit the bug in all 5 times. Was not able to reproduce without deleting the clip. Could you try this procedure again and tell me if you succeeded to reproduce? If not, I can try with your builds.

I am not able to reproduce this with 3.0.1

I am not able to reproduce this with 3.0.1
Author

Ok, I tried again and performed more repros:

On blender-3.0.1-stable+v30.dc2d18018171-linux.x86_64-release I can reproduce it 100% (9 of 9 attempts):
I found a small video file and attached it here with which I reproduced the problem and also the corresponding crash file:
blender-3.0.1-stable+v30.dc2d18018171-linux.x86_64-release_blender.crash3.txt
DJI_0804_decke_sagen.MP4

I also tried
blender-3.1.0-beta+v31.4ee4b61dd8d3-linux.x86_64-release
and
blender-3.2.0-alpha+master.63891f9dad93-linux.x86_64-release

I cannot reproduce the problem in either of those (5 attempts each).

Either the problem was fixed or moved/hidden by other changes.

Ok, I tried again and performed more repros: On blender-3.0.1-stable+v30.dc2d18018171-linux.x86_64-release I can reproduce it 100% (9 of 9 attempts): I found a small video file and attached it here with which I reproduced the problem and also the corresponding crash file: [blender-3.0.1-stable+v30.dc2d18018171-linux.x86_64-release_blender.crash3.txt](https://archive.blender.org/developer/F12891563/blender-3.0.1-stable_v30.dc2d18018171-linux.x86_64-release_blender.crash3.txt) [DJI_0804_decke_sagen.MP4](https://archive.blender.org/developer/F12891555/DJI_0804_decke_sagen.MP4) I also tried blender-3.1.0-beta+v31.4ee4b61dd8d3-linux.x86_64-release and blender-3.2.0-alpha+master.63891f9dad93-linux.x86_64-release I cannot reproduce the problem in either of those (5 attempts each). Either the problem was fixed or moved/hidden by other changes.

Thanks for checking, I think that d7f0de0e3a then fixed the issue. Not quite sure why this commit is not in 3.0 branch.

Thanks for checking, I think that d7f0de0e3a then fixed the issue. Not quite sure why this commit is not in 3.0 branch.

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

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

Sorry, was meant to close this report since you can't reproduce with later versions. But what is also strange is, that I have checked 3.0.1 with your file and was able to reproduce crash, then repeated same steps with file I tested before and also was able to reproduce.

In any case since 3.1 and 3.2 is fixed, will close this report.

Sorry, was meant to close this report since you can't reproduce with later versions. But what is also strange is, that I have checked 3.0.1 with your file and was able to reproduce crash, then repeated same steps with file I tested before and also was able to reproduce. In any case since 3.1 and 3.2 is fixed, will close this report.

This issue was referenced by 4491c62260

This issue was referenced by 4491c6226051799f4415ba50abbc4861e09af862
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#95688
No description provided.