Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-9466

[DF] A lazy snapshot that's never triggered crashes at teardown

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: master, 6.14/00
    • Fix Version/s: 6.16/00, 6.14/02
    • Component/s: None
    • Labels:
      None
    • Environment:

      any

      Description

      The crash happens in ROOT::Internal::RDF::SnapshotHelper<unsigned long long>::Finalize at RDFActionHelpers.hxx:744: variables fOutputFile and fOutputTree are both nullptrs if the event loop was never triggered.

      Repro:

      #include <ROOT/RDataFrame.hxx>
       
      int main()
      {
         auto d = ROOT::RDataFrame(1);
         ROOT::RDF::RSnapshotOptions opts;
         opts.fLazy = true;
         d.Snapshot<ULong64_t>("t", "foo.root", {"tdfentry_"}, opts);
         return 0;
      }
      

      How should we behave in this case?
      Triggering an entire event loop in a destructor is not nice, and definitely not nothrow. So maybe we should just do nothing if a lazy Snapshot was booked but the event loop was never triggered?

        Attachments

          Activity

            People

            Assignee:
            dpiparo Danilo Piparo
            Reporter:
            eguiraud Enrico Guiraud
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Actual Start:
              Actual End: