Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-19606

Seg fault on hthor when child graphs have no parent activity

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Unresourced
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Plugins
    • Labels:
      None
    • Compatibility:
      Point

      Description

      Here is wuid: http://alpha_dev_thor_esp.risk.regn.net:8010/?legacy&inner=../WsWorkunits/WUInfo%3FWuid%3DW20180427-144450%26IncludeExceptions%3D0%26IncludeGraphs%3D0%26IncludeSourceFiles%3D0%26IncludeResults%3D0%26IncludeVariables%3D0%26IncludeTimers%3D0%26IncludeDebugValues%3D0%26IncludeApplicationValues%3D0%26IncludeWorkflows%3D0%26SuppressResultSchemas%3D1

        

      The ECL Code is :

       

      ////////////////////////////////////////////////////////////////////////////

       

      rRec := record

                      string line;

      end;

       

      dXSD      := DATASET('~thor::base::fnava::tmp::xsd_example', rRec, CSV);

      dXML     := DATASET('~thor::base::fnava::tmp::xml_example_v3', rRec, CSV);

       

      ////////////////////////////////////////////////////////////////////////////

       

      rErrorLog := RECORD

                      string type;

                      string type_name;

                      string message;

      END;

       

      // dataset(rErrorLog) fPyXMLParse(dataset(rRec) xsd, dataset(rRec) xml_content) := EMBED(Python)

       

      string fPyXMLParse(dataset(rRec) xsd, dataset(rRec) xml_content) := EMBED(Python)

                      from lxml import etree

                      from cStringIO import StringIO

                     

                      xsd_full = []

                      xml_full = []

                     

                      for i in xsd:

                                      xsd_full.extend(i.line)

                     

                      for i in xml_content:

                                      xml_full.extend(i.line)

                     

                      xsd_doc = etree.fromstringlist(xsd_full)

                      xsd_schema = etree.XMLSchema(xsd_doc)

                     

                      xml_file_object = StringIO.StringIO()

                      xml_file_object.write(xml_full)

                      context = etree.iterparse(xml_file_object, events=('start', 'end'), schema=xsd_schema)

                     

                      coun = 0

       

                      for evet, elem in context:

                                      if evet == 'end':

                                                      for r in context.error_log:

                                                                      coun = coun + 1

                      #elem.clear()

                     

                      return str(coun)

      ENDEMBED;

       

      output(fPyXMLParse(dXSD, dXML), all);

       

      Thanks, Sanjay

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sanjaykumar_ln Sanjay
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: