eclipse-aaspe / package-explorer

AASX Package Explorer
Other
55 stars 20 forks source link

NullReferenceException in nameplate viewer DN2 #25

Closed WelliSolutions closed 6 months ago

WelliSolutions commented 7 months ago

Describe the bug I wan 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 DN2
  10. An exception happens. The viewer displays nothing.

Log:

Error: render AnyUI based visual extension for plugin AasxPluginDigitalNameplate: 
Exception has been thrown by the target of an invocation. 
Exception has been thrown by the target of an invocation.
InnerException: Object reference not set to an instance of an object. at
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at AasxPackageLogic.Plugins.PluginInstance.InvokeAction(String name, Object[] args) in D:\a\aasx-package-explorer\aasx-package-explorer\src\AasxPackageLogic\Plugins.cs:line 128
   at AasxPackageExplorer.DispEditAasxEntity.DisplayOrEditVisualAasxElement(PackageCentral packages, AnyUiDisplayContextWpf displayContext, ListOfVisualElementBasic entities, Boolean editMode, Boolean hintMode, Boolean showIriMode, Nullable`1 cdSortOrder, IFlyoutProvider flyoutProvider, IPushApplicationEvent appEventProvider, HighlightFieldInfo hightlightField, AasxMenu superMenu) 
in D:\a\aasx-package-explorer\aasx-package-explorer\src\AasxWpfControlLibrary\DispEditAasxEntity.xaml.cs:line 534.Inner message: Object reference not set to an instance of an object.

Expected behavior No exception. The nameplate viewer displays an empty nameplate.

Screenshots 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 provide you further updates.