getting an error on select new

Discussion of issues, suggestions and bugs of LINQ Insight, Visual Studio add-in for design-time executing LINQ statements, that simplifies debugging LINQ
Post Reply
LucidCoder
Posts: 11
Joined: Thu 05 Feb 2015 19:24

getting an error on select new

Post by LucidCoder » Tue 28 Feb 2017 22:04

Hello;

I have verified that I get the same error when using a standard azure data connector and when usings a postgresql dotconnect.

I am using the beta version in VS 2015

The below will return 1200 records in Linq Insight, it is hitting a azure Sql database:

Code: Select all

var test = (from t in aDb.rep_info select t).ToArray();
But this will generate a error in Linq Insight, even through it will run correctly:

Code: Select all

var test = (from t in aDb.rep_info select  new {t.first_name}).ToArray();
Message: One or more errors occurred.
Type: System.AggregateException
Source: mscorlib
Site: ThrowIfExceptional
Stack Trace:
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Devart.LinqInsight.Roslyn.RoslynQueryExecutor.PrepareInternal(SourceCodeInfo sourceCode, CancellationToken token, String privateBinPath)
at Devart.LinqInsight.Implementation.QueryExecutor.Prepare()
at Devart.LinqInsight.Implementation.QueryExecutor.Execute()
at Devart.LinqInsight.Implementation.QueryExecutor.<>c__DisplayClass59_0.<StartNewTask>b__0()
Inner Exception:
Message: Object reference not set to an instance of an object.
Type: System.NullReferenceException
Source: Microsoft.CodeAnalysis.CSharp.Workspaces
Site: SomeParentHasMissingCloseBrace
Stack Trace:
at Microsoft.CodeAnalysis.CSharp.Formatting.BaseFormattingRule.SomeParentHasMissingCloseBrace(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.Formatting.BaseFormattingRule.AddBraceSuppressOperations(List`1 list, SyntaxNode node, SyntaxToken lastToken)
at Microsoft.CodeAnalysis.CSharp.Formatting.SuppressFormattingRule.AddSuppressOperations(List`1 list, SyntaxNode node, SyntaxToken lastToken, OptionSet optionSet, NextAction`1 nextOperation)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.<.ctor>b__8_0(Int32 index, List`1 list, SyntaxNode node, SyntaxToken lastToken, NextAction`1 next)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.AddContinuedOperations[TArg1](Int32 index, List`1 arg1, SyntaxNode node, SyntaxToken lastToken, IActionHolder`1 actionCache)
at Microsoft.CodeAnalysis.Formatting.Rules.NextAction`1.Invoke(List`1 arguments)
at Microsoft.CodeAnalysis.Formatting.Rules.AbstractFormattingRule.AddSuppressOperations(List`1 list, SyntaxNode node, SyntaxToken lastToken, OptionSet optionSet, NextAction`1 nextOperation)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.<.ctor>b__8_0(Int32 index, List`1 list, SyntaxNode node, SyntaxToken lastToken, NextAction`1 next)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.AddContinuedOperations[TArg1](Int32 index, List`1 arg1, SyntaxNode node, SyntaxToken lastToken, IActionHolder`1 actionCache)
at Microsoft.CodeAnalysis.Formatting.Rules.NextAction`1.Invoke(List`1 arguments)
at Microsoft.CodeAnalysis.Formatting.Rules.AbstractFormattingRule.AddSuppressOperations(List`1 list, SyntaxNode node, SyntaxToken lastToken, OptionSet optionSet, NextAction`1 nextOperation)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.<.ctor>b__8_0(Int32 index, List`1 list, SyntaxNode node, SyntaxToken lastToken, NextAction`1 next)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.AddContinuedOperations[TArg1](Int32 index, List`1 arg1, SyntaxNode node, SyntaxToken lastToken, IActionHolder`1 actionCache)
at Microsoft.CodeAnalysis.Formatting.Rules.NextAction`1.Invoke(List`1 arguments)
at Microsoft.CodeAnalysis.Formatting.Rules.AbstractFormattingRule.AddSuppressOperations(List`1 list, SyntaxNode node, SyntaxToken lastToken, OptionSet optionSet, NextAction`1 nextOperation)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.<.ctor>b__8_0(Int32 index, List`1 list, SyntaxNode node, SyntaxToken lastToken, NextAction`1 next)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.AddContinuedOperations[TArg1](Int32 index, List`1 arg1, SyntaxNode node, SyntaxToken lastToken, IActionHolder`1 actionCache)
at Microsoft.CodeAnalysis.Formatting.Rules.NextAction`1.Invoke(List`1 arguments)
at Microsoft.CodeAnalysis.CSharp.Formatting.ElasticTriviaFormattingRule.AddSuppressOperations(List`1 list, SyntaxNode node, SyntaxToken lastToken, OptionSet optionSet, NextAction`1 nextOperation)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.<.ctor>b__8_0(Int32 index, List`1 list, SyntaxNode node, SyntaxToken lastToken, NextAction`1 next)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.AddContinuedOperations[TArg1](Int32 index, List`1 arg1, SyntaxNode node, SyntaxToken lastToken, IActionHolder`1 actionCache)
at Microsoft.CodeAnalysis.Formatting.Rules.NextAction`1.Invoke(List`1 arguments)
at Microsoft.CodeAnalysis.Formatting.Rules.AbstractFormattingRule.AddSuppressOperations(List`1 list, SyntaxNode node, SyntaxToken lastToken, OptionSet optionSet, NextAction`1 nextOperation)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.<.ctor>b__8_0(Int32 index, List`1 list, SyntaxNode node, SyntaxToken lastToken, NextAction`1 next)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.AddContinuedOperations[TArg1](Int32 index, List`1 arg1, SyntaxNode node, SyntaxToken lastToken, IActionHolder`1 actionCache)
at Microsoft.CodeAnalysis.Formatting.Rules.NextAction`1.Invoke(List`1 arguments)
at Microsoft.CodeAnalysis.Formatting.Rules.AbstractFormattingRule.AddSuppressOperations(List`1 list, SyntaxNode node, SyntaxToken lastToken, OptionSet optionSet, NextAction`1 nextOperation)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.<.ctor>b__8_0(Int32 index, List`1 list, SyntaxNode node, SyntaxToken lastToken, NextAction`1 next)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.AddContinuedOperations[TArg1](Int32 index, List`1 arg1, SyntaxNode node, SyntaxToken lastToken, IActionHolder`1 actionCache)
at Microsoft.CodeAnalysis.Formatting.Rules.NextAction`1.Invoke(List`1 arguments)
at Microsoft.CodeAnalysis.CSharp.Formatting.SpacingFormattingRule.AddSuppressOperations(List`1 list, SyntaxNode node, SyntaxToken lastToken, OptionSet optionSet, NextAction`1 nextOperation)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.<.ctor>b__8_0(Int32 index, List`1 list, SyntaxNode node, SyntaxToken lastToken, NextAction`1 next)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.AddContinuedOperations[TArg1](Int32 index, List`1 arg1, SyntaxNode node, SyntaxToken lastToken, IActionHolder`1 actionCache)
at Microsoft.CodeAnalysis.Formatting.Rules.NextAction`1.Invoke(List`1 arguments)
at Microsoft.CodeAnalysis.CSharp.Formatting.WrappingFormattingRule.AddSuppressOperations(List`1 list, SyntaxNode node, SyntaxToken lastToken, OptionSet optionSet, NextAction`1 nextOperation)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.<.ctor>b__8_0(Int32 index, List`1 list, SyntaxNode node, SyntaxToken lastToken, NextAction`1 next)
at Microsoft.CodeAnalysis.Formatting.ChainedFormattingRules.AddContinuedOperations[TArg1](Int32 index, List`1 arg1, SyntaxNode node, SyntaxToken lastToken, IActionHolder`1 actionCache)
at Microsoft.CodeAnalysis.Formatting.AbstractFormatEngine.<CreateNodeOperationTasks>b__16_4(List`1 l, SyntaxNode n)
at Microsoft.CodeAnalysis.Formatting.AbstractFormatEngine.<>c__DisplayClass17_1`1.<AddOperations>b__2(SyntaxNode n)
at Microsoft.CodeAnalysis.Formatting.TaskExecutor.SynchronousExecutor.ForEach[T](IEnumerable`1 source, Action`1 action, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Formatting.AbstractFormatEngine.AddOperations[T](List`1 nodes, Action`2 addOperations, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Formatting.AbstractFormatEngine.<>c__DisplayClass16_0.<CreateNodeOperationTasks>b__3(Task`1 task)
at Microsoft.CodeAnalysis.Formatting.TaskExecutor.SynchronousExecutor.ContinueWith[T1,T2](Task`1 previousTask, Func`2 nextAction, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Formatting.AbstractFormatEngine.CreateNodeOperationTasks(CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Formatting.AbstractFormatEngine.<FormatAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Formatting.AbstractSyntaxFormattingService.<FormatIndividuallyAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Formatting.AbstractSyntaxFormattingService.<FormatAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Formatting.Formatter.<FormatAsync>d__21.MoveNext()

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: getting an error on select new

Post by Shalex » Tue 07 Mar 2017 19:16

Thank you for your report. We have reproduced the issue and will notify you when it is fixed.

Post Reply