Coder Social home page Coder Social logo

Comments (6)

tmadlener avatar tmadlener commented on June 28, 2024

Thanks for reporting this. We will try to have a look as soon as possible, but it will potentially take until after next week since many of us will be at CHEP.

from podio.

wdconinc avatar wdconinc commented on June 28, 2024

@lkosarz @c-dilks Can you add a more reproducible example, maybe connected with a fake PR that modifies tests/read-multiple.cpp to use ROOTFrameReader, if that reproduces the issue?

from podio.

lkosarz avatar lkosarz commented on June 28, 2024

I added a test example with the modified version of podio tests. This crashes even with a simple data type.
Just run:
make
./write
./read
testROOTFrameReader.zip

from podio.

tmadlener avatar tmadlener commented on June 28, 2024

Thanks for providing a reproducer. We will have a look ASAP.

from podio.

tmadlener avatar tmadlener commented on June 28, 2024

I just had a look and this is

  • a problem in the API usage of the ROOTFrameReader (which is entirely undocumented, so also technically a bug)
  • and a genuine bug that needs fixing

API usage issue

In the reproducer you have

auto reader = podio::ROOTFrameReader{};
reader.openFile("example_frame1.root");
reader.openFile("example_frame2.root");
reader.openFile("example_frame3.root");

Instead the correct usage would be to use the openFiles method for this use case and simply pass in the list of files that should be read in one go:

auto reader = podio::ROOTFrameReader{};
reader.openFiles({"example_frame1.root", "example_frame2.root", "example_frame3.root"});

(or pass a std::vector<std::string> instead of building it on the fly)

Internal bug

There is an additional bug inside ROOTFrameReader::readEventMetaData that is only triggered with multiple files, but that is in the end easy to fix by properly handling the switching of files in the TChain.

from podio.

lkosarz avatar lkosarz commented on June 28, 2024

Thank you! My initial test was with openFiles() and passing of a pre-defined vector, so not on the fly. I did see the same crash happening in both openFiles() and multiple openFile() cases. I did also see memory leaks, but haven't checked it for this standalone code, I sent you. Maybe we should double-check for these too.

from podio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.