There is an error when opening root file

ROOT Version: 6.28.04
Platform: Window 11

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

I’m a newbie in Root, I hope anyone can help me to fix the error. Thank you in advance.
Best regards

Hi,

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.

I hope this helps!

Cheers,
Danilo

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.

Hi,

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?

Best,
Danilo

Dear Danilo,
Thank you for your enthusiasm. Here is my files test3.B11_2MeV_2000F_1E12

Hi Hung,

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.

Cheers,
Hoa.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.