VSE : Mangled proxy directory for scene/meta strips #54048

Closed
opened 2018-02-11 00:37:19 +01:00 by Guillaume M · 18 comments

System Information
Ubuntu 17.10
GeForce GT 545/PCIe/SSE2

Blender Version
Broken: built from git source (master a6968e87f1)

Short description of error
In the VSE, generating a proxy for a scene strip or a meta strip will create a directory with a random name (using an uninitialized variable)

The error is obvious when reading the source here :
source

if seq->type is not SEQ_TYPE_IMAGE, and the sequence is not a movie sequence, then fname is uninitialized and a random directory is used.

**System Information** Ubuntu 17.10 GeForce GT 545/PCIe/SSE2 **Blender Version** Broken: built from git source (master a6968e87f133) **Short description of error** In the VSE, generating a proxy for a scene strip or a meta strip will create a directory with a random name (using an uninitialized variable) The error is obvious when reading the source here : [source ](https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/sequencer.c;a6968e87f1338081f30725f8f2ca3460e280fea2$1679) if seq->type is not SEQ_TYPE_IMAGE, and the sequence is not a movie sequence, then fname is uninitialized and a random directory is used.
Author

Added subscriber: @mathers

Added subscriber: @mathers

Added subscriber: @ChristopherAnderssarian

Added subscriber: @ChristopherAnderssarian

Is this what's happening in my proxy crash report? #53792 F1838958

Is this what's happening in my proxy crash report? #53792 [F1838958](https://archive.blender.org/developer/F1838958/Capture.PNG)
Author

In #54048#484155, @ChristopherAnderssarian wrote:
Is this what's happening in my proxy crash report? #53792 F1838958

Yes, this definitely looks like the same bug

> In #54048#484155, @ChristopherAnderssarian wrote: > Is this what's happening in my proxy crash report? #53792 [F1838958](https://archive.blender.org/developer/F1838958/Capture.PNG) Yes, this definitely looks like the same bug

Added subscriber: @zeauro

Added subscriber: @zeauro

Removed subscriber: @zeauro

Removed subscriber: @zeauro

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Am not familiar with sequencer proxies, should scenes / meta's behave just like images?

Am not familiar with sequencer proxies, should scenes / meta's behave just like images?
Author

No, they should have a unique proxy path. I am not an expert, but for scene and meta clips, using seq->name seems to do the job.

I also solved a proxy confusion problem in the Movie Clip Editor : when generating proxies for several movie clips, they all end up in the same file, so Blender will re-use clip A's proxy even if clip B is selected. To fix this I changed imbuf/intern/indexer.c to include the clip name in the proxy file.

I attached a patch, it seems to work fine but needs a bit of refining. proxy.patch

When I test it, I get a lot of "_movie" outputs in the console, even though I expected all of those to trigger the

if (sanim && sanim->anim) {

condition, and never reach

else if (seq->type == SEQ_TYPE_MOVIE) {

I'll try to investigate this further, but if someone knows what's going on, feel free to submit a more appropriate patch.

No, they should have a unique proxy path. I am not an expert, but for scene and meta clips, using seq->name seems to do the job. I also solved a proxy confusion problem in the Movie Clip Editor : when generating proxies for several movie clips, they all end up in the same file, so Blender will re-use clip A's proxy even if clip B is selected. To fix this I changed imbuf/intern/indexer.c to include the clip name in the proxy file. I attached a patch, it seems to work fine but needs a bit of refining. [proxy.patch](https://archive.blender.org/developer/F2271187/proxy.patch) When I test it, I get a lot of "_movie" outputs in the console, even though I expected all of those to trigger the ``` if (sanim && sanim->anim) { ``` condition, and never reach ``` else if (seq->type == SEQ_TYPE_MOVIE) { ``` I'll try to investigate this further, but if someone knows what's going on, feel free to submit a more appropriate patch.

@mathers, checked patch:

  • The name may contain : or slashes, See: BLI_filename_make_safe
  • Don't think its needed to add any suffix _sound, _sound_hd ... etc. If the name is used - thats already unique (assuming you don't call a:b another a\b - which will collide when making safe), think we can accept this isn't totally foolproof solution.
  • SEQ_TYPE_MOVIECLIP - could use the movieclip's filepath.
  • SEQ_TYPE_MOVIE - could also get the name from the movie filepath.
@mathers, checked patch: - The name may contain `:` or slashes, See: ` BLI_filename_make_safe` - Don't think its needed to add any suffix `_sound`, `_sound_hd` ... etc. If the name is used - thats already unique (assuming you don't call `a:b` another `a\b` - which will collide when making safe), think we can accept this isn't totally foolproof solution. - SEQ_TYPE_MOVIECLIP - could use the movieclip's filepath. - SEQ_TYPE_MOVIE - could also get the name from the movie filepath.
Author

