Regression: Crash on changing view type with adjustment layer strips #97356

Closed
opened 2022-04-15 14:44:09 +02:00 by a · 18 comments

System Information
Operating system: Windows 8.1
Graphics card: NVIDIA GeForce GT 750M (5+years old)

Blender Version
Broken: 3.2.0 Alpha, master branch from git
Worked: 3.2.0 Alpha from 2 weeks ago (so a recent regression). 3.1.0 release and older.
Caused by 277fa2f441

Short description of error

Simple operations in VSE like adding a strip and then changing the View Type will cause a crash. Reported to be an access violation. This has been happening on the Alpha build for the past couple of weeks.

Exact steps for others to reproduce the error

  • Default startup
  • Change Editor Type to 'Video Sequencer'
  • Change View Type to 'Sequencer'
  • Add adjustment layer
  • Add second adjustment layer
  • Change View Type to Preview
  • Crash
**System Information** Operating system: Windows 8.1 Graphics card: NVIDIA GeForce GT 750M (5+years old) **Blender Version** Broken: 3.2.0 Alpha, master branch from git Worked: 3.2.0 Alpha from 2 weeks ago (so a recent regression). 3.1.0 release and older. Caused by 277fa2f441 **Short description of error** Simple operations in VSE like adding a strip and then changing the View Type will cause a crash. Reported to be an access violation. This has been happening on the Alpha build for the past couple of weeks. **Exact steps for others to reproduce the error** - Default startup - Change Editor Type to 'Video Sequencer' - Change View Type to 'Sequencer' - Add adjustment layer - Add second adjustment layer - Change View Type to Preview - Crash
Author

Added subscriber: @blenderbug12345

Added subscriber: @blenderbug12345

#97507 was marked as duplicate of this issue

#97507 was marked as duplicate of this issue

#97455 was marked as duplicate of this issue

