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

[BUG] Segmentation fault at the end of run #161

Open
kreczko opened this issue May 20, 2015 · 4 comments
Open

[BUG] Segmentation fault at the end of run #161

kreczko opened this issue May 20, 2015 · 4 comments
Labels
Milestone

Comments

@kreczko
Copy link
Member

kreczko commented May 20, 2015

At the moment it seems that there is a segmentation fault at the end of running the software.
This looks like a null pointer is being dereferenced in one of the destructors.

The problem can be reproduced by running test/TestBinnedVariableAnalyser.cpp which is part of the unit tests. It is only seen when running the executable itself (AnalysisSoftware_test) and not when executing make test.

Based on the involved classes the error is either located in HistogramManager or Binned_variable_analyser.

@kreczko kreczko added the bug label May 20, 2015
@kreczko
Copy link
Member Author

kreczko commented May 20, 2015

The problem lies with

boost::shared_ptr<TFile> file(new TFile("TestROOT.root", "RECREATE"));

The TFile pointer is deleted before the shared_ptr gets its chance to delete it.

@kreczko
Copy link
Member Author

kreczko commented Jun 4, 2015

However, once the TFile problem was fixed, a new one appeared.
This time it is in the destructor of TEfficiency.

@EmyrClement
Copy link
Contributor

How was the problem fixed?

@kreczko
Copy link
Member Author

kreczko commented Jun 15, 2015

By leaving out 'Close()' and letting the TFile destructor do the work.
I have the feeling I should change how we use Globals in order to fix the problem (e.g. make it a SingleTon).
I will try to introduce the new model as BAT::Setup sometime next week.

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

No branches or pull requests

2 participants