Posted 13 years ago
by Craig
-
Varigence, Inc.
Version: 11.1.0545
Platform: .NET 4.0
Environment: Windows 7 (64-bit)

Repro Steps:
1. Open the Actipro Sample Browser
2. Open the C# Editor (.NET Lang Add-On) sample
3. First, add a semicolon after "int ErrorTest = 1"
4. After the Console.WriteLine statement, insert a couple newlines
5. Then insert the following C#:6. Hover over the word Whatever.
Result:
The Sample Browser crashes with a NRE.
Probable Cause:
I believe you'll find the issue is in the ResolverScopeManager's ScopeContext(ITypeMemberDefinition) constructor. You reference the containingTypeMemberDefinition's DeclaringType property without first checking if the containingTypeMemberDefinition is null.
Question:
Outside of adding a try-catch around the spot where we initiate a QuickInfo, is there any way we can avoid this exception from being thrown? I ask since we're hitting this in our own applications.
Thanks,
-Craig
1. Open the Actipro Sample Browser
2. Open the C# Editor (.NET Lang Add-On) sample
3. First, add a semicolon after "int ErrorTest = 1"
4. After the Console.WriteLine statement, insert a couple newlines
5. Then insert the following C#:
foreach (var bob in bobs.Where(item => item.Whatever) { }
Result:
The Sample Browser crashes with a NRE.
Probable Cause:
I believe you'll find the issue is in the ResolverScopeManager's ScopeContext(ITypeMemberDefinition) constructor. You reference the containingTypeMemberDefinition's DeclaringType property without first checking if the containingTypeMemberDefinition is null.
Question:
Outside of adding a try-catch around the spot where we initiate a QuickInfo, is there any way we can avoid this exception from being thrown? I ask since we're hitting this in our own applications.
Thanks,
-Craig