Page MenuHome

Crash after "Reassigning Inputs" to newly created Effect Clip
Confirmed, NormalPublic

Description

System Information
Operating system: Win10
Graphics card: GTX2060

Blender Version
Broken: 2.90, 0330d1af29c0, master, 2020-08-31

Short description of error
Crash after creating color strip in Sequence editor and pressing R

Exact steps for others to reproduce the error

  1. Start Blender
  2. Open Video Sequencer
  3. Add -> Color
  4. Effect Strip -> Reassign Inputs

-> Crash

This is probably a double of https://developer.blender.org/T8263

Event Timeline

Thomas Mann (pixtur) updated the task description. (Show Details)
Robert Guetzkow (rjg) changed the task status from Needs Triage to Confirmed.Sat, Sep 12, 1:45 AM

The issues is in sequencer_reassign_inputs_exec, error_msg is NULL when the following if-case is true:

if (!seq_effect_find_selected(
        scene, last_seq, last_seq->type, &seq1, &seq2, &seq3, &error_msg) ||
    BKE_sequence_effect_get_num_inputs(last_seq->type) == 0) {
  BKE_report(op->reports, RPT_ERROR, error_msg);
  return OPERATOR_CANCELLED;
}

Since BKE_report tries to determine the length of the message with strlen() this results in a crash.

BKE_report(ReportList * reports, ReportType type, const unsigned char * _message) Line 123	C
sequencer_reassign_inputs_exec(bContext * C, wmOperator * op) Line 2146	C
wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1313	C
wm_handler_operator_call(bContext * C, ListBase * handlers, wmEventHandler * handler_base, wmEvent * event, PointerRNA * properties, const unsigned char * kmi_idname) Line 2132	C
wm_handlers_do_keymap_with_keymap_handler(bContext * C, wmEvent * event, ListBase * handlers, wmEventHandler_Keymap * handler, wmKeyMap * keymap, const bool do_debug_handler) Line 2442	C
wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2739	C
wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 2866	C
wm_event_do_handlers(bContext * C) Line 3364	C
WM_main(bContext * C) Line 485	C
main(int argc, const unsigned char * * UNUSED_argv_c) Line 531	C

The solution is to only run BKE_report if the passed pointer to the error message isn't NULL. Either don't call BKE_report if error_msg is NULL or assign a descriptive message to it before calling BKE_report.