Object reference not set to an instance of an object.
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- vscode
- Área
- compilers
Línea de trabajo
Start by reproducing the crash with the table example in the issue, where the Option field sets ValuesAllowed without OptionMembers, then the page example with RunPageLink using a const date. The call stacks are only in the screenshots, so capture your own from the AL extension output. Done means the compiler reports a proper diagnostic telling the author that OptionMembers must be set, instead of throwing System.NullReferenceException, and the same holds for the RunPageLink case.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Please include the following with each issue:
1. Describe the bug
Creating an option type table field with ValuesAllowed set without OptionMembers set throws with System.NullReferenceException.
2. To Reproduce
Open VS Code with AL Extension version 18.1.2842859 or 30.0.2863738. Create a table with an option field which has ValuesAllowed set but OptionMembers not set. Expected result is a message informing the author that OptionMember must be set. If both are set there is no issue. If OptionMember is not set but ValuesAllowed is also not set there will likewise be no issue (correct error message).
A similar issue can be observed when creating a page with the following property set on an action
RunPageLink = "Date Filter" = const(-20240101D);.
Same error message but different call stack in this scenario.
- Go to '...'
Table example:
table 50100 "PTE Some Table"
{
fields
{
field(1; "My Field"; Option)
{
DataClassification = ToBeClassified;
//OptionMembers = "Some Value";
ValuesAllowed = "Some Value";
}
}
}
Page example:
page 50100 "PTE Some Page"
{
SourceTable = Customer;
actions
{
area(Processing)
{
action(A)
{
RunObject = page "Customer Card";
RunPageLink = "Date Filter" = const(-20240101D);
}
}
}
}
Note: The same can be observed even if the field we are using in RunPageLink is not a date type as long as we are using this constant value (-0D also throws, other malformed versions of dates I tried did not.)
3. Expected behavior
To get the errors which I get in with any other values (explaining what the issue is in the code rather than the compiler crashing.)
4. Actual behavior
5. Versions:
- AL Language:
- Visual Studio Code: 18.1.2842859 or 30.0.2863738
- Business Central: Not needed for this example.
- List of Visual Studio Code extensions that you have installed:
- .NET Install Tool & AL Language extension for Microsoft Dynamics 365 Business Central
- Operating System:
- [ W11 Home 25H2 26200 & W11 Enterprise 25H2 26200 (2 laptops) ] Windows
- [ X] Linux
- [ X] MacOS
Final Checklist
Please remember to do the following:
-
[ Checked and didn't see these specific errors.] Search the issue repository to ensure you are reporting a new issue
-
[ .Net Install Tool is a dependency of AL .. all others are uninstalled] Reproduce the issue after disabling all extensions except the AL Language extension
-
[ ✔️] Simplify your code around the issue to better isolate the problem
- Lenguaje dominante
- PowerShell
- Estrellas
- 891
- Forks
- 287
- Merge medio
- 4 h 7 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/AL
-
accepted al-tools bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
-
Fail to Run extensioAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 15/100
-
[Extensibility Request] Allow extending available font sizes in RichContent editor (sizes 5-7)Abiertosuggestion
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Todos los issues de microsoft/AL
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
JakeChampion/lang#14091 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Won't Fix
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
microsoft/TypeScript#65107 · 1 comentario ·
Los mantenedores suelen responder en 1 día