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

TTreeReader bogus data in std::vector if first element skipped

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 6.08/02
    • Fix Version/s: 6.10/00, 6.08/08
    • Component/s: I/O
    • Labels:
      None
    • Environment:

      Reproduced in:
      6.08/02 on OS X
      6.06/09 an SL6 machine in a CMSSW environment: /cvmfs/cms.cern.ch/slc6_amd64_gcc530/cms/cmssw-patch/CMSSW_8_2_0_patch1/external/slc6_amd64_gcc530/bin/root

      Description

      In the case of accessing a TTreeReaderArray that is from STL vector of anything (float in the example), accessing an offset other than zero can sometimes lead to garbage data if the first element has not previously been accessed.
      I made a minimal example in pyROOT, as attached
      The expected output should be 20 random integers, but in test case 0 or 1, the output stops making sense after the 5th entry and changes from time to time (junk memory presumably).

        Attachments

          Activity

            People

            • Assignee:
              axel Axel Naumann
              Reporter:
              ncsmith Nick Smith
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: