-
Notifications
You must be signed in to change notification settings - Fork 243
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
'textDocument/inlayHint' failed with error: 'Object reference not set to an instance of an object.' #7794
Comments
✅ Successfully linked to Azure Boards work item(s): |
IT would be quite helpful for a fix a small repro. |
I dont have an example, but I have noticed a place where the error occurs. We have an app A which exposes this function: procedure GetWorkTypeRelationByResourceNo(ResourceNo: Code[20]; WorkType: Code[20]; var WorkTypeRealtion: Record "Work Type Relation3_LON")
begin
end; When this function is called in our customers extension B, the inline hits are missing and the error is produced. local procedure CreatePayrollJnlEntry(ResLedgerEntry: Record "Res. Ledger Entry") Result: Integer
var
Employee: Record Employee_LON;
WorkTypeRelation: Record "Work Type Relation3_LON";
Functionpublisher: Codeunit Functionpublisher_LON;
begin
Employee.SetRange("Resource No.", ResLedgerEntry."Resource No.");
if not Employee.FindFirst() then
exit;
Functionpublisher.GetWorkTypeRelationByResourceNo(ResLedgerEntry."Resource No.", ResLedgerEntry."Work Type Code", WorkTypeRelation);
if CreateAbsenceJnlLine(ResLedgerEntry, WorkTypeRelation, Employee) then
Result += 1;
if CreatePayrollJnlLine(ResLedgerEntry, WorkTypeRelation, Employee) then
Result += 1;
end; I have tried to downgrade to 13.0.1027618, but the problem persists (Currently I'm using 13.1.1065068) |
I encounter the same error as described above. (13.1.1065068) When switching to the file in vscode the error is thrown once. Example: namespace DefaultPublisher.RepScenario;
using Microsoft.Inventory.Tracking;
codeunit 50100 "Rep. Scenario"
{
trigger OnRun()
var
TrackingSpecification: Record "Tracking Specification";
ReservMgt: Codeunit "Reservation Management";
begin
ReservMgt.CreateReservation('', WorkDate(), 1, 1, TrackingSpecification);
// Add new line below and wait.
end;
} |
1. Describe the bug
the setting
"editor.inlayHints.enabled": "on"
throws error:2. To Reproduce
activate this setting
"editor.inlayHints.enabled": "on"
in VSCode for a BC extension:3. Expected behavior
no errors
4. Actual behavior
5. Versions:
Version 13.1
Versi??n: 1.91.1 (user setup)
Confirmar: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Fecha: 2024-07-09T22:06:49.809Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
SO: Windows_NT x64 10.0.22631
ES Business Central 24.3 (Plataforma 24.0.21667.0 + Aplicaci??n 24.3.21374.21517)
None
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
Internal work item: AB#542456
The text was updated successfully, but these errors were encountered: