Hi all,
I have an output file in root format exported from Geant4.
When I opened it, the root showed some errors. It shows: Error in TFile::Init: file output.root has an incorrect header length (182) or incorrect end of file length (180) (TFile *) nullptr
This is not necessarily a ROOT issue: it could be that the file you are dealing with is corrupted for some reason (perhaps due to some synchronisation issue? I see you are using OneDrive).
I guess the best course of action is that you verify the origin of this file, eventually re-produce it, check if the cause is really ROOT and report back.
Dear @Danilo
Thank you for your response.
I tried to copy the output.root file to the Download folder on my computer. I tried to open it again, but it showed the same error.
I am sorry the issue persists. I am not sure how we can help though: the file seems corrupted. Did anybody in your team manage to open it?
Perhaps can you share the file?
I tried to open your file on my Ubuntu laptop and got the same error.
My suggestion is that you ask the person who created the file to re-upload it to one drive. As Danilo suggested, the file might be corrupted.
You should also ask for the version of ROOT used to create this root file.