Crash after "Reassigning Inputs" to newly created Effect Clip #80717

Closed
opened 2020-09-12 01:06:07 +02:00 by Thomas Mann · 12 comments

System Information
Operating system: Win10
Graphics card: GTX2060

Blender Version
Broken: 2.90, 0330d1af29, 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

**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
Author

Added subscriber: @pixtur

Added subscriber: @pixtur

Added subscriber: @rjg

Added subscriber: @rjg

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

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

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

Added subscribers: @iss, @Sergey

Added subscribers: @iss, @Sergey

@iss, i remember seeing patches from you which seemed to be related to this issue. Are they committed? Is it a separate issue from what you was fixing in patches?

@iss, i remember seeing patches from you which seemed to be related to this issue. Are they committed? Is it a separate issue from what you was fixing in patches?

The solution depends on what particular error message we want for the neglected case of !seq_effect_find_selected(scene, last_seq, last_seq->type, &seq1, &seq2, &seq3, &error_msg) being true.

The solution depends on what particular error message we want for the neglected case of `!seq_effect_find_selected(scene, last_seq, last_seq->type, &seq1, &seq2, &seq3, &error_msg)` being true.

In #80717#1043522, @Sergey wrote:
@iss, i remember seeing patches from you which seemed to be related to this issue. Are they committed? Is it a separate issue from what you was fixing in patches?

They are comitted, this looks like separate issue. I am checking this

> In #80717#1043522, @Sergey wrote: > @iss, i remember seeing patches from you which seemed to be related to this issue. Are they committed? Is it a separate issue from what you was fixing in patches? They are comitted, this looks like separate issue. I am checking this

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Richard Antalik self-assigned this 2020-10-28 13:47:03 +01:00

Looks like I fixed this "accidentally"

Cant reproduce in 2.90 but not in 2.91/2.92, so closing.

Fixed by 2c14a950a7

Looks like I fixed this "accidentally" Cant reproduce in 2.90 but not in 2.91/2.92, so closing. Fixed by 2c14a950a7

@iss My bad, it is sort of fixed. Might still be a good idea to at least assign an empty string or generic error message to the error_msg. If the conditions for the error reporting change, the string is still uninitialized.

@iss My bad, it is sort of fixed. Might still be a good idea to at least assign an empty string or generic error message to the `error_msg`. If the conditions for the error reporting change, the string is still uninitialized.
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
4 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#80717
No description provided.