# Error while migrating from root 5 to root 6

**URL:** <https://root-forum.cern.ch/t/error-while-migrating-from-root-5-to-root-6/39617>\
**Category:** Newbie\
**Created:** [May 27, 2020, 6:31am UTC](https://root-forum.cern.ch/t/error-while-migrating-from-root-5-to-root-6/39617 "2020-05-27T06:31:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sabya](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@Sabya](https://root-forum.cern.ch/u/Sabya)\
**Post date:** [May 27, 2020, 6:31am UTC](https://root-forum.cern.ch/t/error-while-migrating-from-root-5-to-root-6/39617/1 "2020-05-27T06:31:02Z")

</div>

While migrating my code from root 5 to root 6 i am getting an error on TContainer which it was not giving on root5 and the code was running perfectly on root5. Please help anyone how to debug this error.  
Attached is the error shown.

 ![errora](https://root-forum.cern.ch/uploads/default/original/3X/6/f/6fc3d209cc78c9eeb4895bdf61fa3c06d2a54413.png)

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 27, 2020, 6:41am UTC](https://root-forum.cern.ch/t/error-while-migrating-from-root-5-to-root-6/39617/2 "2020-05-27T06:41:59Z")

</div>

Cling (the ROOT 6 C++ interpreter) is real C++. You may get errors which were ignored by CINT (the ROOT 5 C++ interpreter). In this particular case it seems your code creates twice the same object.

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [May 27, 2020, 8:16am UTC](https://root-forum.cern.ch/t/error-while-migrating-from-root-5-to-root-6/39617/3 "2020-05-27T08:16:50Z")

</div>

Hi @Sabya,  
welcome to the ROOT forum. Besides what @couet mentioned, from the stacktrace it seems that your code calls `AliAnalysisDataContainer::GetType` with an null `entry` argument, which might be problematic. The crash happens in that function, at line 233 of file `AliAnalysisDataContainer`, which is indirectly called from your application (you can follow the chain of call through the stacktrace).

I hope this helps!  
Enrico

---

<div class="post-metadata">

**Author:** ![Sabya](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@Sabya](https://root-forum.cern.ch/u/Sabya)\
**Post date:** [May 27, 2020, 5:51pm UTC](https://root-forum.cern.ch/t/error-while-migrating-from-root-5-to-root-6/39617/4 "2020-05-27T17:51:12Z")

</div>

Thanks to both of you but i searched the code but could not find the error. It would be very helpful if you kindly have a look over this attached macro where only the DataContainer class is called and point out the error.

[AddTaskKStarpPbRunII\_ROOT6.C](https://root-forum.cern.ch/uploads/short-url/dFdTr9CXXWN6GZbz0f6jewzlnHQ.C) (15.5 KB)

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [May 28, 2020, 7:58am UTC](https://root-forum.cern.ch/t/error-while-migrating-from-root-5-to-root-6/39617/5 "2020-05-28T07:58:56Z")

</div>

Hi @Sabya,  
unfortunately I cannot run your code as I am missing the required dependencies.

The full stacktrace printed at the point of crash should indicate the offending line precisely. You can also inspect what’s going on using [gdb](http://www.gdbtutorial.com/), e.g. with `gdb --args root.exe ` (note the usage of `root.exe` rather than `root` to execute the macro). Alternatively, you can ask for help from the developers of the specific analysis framework you are using (AliRoot), which is where the crash happens.

I’m sorry we cannot be of more help – unfortunately the crash is dependent on AliRoot/your code rather than ROOT itself.

Cheers,  
Enrico

---

<div class="post-metadata">

**Author:** ![Sabya](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@Sabya](https://root-forum.cern.ch/u/Sabya)\
**Post date:** [May 30, 2020, 2:47am UTC](https://root-forum.cern.ch/t/error-while-migrating-from-root-5-to-root-6/39617/6 "2020-05-30T02:47:42Z")

</div>

thanks the problem is solved
