Description
Please include the following with each issue:
1. Describe the bug
While attempting to package an AL App, the following error occurred immediately after entering the Package command.
2. To Reproduce
Loaded the app from the repository
Downloaded symbols from the development environment (again V26 Wave 1 On Premise Dyn. 365 BC)
at command palette prompt clicked AL: Package
Got the error below.
3. Expected behavior
Package the app
4. Actual behavior
Processing of message 'al/createPackage' failed with error: 'Object reference not set to an instance of an object.'
Details:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Dynamics.Nav.CodeAnalysis.ObjectChangeManager.Update(IEnumerable1 objectChangeElements, ObjectChangeState state) in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\ObjectChange\ObjectChangeManager.cs:line 154 at Microsoft.Dynamics.Nav.CodeAnalysis.ObjectChangeManager.Load(ObjectChangeModelDefinition objectChangeModelDefinition) in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\ObjectChange\ObjectChangeManager.cs:line 122 at Microsoft.Dynamics.Nav.CodeAnalysis.ObjectChangeManager.Load(String path, IFileSystem fileSystem) in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\ObjectChange\ObjectChangeManager.cs:line 129 at Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.ProjectState.<>c__DisplayClass6_0.<.ctor>b__6() in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces\Workspace\Solution\ProjectState.cs:line 97 at System.Lazy
1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy
1.CreateValue()
at Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.ProjectState.get_ObjectChangeManager() in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces\Workspace\Solution\ProjectState.cs:line 247
at Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.Project.get_ObjectChangeManager() in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces\Workspace\Solution\Project.cs:line 57
at Microsoft.Dynamics.Nav.EditorServices.Protocol.ObjectChangeDocumentManager.GetObjectChangeManager(ProjectId id) in X:\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\ObjectChangeDocumentManager.cs:line 71
at Microsoft.Dynamics.Nav.EditorServices.Protocol.ObjectChangeDocumentManager.HasProjectRadChanges(ProjectId id) in X:\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\ObjectChangeDocumentManager.cs:line 278
at Microsoft.Dynamics.Nav.EditorServices.Protocol.Utility.ActiveProjectBuilder.Build(VsCodeWorkspace workspace, Project builtProject, StreamingTextWriter outputWriter, Boolean isRad, IList1 args, CancellationToken cancellationToken, IResponseQueue responseQueue, ITelemetryService telemetryService, Boolean forceBuild, IList
1 outputFiles, CustomTelemetryEvent telemetryEvent, String requestVsCodeExtensionVersion) in X:\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Utility\ActiveProjectBuilder.cs:line 157
at Microsoft.Dynamics.Nav.EditorServices.Protocol.Utility.ActiveProjectBuilder.BuildWorkspaceAsync(CancellationToken cancellationToken, IFileSystem fileSystem, VsCodeWorkspace workspace, String projectDir, IList1 args, Boolean buildDependencyPackage, Boolean isRad, IResponseQueue responseQueue, Boolean forceBuildOfAllDependencies, CustomTelemetryEvent telemetryEvent, ITelemetryService telemetryService, String vsCodeExtensionVersion) in X:\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Utility\ActiveProjectBuilder.cs:line 115 at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.CreatePackageRequestHandler.HandleAsync(CreatePackageRequest request, Int32 requestId, CancellationToken cancellationToken) in X:\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\Extensions\CreatePackageRequestHandler.cs:line 37 at Microsoft.Dynamics.Nav.EditorServices.Protocol.MessageProtocol.RequestHandlerBase
1.HandleAsync(JToken requestContents, Int32 requestId, CancellationToken cancellationToken) in X:\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\MessageProtocol\RequestHandlerBase.cs:line 85
at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.Process(Message message) in X:\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 84
5. Versions:
- AL Language: version 15.0.1433841
- Visual Studio Code:
- Business Central: v26 wave 1
- List of Visual Studio Code extensions that you have installed:
- Operating System:
- Windows
Final Checklist
Please remember to do the following:
-
Search the issue repository to ensure you are reporting a new issue
-
Reproduce the issue after disabling all extensions except the AL Language extension
-
Simplify your code around the issue to better isolate the problem