VSE : Mangled proxy directory for scene/meta strips
Closed, ResolvedPublic

Description

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

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.

Details

Type
Bug

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

Yes, this definitely looks like the same bug

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

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.

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.

@Guillaume Matheron (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.

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

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

rB6535f668b4733e354db7073c4edc82e6e820a678

So, @Campbell Barton (campbellbarton) does this invalidate my bug report? T53792
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?