# The rootrc key TFile.v630forwardCompatibility does not work correctly

**URL:** <https://root-forum.cern.ch/t/the-rootrc-key-tfile-v630forwardcompatibility-does-not-work-correctly/61636>\
**Category:** ROOT\
**Tags:** bug\
**Created:** [September 11, 2024, 8:47am UTC](https://root-forum.cern.ch/t/the-rootrc-key-tfile-v630forwardcompatibility-does-not-work-correctly/61636 "2024-09-11T08:47:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tangzhch](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/tangzhch/32/37394_2.png) [@tangzhch](https://root-forum.cern.ch/u/tangzhch)\
**Post date:** [September 11, 2024, 8:47am UTC](https://root-forum.cern.ch/t/the-rootrc-key-tfile-v630forwardcompatibility-does-not-work-correctly/61636/1 "2024-09-11T08:47:45Z")

</div>

* * *

_Please read [tips for efficient and successful posting](https://root-forum.cern.ch/t/tips-for-efficient-and-successful-posting/28292) and [posting code](https://root-forum.cern.ch/t/posting-code-read-this-first/28293)_

### Describe the bug

The setup of `TFile.v630forwardCompatibility` key in rootrc does not work correctly.  
It should enable globally the compatibility flag for all files for writing. However it have no effect for new file, only for updating file.

### Expected behavior

It should enable globally the compatibility flag for all files for writing in ROOT.

### To Reproduce

1. Put `TFile.v630forwardCompatibility: true` in ~/.rootrc
2. Create a new file in root, save.
3. Open the file in another root session (e.g. version 6.26)
4. The new root session crashed.

### Setup

```auto
ROOT v6.32.02
Built for linuxx8664gcc on Jun 18 2024, 00:00:00
From heads/master@tags/v6-32-02
With g++ (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)
Binary directory: /usr/bin

```

(installed from dnf)

### Additional context

---

<div class="post-metadata">

**Author:** ![mczurylo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mczurylo/32/33269_2.png) [@mczurylo](https://root-forum.cern.ch/u/mczurylo)\
**Post date:** [September 11, 2024, 8:56am UTC](https://root-forum.cern.ch/t/the-rootrc-key-tfile-v630forwardcompatibility-does-not-work-correctly/61636/2 "2024-09-11T08:56:24Z")

</div>

Hi @tangzhch,

thank you for this bug report, maybe @pcanal could help here?

Cheers,  
Marta

---

<div class="post-metadata">

**Author:** ![tangzhch](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/tangzhch/32/37394_2.png) [@tangzhch](https://root-forum.cern.ch/u/tangzhch)\
**Post date:** [September 11, 2024, 9:18am UTC](https://root-forum.cern.ch/t/the-rootrc-key-tfile-v630forwardcompatibility-does-not-work-correctly/61636/3 "2024-09-11T09:18:34Z")

</div>

After digging into code, I found that the part reading rootrc key ([root/io/io/src/TFile.cxx at master · root-project/root · GitHub](https://github.com/root-project/root/blob/master/io/io/src/TFile.cxx#L829)) is inside the “update” block ( in the else block of a `if( create )` at [root/io/io/src/TFile.cxx at master · root-project/root · GitHub](https://github.com/root-project/root/blob/master/io/io/src/TFile.cxx#L662) )  
Therefore, it is not apply to newly created file (including `recreate` I guess). That’s why the setting in rootrc does not have any effect.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [September 25, 2024, 9:19am UTC](https://root-forum.cern.ch/t/the-rootrc-key-tfile-v630forwardcompatibility-does-not-work-correctly/61636/4 "2024-09-25T09:19:20Z")

</div>

Closed on September 25, 2024, 9:19am UTC

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

---

<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:** [January 9, 2025, 5:14pm UTC](https://root-forum.cern.ch/t/the-rootrc-key-tfile-v630forwardcompatibility-does-not-work-correctly/61636/5 "2025-01-09T17:14:49Z")

</div>

(remove unintended answer).

Side note: this is issue is not lost and will be investigated further relatively soon.
