# Unknown Class,null pointer

**URL:** <https://root-forum.cern.ch/t/unknown-class-null-pointer/55268>\
**Category:** Newbie\
**Tags:** root\
**Created:** [June 12, 2023, 7:07pm UTC](https://root-forum.cern.ch/t/unknown-class-null-pointer/55268 "2023-06-12T19:07:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adityalal](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/8e8cbc/32.png) [@Adityalal](https://root-forum.cern.ch/u/Adityalal)\
**Post date:** [June 12, 2023, 7:07pm UTC](https://root-forum.cern.ch/t/unknown-class-null-pointer/55268/1 "2023-06-12T19:07:25Z")

</div>

\_ROOT Version: 6.26/10  
\_Platform: Ubuntu 20.04.5 LTS  
\_Compiler: gcc

I am trying to open a file using root, when i open it using TBrowser, it gives the following warning/error

root [1] Error in TKey::ReadObjWithBuffer: Unknown class $� \*�!!  
Info in TFile::GetStreamerInfoList: cannot find the StreamerInfo record in file pain.root  
(TFile \*) 0x558ca1fed010

but allows me access to the plots.

however when i use the following command in terminal using root

root [1] std::unique\_ptr myFile( TFile::Open(“pain.root”));  
Error in TKey::ReadObjWithBuffer: Unknown class $� \*�!!  
Info in TFile::GetStreamerInfoList: cannot find the StreamerInfo record in file pain.root  
root [2] myFile  
(std::unique\_ptr &) std::unique\_ptr → nullptr

i am left with a null pointer

Since TBrowser Can access the file, there must be someway for me to access.

The file has many trees and i want to write a small script to make it easy for me to get some particular plots.

Thanks

P.S. Sorry for any lack of information, i am new to this software and community.

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [June 12, 2023, 7:42pm UTC](https://root-forum.cern.ch/t/unknown-class-null-pointer/55268/2 "2023-06-12T19:42:37Z")

</div>

The file seems corrupted. Try:

```auto
root.exe -b -l -q pain.root -e 'gFile->ls();'

```

---

<div class="post-metadata">

**Author:** ![Adityalal](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/8e8cbc/32.png) [@Adityalal](https://root-forum.cern.ch/u/Adityalal)\
**Post date:** [June 13, 2023, 1:34am UTC](https://root-forum.cern.ch/t/unknown-class-null-pointer/55268/3 "2023-06-13T01:34:21Z")

</div>

![pain_1](https://root-forum.cern.ch/uploads/default/original/3X/7/8/78f93cdd79784557b22fec34ae4b0d0907616f6e.png)  
I got this, still showing the earlier exception :

Error in : Trying to dereference null pointer or trying to call routine taking non-null arguments.  
Execution of your code was aborted.

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [June 13, 2023, 5:25pm UTC](https://root-forum.cern.ch/t/unknown-class-null-pointer/55268/4 "2023-06-13T17:25:30Z")

</div>

Alright. The file is very corrupted and not recoverable. How did you produce it?
