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

Eternal loop in GetParentLocalDeclarationStatement #40

Closed
JarLob opened this issue Dec 20, 2017 · 5 comments
Closed

Eternal loop in GetParentLocalDeclarationStatement #40

JarLob opened this issue Dec 20, 2017 · 5 comments
Assignees
Milestone

Comments

@JarLob
Copy link

JarLob commented Dec 20, 2017

It might be the cause of #39 because I found it running the same project.
There is no break at the end of while(true) in GetParentLocalDeclarationStatement as it is in SymbolInheritsFrom. This causes an eternal loop when an item is not null, not LocalDeclarationStatementSyntax and doesn't have a parent.

May I suggest also adding something similar to snippet below to prevent it in the future:

var analyzeTask = AnalyzeAsync();
var timeoutTask = Task.Delay(10000);
var completedTask = await Task.WhenAny(analyzeTask, timeoutTask);
if (completedTask == timeoutTask)
    throw new TimeoutException();
@ejohn20
Copy link
Member

ejohn20 commented Dec 20, 2017

@JarLob awesome find. I'll tinker with this and see if it resolves the issue.

@meadisu27 Do you know if this is corrected in the latest version about to be pushed?

@meadisu27
Copy link
Member

@ejohn20 No I don't believe it is. The release candidate still needs the VS2015 combatibility issues merged in. Can squeeze this in as well.

@ejohn20
Copy link
Member

ejohn20 commented Dec 20, 2017

I'm debugging this now. Definitely was the root of the issue. I'm going to put a check in the loop to prevent it at that layer. I also like the idea of a timeout as @JarLob describes above to prevent the analyzers from hosing up the build as well.

@ejohn20
Copy link
Member

ejohn20 commented Dec 20, 2017

OK - patch fix in flight. This will be in the 2.x version of the open source package to be released shortly.

@ejohn20 ejohn20 added this to the 2.0 milestone Jan 18, 2018
@ejohn20 ejohn20 self-assigned this Jan 18, 2018
@ejohn20
Copy link
Member

ejohn20 commented Feb 14, 2018

Deployed in 1.0.7 release this morning.

@ejohn20 ejohn20 closed this as completed Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants