I am getting following error when i want to do 3D projection on fully filled THnSparse object
$ root m.C
root [0]
Processing m.C...
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
/usr/include/c++/15/bits/stl_vector.h:1262: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = double; _Alloc = std::allocator<double>; reference = double&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Macro is here
void m() {
Int_t point[3] = {1, 1, 1};
Int_t bins[3] = {1, 1, 2};
Double_t mins[3] = {0, 0, 0};
Double_t maxs[3] = {10, 10, 10};
THnSparse *s = new THnSparseC("s", "sss", 3, bins, mins, maxs);
s->SetBinContent(s->GetBin(point), 1);
point[0] = 1;
point[1] = 1;
point[2] = 2;
// comment this line and it will work ok.
s->SetBinContent(s->GetBin(point), 1);
s->Projection(0, 1, 2)->Draw();
}
ROOT Version: 6.34.06
Platform: linuxx8664gcc
Compiler: g++ (GCC) 15.0.1 20250228 (Red Hat 15.0.1-0)