But are we really calling this proxy function with sound strips ? Maybe we should show a warning if we reach this point ?

I don't understand why we reach this point with SEQ_TYPE_MOVIE... Shouldn't this be handled by this code ?

if (sanim && sanim->anim) {

For a SEQ_TYPE_MOVIE, anim->name is the full path. Should we keep the whole path (maybe we have different clips with the same filename but different path) ?

A solution to our unicity problem would be to add a hash of the original name to the proxy path, for instance :

a:b would be stored in a_b_53bc73
a\b would be stored in a_b_874f8e

But are we really calling this proxy function with sound strips ? Maybe we should show a warning if we reach this point ? I don't understand why we reach this point with SEQ_TYPE_MOVIE... Shouldn't this be handled by this code ? ``` if (sanim && sanim->anim) { ``` For a SEQ_TYPE_MOVIE, anim->name is the full path. Should we keep the whole path (maybe we have different clips with the same filename but different path) ? A solution to our unicity problem would be to add a hash of the original name to the proxy path, for instance : a:b would be stored in a_b_53bc73 a\b would be stored in a_b_874f8e

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Campbell Barton self-assigned this 2018-02-21 08:34:05 +01:00

Looked into this and for now building proxies doesn't support anything besides movie, so disabling support for this.

6535f668b4

Looked into this and for now building proxies doesn't support anything besides movie, so disabling support for this. 6535f668b4

So, @ideasman42 does this invalidate my bug report? #53792
Also, is it a good idea to disable this considering the Proxy/Timecode Panel option still there (or are you still working on this)?

With no information or feedback in the Blender Manual or when trying to create proxies (nothing happens), you are going to get users confused on a essential feature that worked (works fine in cycles for me (not the file names the crashing)) in 2.79 and now doesn't with no apparent reason why.

So, @ideasman42 does this invalidate my bug report? #53792 Also, is it a good idea to disable this considering the Proxy/Timecode Panel option still there (or are you still working on this)? With no information or feedback in the Blender Manual or when trying to create proxies (nothing happens), you are going to get users confused on a essential feature that worked (works fine in cycles for me (not the file names the crashing)) in 2.79 and now doesn't with no apparent reason why.

Why can't the scene name from the 'Scene Data-block' be used as the directory name? Is it not as simple as that?

Why can't the scene name from the 'Scene Data-block' be used as the directory name? Is it not as simple as that?
Author

I've been using my patch since Feb. without any issues, therefore I believe adding support for clip, sene and meta proxies is an easy task, although I'm not familiar enough with the Blender coding conventions to submit a commit myself.

In #54048#484532, @mathers wrote:
No, they should have a unique proxy path. I am not an expert, but for scene and meta clips, using seq->name seems to do the job.

I also solved a proxy confusion problem in the Movie Clip Editor : when generating proxies for several movie clips, they all end up in the same file, so Blender will re-use clip A's proxy even if clip B is selected. To fix this I changed imbuf/intern/indexer.c to include the clip name in the proxy file.

I attached a patch, it seems to work fine but needs a bit of refining. proxy.patch

When I test it, I get a lot of "_movie" outputs in the console, even though I expected all of those to trigger the

if (sanim && sanim->anim) {

condition, and never reach

else if (seq->type == SEQ_TYPE_MOVIE) {

I'll try to investigate this further, but if someone knows what's going on, feel free to submit a more appropriate patch.

I've been using my patch since Feb. without any issues, therefore I believe adding support for clip, sene and meta proxies is an easy task, although I'm not familiar enough with the Blender coding conventions to submit a commit myself. > In #54048#484532, @mathers wrote: > No, they should have a unique proxy path. I am not an expert, but for scene and meta clips, using seq->name seems to do the job. > > I also solved a proxy confusion problem in the Movie Clip Editor : when generating proxies for several movie clips, they all end up in the same file, so Blender will re-use clip A's proxy even if clip B is selected. To fix this I changed imbuf/intern/indexer.c to include the clip name in the proxy file. > > I attached a patch, it seems to work fine but needs a bit of refining. [proxy.patch](https://archive.blender.org/developer/F2271187/proxy.patch) > > When I test it, I get a lot of "_movie" outputs in the console, even though I expected all of those to trigger the > ``` > if (sanim && sanim->anim) { > ``` > condition, and never reach > ``` > else if (seq->type == SEQ_TYPE_MOVIE) { > ``` > I'll try to investigate this further, but if someone knows what's going on, feel free to submit a more appropriate patch.

Added subscriber: @iss

Added subscriber: @iss

In #54048#594118, @mathers wrote:
I've been using my patch since Feb. without any issues, therefore I believe adding support for clip, sene and meta proxies is an easy task, although I'm not familiar enough with the Blender coding conventions to submit a commit myself.

In #54048#484532, @mathers wrote:
No, they should have a unique proxy path. I am not an expert, but for scene and meta clips, using seq->name seems to do the job.

I also solved a proxy confusion problem in the Movie Clip Editor : when generating proxies for several movie clips, they all end up in the same file, so Blender will re-use clip A's proxy even if clip B is selected. To fix this I changed imbuf/intern/indexer.c to include the clip name in the proxy file.

I attached a patch, it seems to work fine but needs a bit of refining. proxy.patch

When I test it, I get a lot of "_movie" outputs in the console, even though I expected all of those to trigger the

if (sanim && sanim->anim) {

condition, and never reach

else if (seq->type == SEQ_TYPE_MOVIE) {

I'll try to investigate this further, but if someone knows what's going on, feel free to submit a more appropriate patch.

Hi, there are working patches, we are currently working on this issue.

> In #54048#594118, @mathers wrote: > I've been using my patch since Feb. without any issues, therefore I believe adding support for clip, sene and meta proxies is an easy task, although I'm not familiar enough with the Blender coding conventions to submit a commit myself. > >> In #54048#484532, @mathers wrote: >> No, they should have a unique proxy path. I am not an expert, but for scene and meta clips, using seq->name seems to do the job. >> >> I also solved a proxy confusion problem in the Movie Clip Editor : when generating proxies for several movie clips, they all end up in the same file, so Blender will re-use clip A's proxy even if clip B is selected. To fix this I changed imbuf/intern/indexer.c to include the clip name in the proxy file. >> >> I attached a patch, it seems to work fine but needs a bit of refining. [proxy.patch](https://archive.blender.org/developer/F2271187/proxy.patch) >> >> When I test it, I get a lot of "_movie" outputs in the console, even though I expected all of those to trigger the >> ``` >> if (sanim && sanim->anim) { >> ``` >> condition, and never reach >> ``` >> else if (seq->type == SEQ_TYPE_MOVIE) { >> ``` >> I'll try to investigate this further, but if someone knows what's going on, feel free to submit a more appropriate patch. Hi, there are working patches, we are currently working on _this_ issue.
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#54048
No description provided.