Page MenuHome

Segmentation fault when setting `D.scenes[0].sequence_editor.proxy_storage` with a second scene selected having no sequence editor
Closed, ResolvedPublic


System Information
Operating system: Windows 10
Graphics card: GTX 1060

Blender Version
Broken: 2.83.1, 2.83.2, 2.90

Short description of error

When I create a new scene and try to set the proxy_storage property of the first scene in the console (or a script/addon) with:

D.scenes[0].sequence_editor.proxy_storage = "PER_STRIP"

I get a Segmentation fault. I tried running with "--debug-all" option but no more clue from it (and I did not have time to investigate further with a debug build of blender).

Exact steps for others to reproduce the error

  • Start Blender (I tested on clean blenders, with default config)
  • Create a new scene in the GUI (it will be created and selected in the top bar)
  • Input D.scenes[0].sequence_editor.proxy_storage = "PER_STRIP" in a Python console area and press enter
  • Segfault

Now, if you select the first scene before running the line of code, no more crash. If you select again the second scene and enter the line of code, crash.

If you managed to have a sequence_editor created for the second scene (I did it by adding a Text effect strip inside, it seems to trigger the creation of the sequence_editor), then the line of code works and produces no more crash. (but then if you create a third scene and reproduce, then you got a crash again).

Event Timeline

It also happen for the proxy_dir property.

Robert Guetzkow (rjg) changed the task status from Needs Triage to Confirmed.Jul 16 2020, 8:42 PM
Robert Guetzkow (rjg) triaged this task as High priority.

In rna_SequenceEditor_update_cache the scene->ed is NULL, but is dereferenced when calling BKE_sequencer_free_imbuf(scene, &ed->seqbase, false);

BKE_sequencer_free_imbuf(Scene * scene, ListBase * seqbase, bool for_render) Line 4307	C
rna_SequenceEditor_update_cache(Main * UNUSED_bmain, Scene * scene, PointerRNA * UNUSED_ptr) Line 205	C
rna_property_update(bContext * C, Main * bmain, Scene * scene, PointerRNA * ptr, PropertyRNA * prop) Line 2286	C
RNA_property_update(bContext * C, PointerRNA * ptr, PropertyRNA * prop) Line 2346	C
pyrna_py_to_prop(PointerRNA * ptr, PropertyRNA * prop, void * data, _object * value, const unsigned char * error_prefix) Line 2211	C
pyrna_struct_setattro(BPy_StructRNA * self, _object * pyname, _object * value) Line 4524	C