Skip to content
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

Editor crashes on file open when failing to load included workflow #824

Closed
glopesdev opened this issue Sep 7, 2021 · 1 comment · Fixed by #1890
Closed

Editor crashes on file open when failing to load included workflow #824

glopesdev opened this issue Sep 7, 2021 · 1 comment · Fixed by #1890
Labels
bug Something isn't working critical This is a blocking issue affecting all users
Milestone

Comments

@glopesdev
Copy link
Member

To reproduce: open a workflow file containing missing included workflows, or invalid paths to embedded assemblies which cannot load (i.e. an included workflow pointing to a missing package).

This is a regression caused by fixing #800 with eager loading without accounting for potential exceptions raised during load. If this is the case, it might be okay to simply catch any exceptions to ensure ArgumentRange never throws, and wait for the error to be thrown during proper workflow building.

@glopesdev glopesdev added bug Something isn't working critical This is a blocking issue affecting all users labels Sep 7, 2021
glopesdev added a commit that referenced this issue Sep 8, 2021
@PathogenDavid
Copy link
Member

I noticed while reviewing #1890 that with this fix it's possible that an exception in the wrong place (namely, after workflow is initially assigned) could leave IncludeWorkflowBuilder in an inconsistent state and the exception would not show up later as intended.

The easiest fix is probably to store the newly-created workflow in a local and only assign it to this.workflow at the very end of the if (workflow == null || lastWriteTime > writeTime) block in EnsureWorkflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working critical This is a blocking issue affecting all users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants