Skip to content

Null SubmodelElement raises an unhandled exception #37

@martafullen

Description

@martafullen

Describe the bug

Aasx files missing a SubmodelElement value raise an unhandled exception during loading.

System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=AasxCsharpLibrary
  StackTrace:
   at Extensions.ExtendISubmodelElement.BasicConversionFromV20(ISubmodelElement submodelElement, SubmodelElement sourceSubmodelElement) in \ExtendISubmodelElement.cs:line 504

submodelElement is null:

Name Value Type
submodelElement null AasCore.Aas3_0.ISubmodelElement
sourceSubmodelElement {"notnull" } AasxCompatibilityModels.AdminShellV20.SubmodelElement {AasxCompatibilityModels.AdminShellV20.Capability}

Expected behavior
Exception caught
or values checked and nulls handled

Desktop (please complete the following information):

  • OS: win 11
  • Version: release AASX Package Explorer V3 2023-11-17.alpha

Additional context
Related issue in aasx-server:
eclipse-aaspe/server#214

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions