-
Notifications
You must be signed in to change notification settings - Fork 194
SG-40369: SequenceNode Stability Improvements #848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
SG-40369: SequenceNode Stability Improvements #848
Conversation
Signed-off-by: Mark Reid <markreid@netflixanimation.com>
Signed-off-by: Mark Reid <markreid@netflixanimation.com>
Signed-off-by: Mark Reid <markreid@netflixanimation.com>
Signed-off-by: Mark Reid <markreid@netflixanimation.com>
| || index >= (m_edlSourceIn->size() - 1) | ||
| || index >= (m_edlSourceOut->size() - 1) | ||
| || index >= (m_edlGlobalIn->size() - 1) | ||
| || index < 0 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm probably quite tired, and my eyes are bugging out, but, what are you doing here? are you checking if index is out of bound? or are you checking if it's the last element, or out of bounds?
Feels to me like, if you're checking if out of bounds, >= size() is sufficient, no need for -1? I mean...
let's say:
-
size() == 0. size()-1 is 0xffffffffffffffff, so index >= is false when it should be out of bounds.
-
size() == 1. size()-1 is 0, which is a valid index. but you're checking if index >= [0], which would return true, and so return EvalPoint(-1,0,-1).
Was the above really the intent?
should there be another condition that says
|| size() == 0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason the original designed choose to pad the source, in and out arrays with a zero so they are the same length as frame.
edl
{
int frame = [ 1 11 21 31 41 ]
int source = [ 0 1 0 1 0 ]
int in = [ 1 1 11 11 0 ]
int out = [ 10 10 20 20 0 ]
}
your right about the zero case, but there is size < 1 check, earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last edit is really just a boundary condition: it indicates how RV should handle frames past the end of the EDL. To be well formed, an RV EDL needs to include this
I don't think my code is doing this, according to the docs in the example, this should hold frame 0 of source 0 if the index is past the end. I don't think the current implementation even does this.
Also what is suppose to happen if the frame is before the first frame isn't defined either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the user entered something like this:
edl
{
int frame = [ 1 11 21 31 41 ]
int source = [ 0 1 0 1 0 ]
int in = [ 1 1 11 11 1 ]
int out = [ 10 10 20 20 10 ]
}
I have no idea how what this is suppose to mean for a bounds condition. repeat 1-10?
ignoring the last index I think is the most sensible thing to do and avoid all these needless complications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks I'm approving this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you @markreidvfx !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. All of these look safe to me.
|
@markreidvfx as part of an effort to augment the degree of QA we do on community bug fixes, we'll be asking for repro steps and materials (media, if applicable) to reproduce the before/after states. Though this looks good to me, do you have exact materials or repro steps that demonstrate the crashes you fixed? Not necessarily for me for the code review, but for the QA folks. (same will have to be for your other submissions, I'm afraid - we will soon update the discussion template to reflect these policy changes) |
|
These crashes are related to using the sequence node with autoEDL is off. Here is one of the most basic ones With this file sequence_node_crash.rv.zip run this command that sets a invalid sourceIndex and tries get the node geometry. from rv import commands
node = "defaultSequence_sequence"
commands.setIntProperty(f"{node}.edl.source", [ 3, 1, 0 ], True)
commands.nodeImageGeometry(node, 1)RV should just crash. With the fix the sequence should still be viewable even after setting the invalid It will take me a bit to track down more repos if you need more. I did these fixes almost a year ago and they are all related to crashes discovered using our timeline editor. I don't think i have the core dump that led to the ImageRender null check, I remember that being difficult to trigger. FWIW we've been using the these fix in production for almost a year. |
Summarize your change.
This PR fixes program crashes that can occur if you modify Sequence edl properties. Most of these are due to lack of proper bounds checking on the properties in various locations.
We also modified the node’s behavior so that it no longer throws an exception when it enters a bad state. Instead, it now returns a newNoImage containing the error message. We discovered that when EDL properties are changed dynamically, the node can easily enter a temporary, inconsistent state. This happens because property change events may occur between the setting of individual EDL properties, and the operations that can take place in between are not trivial to manage. Displaying the error console in these situations proved to be both frustrating and confusing for users.
Describe what you have tested and on which operating system.
Linux, macOS