Problem with TTree::Write() with root_5.28/00

Dear Philippe,

Please note that I can compile and run my library “xps.so” w/o any problems from within ROOT,
independent of the root version used, root_5.28/00, root_5.27/04, or earlier versions.

The problem appears only when I compile “xps.so” as part of my R/Bioconductor package “xps”.

To explain my problem with root_5.28/00 I will describe three scenarios for my package “xps”:

1, root_5.27/04:
Since more than two years “xps” can be downloaded from Bioconductor, see:
bioconductor.org/help/bioc-views … l/xps.html

This means that users can run “xps” from within the “R” environment, i.e. “R” loads the compiled
library “xps.so” which is based on ROOT and thus starts ROOT. Thus, from within “R” users can
create root TFiles and write TTrees to the root files and/or read data from TTrees into R. Until
now this has worked w/o any problems.

The current version of “xps” uses root_5.27/04, which is installed on all Bioconductor servers:
bioconductor.org/checkResults/2. … ldbin.html

2, root_5.28/00:
For the upcoming Bioconductor version 2.8, which will appear in April 2011, I would like to
replace the currently used version root_5.27/04 with the new production version root_5.28/00.

However, when I compile “xps” with root_5.28/00 and try to run “xps” from within “R”, it crashes
"R" immediately. When testing my code I could identify the line where the crash appears as the
one where I call: tree->Write("", TObject::kOverwrite, 32000)

3, root_5.28/00 debug version:
After setting “Root.Debug: 1” I could also use the debug version of root_5.28/00 to run “xps"
from within “R”. Interestingly (and to my large disappointment) I could run “xps” from within
"R” w/o any problems when using the debug version.

My question now is:

  • What has changed between root_5.27/04 and root_5.28/00 so that I can no longer write trees
    to root files when running “xps” from within “R”.?

  • Did the memory management change when writing trees to root files?

Best regards
Christian

[quote]- What has changed between root_5.27/04 and root_5.28/00 so that I can no longer write trees
to root files when running “xps” from within “R”.?[/quote]Well, I don’t know precisely :slight_smile:. We have optimized the internal algorithms used by TTree::Write, without more information I can not guess

[quote]- Did the memory management change when writing trees to root files?
[/quote]Not that I can remember.

[quote] When testing my code I could identify the line where the crash appears as the
one where I call: tree->Write("", TObject::kOverwrite, 32000)[/quote]Where you able to run with gdb to get a better stack trace? When running with gDebug == 1, did you see more precisely in which part of the I/O it happened?

Philippe.

Dear Philippe,

Thank you for your reply.

Regarding your question, as I have described in scenario 3, the problem is that when running
with gDebug == 1 there is no crash! Thus it is impossible for me to find out in which part of
the I/O the crash happened.

Best regards
Christian

Hi Christian,

Does the problem also disappear when running with gdb?

Philippe.

I don’t know since I did not try gdb yet. I will try to run gdb, but it will take some time.

Best regards
Christian