Skip to content

Frozen TTreeReaderArray #21440

@matLogh

Description

@matLogh

Check duplicate issues.

  • Checked for duplicates

Description

Hi all,
I encountered system-depended issue when trying to read a bit strangely defined tree

Int_t nb;
UShort_t boardId[100];

tree->Branch("nb", &nb, "nb/I");
tree->Branch("boardId", boardId, "board[nb]/s");

e.i. when the name of the branch is different from the single variable name in the leaflist. For such branch the default TSelector does not create properly named TTreeReaderArray, it fails in runtime. The one definition that works is

TTreeReaderArray<UShort_t> board = {fReader, "boardId.board"};

Problem is - on some systems the code freeze when trying to access the value pointed at by the reader or getting the size of the array.

Problem encountered with:
Almalinux 9.7 5.14.0-570.37.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 26 10:33:12 EDT 2025 x86_64 x86_64 x86_64 GNU/Linux; ROOT version 6.36.06
Debian 12 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025 x86_64 GNU/Linux; ROOT version 6.36.08

Where it works/does not freeze:
Debian 12 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u5 (2019-08-11) x86_64 GNU/Linux; ROOT version 6.36.08

Reproducer

Minimal reproducer using TSelector
https://github.com/matLogh/rootbug_ttreereaderarray

ROOT version

tested with 6.36.06 and 6.36.08

Installation method

build from source (all listed)

Operating system

Debian 12, Debian 12(WSL) and AlmaLinux

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions