Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      internal 4.0.2-2

      Description

      This FUNCTIONMACRO gets these errors at runtime:

      eclcc 0: assert(childDataset) failed - file: /var/lib/jenkins/workspace/LN-Candidate-4.0.2-2/LN/centos-5.7-x86_64/HPCC-Platform/ecl/hql/hqlexpr.cpp, line 6045
      eclcc 0: (0,0): error C3000: assert(childDataset) failed - file: /var/lib/jenkins/workspace/LN-Candidate-4.0.2-2/LN/centos-5.7-x86_64/HPCC-Platform/ecl/hql/hqlexpr.cpp, line 6045

      The WHEN in the FUNCTIONMACRO seems to be the culprit. It all works if the FUNCTIONMACRO is only called once, but fails with two instances. Removing the WHEN also solves the problem.

      //*******************************************************************
      IMPORT STD;
      RemoveLines(logicalfile, startline, numlines) := FUNCTIONMACRO
      EndLine := startline + numlines - 1;
      RecCnt := COUNT(logicalfile);
      Res := logicalfile[1..startline-1] + logicalfile[endline+1..];
      RETURN WHEN(IF(RecCnt < EndLine,logicalfile,Res),
      IF(RecCnt < EndLine,STD.System.Log.addWorkunitWarning('Attempted removal past end of file-removal ignored')));
      // RETURN IF(RecCnt < EndLine,logicalfile,Res);
      ENDMACRO;

      MyFile := DATASET(100,TRANSFORM(

      {UNSIGNED1 RecID}

      ,SELF.RecID := COUNTER));
      RemoveLines(MyFile,3,10);
      RemoveLines(MyFile,3,100);

        Attachments

          Activity

            People

            • Assignee:
              ghalliday Gavin Halliday
              Reporter:
              richardtaylorhpcc Richard Taylor
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: