nasa/fprime

GDS Fails To Launch With Unknown Types In Dictionary

Opened this issue · 1 comments

F´ Version all

Problem Description

The GDS crashes on launch when provided with a dictionary containing references to a handcoded type. See: #1643 (comment)

This may also apply to other complicated types like serlizables.

Expected Behavior

Instead of failing to launch, the GDS should launch but warn that it's unable to deserialize EVRs referencing the handcoded type.

From: @JackNWhite

I am trying out this modification.

diff --git a/src/fprime_gds/common/loaders/xml_loader.py b/src/fprime_gds/common/loaders/xml_loader.py
index b7e8984..4cc0e0c 100644
--- a/src/fprime_gds/common/loaders/xml_loader.py
+++ b/src/fprime_gds/common/loaders/xml_loader.py
@@ -180,7 +180,13 @@ class XmlLoader(dict_loader.DictLoader):
 
                 arg_name = arg_dict[self.ARG_NAME_TAG]
                 arg_type_name = arg_dict[self.ARG_TYPE_TAG]
-                arg_typ_obj = self.parse_type(arg_type_name, arg, xml_tree, context)
+
+                try:
+                    arg_typ_obj = self.parse_type(arg_type_name, arg, xml_tree, context)
+
+                # Return nothing if the args are at least partly nonsense
+                except exceptions.GseControllerParsingException:
+                    return []
 
                 arg_desc = None
                 if self.ARG_DESC_TAG in arg_dict: