# Segmentation violation during Snapshot() of an existing tree using RDataFrame

**URL:** <https://root-forum.cern.ch/t/segmentation-violation-during-snapshot-of-an-existing-tree-using-rdataframe/54928>\
**Category:** ROOT\
**Tags:** tree, rdataframe, python, root\
**Created:** [May 18, 2023, 2:33pm UTC](https://root-forum.cern.ch/t/segmentation-violation-during-snapshot-of-an-existing-tree-using-rdataframe/54928 "2023-05-18T14:33:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![vpadulan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vpadulan/32/25315_2.png) [@vpadulan](https://root-forum.cern.ch/u/vpadulan)\
**Post date:** [May 19, 2023, 7:54am UTC](https://root-forum.cern.ch/t/segmentation-violation-during-snapshot-of-an-existing-tree-using-rdataframe/54928/2 "2023-05-19T07:54:49Z")

</div>

Dear @apetukho ,

In the same post you mention it is also discussed that it is not possible to update an already existing tree within a file [Is there a way to save dataframe to an already existing root file? - #6 by Karl007](https://root-forum.cern.ch/t/is-there-a-way-to-save-dataframe-to-an-already-existing-root-file/45974/6) .This hasn’t changed meanwhile. But as Enrico suggests in the post, you could create a new tree with the branch you were trying to attach and just use it as a friend tree via `TTree::AddFriend` later on.

Cheers,  
Vincenzo

---

_[View the full topic](https://root-forum.cern.ch/t/segmentation-violation-during-snapshot-of-an-existing-tree-using-rdataframe/54928)._
