Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jana::omni::JComponent m_app and GetApplication() are nullptr #344

Open
DraTeots opened this issue Aug 20, 2024 · 2 comments
Open

jana::omni::JComponent m_app and GetApplication() are nullptr #344

DraTeots opened this issue Aug 20, 2024 · 2 comments

Comments

@DraTeots
Copy link
Collaborator

DraTeots commented Aug 20, 2024

If you execute simple JANA application like:

int main() {

    //create_hits_file();

    JApplication app;   
    app.Add(new PodioWriteProcessor);
    ...
    app.Run();

    //verify_clusters_file();
}

At PodioWriteProcessor::Init(), m_app and GetApplication() returns nullptr crashing stuff around. Like DoInitialize is doomed and etc.

    // TODO: Deprecate
    explicit JEventProcessor(JApplication* app) {     // <= this still works
@DraTeots DraTeots changed the title jana::omni::JComponent m_app is null and GetApplication() returns nullptr jana::omni::JComponent m_app and GetApplication() are nullptr Aug 20, 2024
@nathanwbrei
Copy link
Collaborator

Can't reproduce. The JApplication pointer gets set in JComponentManager::preinitialize_components(). Can you send me a link to your code so I can figure out what's going on?

@DraTeots
Copy link
Collaborator Author

As I understood it. The main idea to get nullptr is to have a single monolith executable application without any plugins where you have JApplication initialized in main (as above) and run it without any flags. I will try to provide a clean reproducer. I am using 2.3.1 tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants