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

Closed
opened 5 years ago by mathers · 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.
Poster

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)
Poster

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
zeauro commented 5 years ago

Added subscriber: @zeauro

Added subscriber: @zeauro
zeauro commented 5 years ago

Removed subscriber: @zeauro

Removed subscriber: @zeauro
Owner

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Owner

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?
Poster

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.
Owner

@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.
Poster

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
Owner

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
ideasman42 closed this issue 5 years ago
ideasman42 self-assigned this 5 years ago
Owner

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?
Poster

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.
iss commented 4 years ago
Collaborator

Added subscriber: @iss

Added subscriber: @iss
iss commented 4 years ago
Collaborator

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/Collada
Interest/Compositing
Interest/Core
Interest/Cycles
Interest/Dependency Graph
Interest/Development Management
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/Modeling
Interest/Modifiers
Interest/Motion Tracking
Interest/Nodes & Physics
Interest/Overrides
Interest/Performance
Interest/Performance
Interest/Physics
Interest/Pipeline, Assets & I/O
Interest/Platforms, Builds, Tests & Devices
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
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/Asset Browser (Archived)
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Code Quest
legacy project/Datablocks and Libraries
legacy project/Eevee
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/GPU / Viewport
legacy project/GSoC
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Nodes
legacy project/OpenGL Error
legacy project/Papercut
legacy project/Pose Library Basics
legacy project/Retrospective
legacy project/Tracker Curfew
legacy project/Wintab High Frequency
Meta/Good First Issue
Meta/Papercut
migration/requires-manual-verification
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 & Devices
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 Information 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

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#54048
Loading…
There is no content yet.