#97455 was marked as duplicate of this issue
Author
[system-info.txt](https://archive.blender.org/developer/F13002719/system-info.txt) [blender.crash.txt](https://archive.blender.org/developer/F13002721/blender.crash.txt)

Added subscriber: @ThomasDinges

Added subscriber: @ThomasDinges

Cannot reproduce the crash with 3.2.0 Alpha, branch: master, commit date: 2022-04-15 12:05, hash: 25196f8a36 on Windows.

Cannot reproduce the crash with 3.2.0 Alpha, branch: master, commit date: 2022-04-15 12:05, hash: `25196f8a36` on Windows.
Author

Downloaded archived builds from https://builder.blender.org/download/daily/archive/

apr.15 blender-3.2.0-alpha+master.48ff456a4bda-windows.amd64-release CRASH
apr.08 blender-3.2.0-alpha+master.87a3bf33564b-windows.amd64-release CRASH
apr.05 blender-3.2.0-alpha+master.1d86d617823b-windows.amd64-release CRASH
apr.04 blender-3.2.0-alpha+master.b5f3f8ef1d52-windows.amd64-release CRASH
apr.04 blender-3.2.0-alpha+master.637fe6f5ff9c-windows.amd64-release OK
apr.03 blender-3.2.0-alpha+master.79ff65d07bac-windows.amd64-release OK
apr.01 blender-3.2.0-alpha+master.42853bacc973-windows.amd64-release OK
mar.01 blender-3.2.0-alpha+master.eb0f8317e231-windows.amd64-release OK

blender-3.2.0-alpha+master.b5f3f8ef1d52-windows.amd64-release introduced the editable channel names in the VSE so perhaps that's what is upsetting blender on my platform?

What other triage can I do?

Downloaded archived builds from https://builder.blender.org/download/daily/archive/ apr.15 blender-3.2.0-alpha+master.48ff456a4bda-windows.amd64-release CRASH apr.08 blender-3.2.0-alpha+master.87a3bf33564b-windows.amd64-release CRASH apr.05 blender-3.2.0-alpha+master.1d86d617823b-windows.amd64-release CRASH apr.04 blender-3.2.0-alpha+master.b5f3f8ef1d52-windows.amd64-release CRASH apr.04 blender-3.2.0-alpha+master.637fe6f5ff9c-windows.amd64-release OK apr.03 blender-3.2.0-alpha+master.79ff65d07bac-windows.amd64-release OK apr.01 blender-3.2.0-alpha+master.42853bacc973-windows.amd64-release OK mar.01 blender-3.2.0-alpha+master.eb0f8317e231-windows.amd64-release OK blender-3.2.0-alpha+master.b5f3f8ef1d52-windows.amd64-release introduced the editable channel names in the VSE so perhaps that's what is upsetting blender on my platform? What other triage can I do?
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Thanks for testing on multiple builds.
I'm also unable to get the crash with your given steps (tested on last buildbot build and current master 7484f274dcdc9092dd5d85059e8d110572fe3b3c)

Thanks for testing on multiple builds. I'm also unable to get the crash with your given steps (tested on last buildbot build and current master `7484f274dcdc9092dd5d85059e8d110572fe3b3c`)
Author

Well it looks like something weird is going on with channels. I can make the problem go away by testing the 'channel' pointer before referencing a function on it. so: channel && SEQ_channel_is_muted(channel).

I don't know if this is the correct fix, maybe the list in 'channels' is wrong or seq->machine is the wrong index. Whatever, the SEQ_channel_get_by_index is returning false and then everything blows up.

bool SEQ_render_is_muted(const ListBase *channels, const Sequence *seq)
{

  SeqTimelineChannel *channel = SEQ_channel_get_by_index(channels, seq->machine);

  return seq->flag & SEQ_MUTE || ( channel && SEQ_channel_is_muted(channel) );
}
Well it looks like something weird is going on with channels. I can make the problem go away by testing the 'channel' pointer before referencing a function on it. so: channel && SEQ_channel_is_muted(channel). I don't know if this is the correct fix, maybe the list in 'channels' is wrong or seq->machine is the wrong index. Whatever, the SEQ_channel_get_by_index is returning false and then everything blows up. ``` bool SEQ_render_is_muted(const ListBase *channels, const Sequence *seq) { SeqTimelineChannel *channel = SEQ_channel_get_by_index(channels, seq->machine); return seq->flag & SEQ_MUTE || ( channel && SEQ_channel_is_muted(channel) ); } ```
Author

I updated the 'Exact steps' in the description.

I added some printfs and I see the crash when:
there are 2 Adjustment layers
the preview is displayed

With the crash inhibited (using the fix detailed above) I see channel=false just one-time per frame when the preview is displayed. I can move the cursor from frame 1 to frame 2 (say) and I see channel=false. If i move back to frame 1, or again to frame 2 then the channel=true. So this looks like something related to the way the VSE caches a rendered frame, and then doesn't re-render it if it's in the cache.

So when the preview is displayed, the code is called with channels=null, the FIRST time a frame is visited. Subsequent visits to an already cached frame seem to skip the logic.

I updated the 'Exact steps' in the description. I added some printfs and I see the crash when: there are 2 Adjustment layers the preview is displayed With the crash inhibited (using the fix detailed above) I see channel=false just one-time per frame when the preview is displayed. I can move the cursor from frame 1 to frame 2 (say) and I see channel=false. If i move back to frame 1, or again to frame 2 then the channel=true. So this looks like something related to the way the VSE caches a rendered frame, and then doesn't re-render it if it's in the cache. So when the preview is displayed, the code is called with channels=null, the FIRST time a frame is visited. Subsequent visits to an already cached frame seem to skip the logic.
Member

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

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

Added subscriber: @iss

Added subscriber: @iss
Member

Ok, thank you for the clarification (and looking in to the code side)
Crash is indeed introduced with recent feature of channel headers: 277fa2f441
@iss hi, can you check the proposed fix #97356#1341875

Ok, thank you for the clarification (and looking in to the code side) Crash is indeed introduced with recent feature of channel headers: 277fa2f441 @iss hi, can you check the proposed fix #97356#1341875
Pratik Borhade changed title from VSE EXCEPTION_ACCESS_VIOLATION when performing simple operations to Regression: Crash on changing view type with adjustment layer strips 2022-04-16 05:20:31 +02:00

Problem is in do_adjustment_impl() on line ListBase *channels = &seq->channels;. I have incorrectly assumed that this is for meta strips when I initialized this variable in quite a lot of functions.

Problem is in `do_adjustment_impl()` on line `ListBase *channels = &seq->channels;`. I have incorrectly assumed that this is for meta strips when I initialized this variable in quite a lot of functions.
Member

Added subscriber: @jaywalker

Added subscriber: @jaywalker

This issue was referenced by 3cef9ebaf8

This issue was referenced by 3cef9ebaf81053d80228f3ad43fa91e0ca75c542

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Richard Antalik self-assigned this 2022-04-21 02:01:49 +02:00
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#97356
No description provided.