eclipse-aaspe / package-explorer

AASX Package Explorer
Other
55 stars 20 forks source link

NullReferenceException in nameplate viewer DNP when trying to update AAS #26

Closed WelliSolutions closed 6 months ago

WelliSolutions commented 7 months ago

Describe the bug I want to create a digital nameplate with the help of digital nameplate viewers.

To Reproduce Steps to reproduce the behavior:

  1. Create a new AAS
  2. At the AAS, click "Create new submodel of kind instance"
  3. Click "Create data element" for semanticId
  4. Choose ModelReference
  5. Click "Add blank"
  6. Choose Submodel
  7. Enter https://admin-shell.io/zvei/nameplate/1/0/Nameplate
  8. Save the AASX file. This will trigger the display of the nameplate viewers.
  9. Click on the viewer DNP
  10. At the property "ManufacturerName", click on +
  11. Choose a language
  12. Enter "Test" as the manufacturer name
  13. Click "Update to AAS"
  14. An exception occurs

Log:

[AasxPluginGenericForms] Error: when adding Document: 
Object reference not set to an instance of an object. 
Object reference not set to an instance of an object. at 
   at AasxIntegrationBase.AasForms.FormInstanceSubmodelElement.AddOrUpdateSmeToCollection(List`1 collectionNewElements, AdminShellPackageEnv packageEnv, Boolean addFilesToPackage) 
   in D:\a\aasx-package-explorer\aasx-package-explorer\src\AasxIntegrationBase\AasForms\FormInstance.cs:line 1198
   at AasxIntegrationBase.AasForms.FormInstanceListOfSame.AddOrUpdateSameElementsToCollection(List`1 elements, AdminShellPackageEnv packageEnv, Boolean addFilesToPackage) 
   in D:\a\aasx-package-explorer\aasx-package-explorer\src\AasxIntegrationBase\AasForms\FormInstance.cs:line 502
   at AasxIntegrationBase.AasForms.FormInstanceListOfDifferent.AddOrUpdateDifferentElementsToCollection(List`1 elements, AdminShellPackageEnv packageEnv, Boolean addFilesToPackage) 
   in D:\a\aasx-package-explorer\aasx-package-explorer\src\AasxIntegrationBase\AasForms\FormInstance.cs:line 326
   at AasxIntegrationBase.AasForms.FormInstanceSubmodel.AddOrUpdateDifferentElementsToCollection(List`1 elements, AdminShellPackageEnv packageEnv, Boolean addFilesToPackage, Boolean editSource) 
   in D:\a\aasx-package-explorer\aasx-package-explorer\src\AasxIntegrationBase\AasForms\FormInstance.cs:line 1072
   at AasxPluginGenericForms.GenericFormsAnyUiControl.ButtonTabPanels_Click(String cmd) in D:\a\aasx-package-explorer\aasx-package-explorer\src\AasxPluginGenericForms\GenericFormsAnyUiControl.cs:line 220.

Expected behavior No exception. The nameplate viewer creates a new property for the manufacturer name.

Screenshots image

image

Desktop (please complete the following information):

Smartphone (please complete the following information): None

Additional context Version 2023-11-17

juileetikekar commented 7 months ago

Hi @WelliSolutions,

Thank you for raising the issue !!

The issue was reproduced. We will keep you informed about further updated.