Closed BernhardKloibmueller closed 10 months ago
I can not reproduce this problem with Version: 12.1.883011.
@dannoe thanks for the response.
After your comment I looked into it deeper and found the reason.
I have multiple dependencies. In one of these dependencies there is a tableextension which adds an event to a table from a different app. This app is not present in my app because there are not propagateDependencies activated and I don't need it directly. It seems due do the fact that the source table is missing the error occurs.
So my apps have a structure like this:
App A -- depends on AppB -- does not depend on AppC
App B -- depends on AppC
AppB adds an eventpublisher to a table of AppC
AppA cannot use "Find Events" nor the "AL Explorer" because of the missing Dependency.
Solution: Add dependency to AppC in AppA.
I will reach out to the developer of AppB and AppC to add propagateDependencies:true to their app,
But is this a bug which would get addressed? in the developer extensions? Thank you in advance.
The stack trace is a good indication that this is a bug, the extension should never crash.
1. Describe the bug When using the function "Find Event" the list of events does not open.
2. To Reproduce Open an app Go to a Codeunit Object Press "F1" Select "AL: Find Event"
3. Expected behavior List of Events to select opens
4. Actual behavior Nothing opens
In Output Window you receive this error: Processing of message 'al/getEventPublishersRequest' failed with error: 'One or more errors occurred. (Object reference not set to an instance of an object.)' Details: System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) ---> System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.GetEventPublishersRequestHandler.<>cDisplayClass4_1.b__5(MethodSymbol e) in D:\a_work\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\Extensions\GetEventPublishersRequestHandler.cs:line 80
at System.Linq.Parallel.SelectQueryOperator 10_0(Object o)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of inner exception stack trace ---
at System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose)
at System.Linq.Parallel.OrderPreservingSpoolingTask.Execute()
at System.Linq.Parallel.MergeExecutor
2.SelectQueryOperatorEnumerator
1.MoveNext(TOutput& currentElement, TKey& currentKey) at System.Linq.Parallel.SortHelper2.BuildKeysFromSource(GrowingArray
1& keys, List1& values) at System.Linq.Parallel.SortHelper
2.Sort() at System.Linq.Parallel.OrderPreservingSpoolingTask`2.SpoolingWork() at System.Linq.Parallel.SpoolingTaskBase.Work() at System.Linq.Parallel.QueryTask.BaseWork(Object unused) at System.Linq.Parallel.QueryTask.<>c.<.cctor>b2.Spool(QueryTaskGroupState groupState, PartitionedStream
2 partitions, Shared1 results, TaskScheduler taskScheduler) at System.Linq.Parallel.OrderPreservingMergeHelper
2.System.Linq.Parallel.IMergeHelper1.Execute[TKey](PartitionedStream
2 partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId) at System.Linq.Parallel.PartitionedStreamMerger1.Receive[TKey](PartitionedStream
2 partitionedStream) at System.Linq.Parallel.SelectQueryOperator2.WrapPartitionedStream[TKey](PartitionedStream
2 inputStream, IPartitionedStreamRecipient1 recipient, Boolean preferStriping, QuerySettings settings) at System.Linq.Parallel.UnaryQueryOperator
2.UnaryQueryOperatorResults.ChildResultsRecipient.Receive[TKey](PartitionedStream2 inputStream) at System.Linq.Parallel.SortQueryOperatorResults
2.ChildResultsRecipient.Receive[TKey](PartitionedStream2 childPartitionedStream) at System.Linq.Parallel.DistinctQueryOperator
1.WrapPartitionedStreamHelper[TKey](PartitionedStream2 hashStream, IPartitionedStreamRecipient
1 recipient, CancellationToken cancellationToken) at System.Linq.Parallel.DistinctQueryOperator1.WrapPartitionedStream[TKey](PartitionedStream
2 inputStream, IPartitionedStreamRecipient1 recipient, Boolean preferStriping, QuerySettings settings) at System.Linq.Parallel.UnaryQueryOperator
2.UnaryQueryOperatorResults.ChildResultsRecipient.Receive[TKey](PartitionedStream2 inputStream) at System.Linq.Parallel.SelectManyQueryOperator
3.WrapPartitionedStreamNotIndexed[TLeftKey](PartitionedStream2 inputStream, IPartitionedStreamRecipient
1 recipient, QuerySettings settings) at System.Linq.Parallel.SelectManyQueryOperator3.WrapPartitionedStream[TLeftKey](PartitionedStream
2 inputStream, IPartitionedStreamRecipient1 recipient, Boolean preferStriping, QuerySettings settings) at System.Linq.Parallel.UnaryQueryOperator
2.UnaryQueryOperatorResults.ChildResultsRecipient.Receive[TKey](PartitionedStream2 inputStream) at System.Linq.Parallel.SelectManyQueryOperator
3.WrapPartitionedStreamNotIndexed[TLeftKey](PartitionedStream2 inputStream, IPartitionedStreamRecipient
1 recipient, QuerySettings settings) at System.Linq.Parallel.SelectManyQueryOperator3.WrapPartitionedStream[TLeftKey](PartitionedStream
2 inputStream, IPartitionedStreamRecipient1 recipient, Boolean preferStriping, QuerySettings settings) at System.Linq.Parallel.UnaryQueryOperator
2.UnaryQueryOperatorResults.ChildResultsRecipient.Receive[TKey](PartitionedStream2 inputStream) at System.Linq.Parallel.ListQueryResults
1.GivePartitionedStream(IPartitionedStreamRecipient1 recipient) at System.Linq.Parallel.UnaryQueryOperator
2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient1 recipient) at System.Linq.Parallel.UnaryQueryOperator
2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient1 recipient) at System.Linq.Parallel.UnaryQueryOperator
2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient1 recipient) at System.Linq.Parallel.SortQueryOperatorResults
2.GivePartitionedStream(IPartitionedStreamRecipient1 recipient) at System.Linq.Parallel.UnaryQueryOperator
2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient1 recipient) at System.Linq.Parallel.QueryOperator
1.ExecuteAndGetResultsAsArray() at System.Linq.ParallelEnumerable.ToArray[TSource](ParallelQuery1 source) at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.GetEventPublishersRequestHandler.HandleAsync(GetEventPublishersRequest request, Int32 requestId, CancellationToken cancellationToken) in D:\a\_work\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\Extensions\GetEventPublishersRequestHandler.cs:line 70 at Microsoft.Dynamics.Nav.EditorServices.Protocol.MessageProtocol.RequestHandlerBase
1.HandleAsync(JToken requestContents, Int32 requestId, CancellationToken cancellationToken) in D:\a_work\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\MessageProtocol\RequestHandlerBase.cs:line 103 at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.Process(Message message) in D:\a_work\1\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 1065. Versions: