Skip to content

[reve] Add chek for empty REveGeoPolyShape and REvePolygonSetProjected#22198

Open
alja wants to merge 1 commit intoroot-project:masterfrom
alja:empty-poly-shape
Open

[reve] Add chek for empty REveGeoPolyShape and REvePolygonSetProjected#22198
alja wants to merge 1 commit intoroot-project:masterfrom
alja:empty-poly-shape

Conversation

@alja
Copy link
Copy Markdown
Contributor

@alja alja commented May 8, 2026

In some cases of REveGeoShapeExtract, an empty REveGeoShape holder is created for the directory structure.

Example:

   auto all = new  ("CMS");
   all->SetRnrSelf(false);
   all->AddElement(tracker);
   all->AddElement(muon);
   all->AddElement(ecal);
   all->AddElement(hcal);

For this case, EveGlu::TriangleCollector::ProcessData() needs the check before accessing the first element.

@alja alja requested a review from linev as a code owner May 8, 2026 22:13
@alja
Copy link
Copy Markdown
Contributor Author

alja commented May 8, 2026

Below is the stack when importing the shape extract with an empty shape:

#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ffff7281f63 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
#2  0x00007ffff7227f3e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff720f6d0 in __GI_abort () at abort.c:77
#4  0x00007ffff740b084 in std::__glibcxx_assert_fail (file=<optimized out>, line=<optimized out>, function=<optimized out>, condition=<optimized out>) at ../../../../../libstdc++-v3/src/c++11/assert_fail.cc:41
#5  0x00007ffff7852c1e in std::vector<double, std::allocator<double> >::operator[] (this=0x7fffcfe8e690, __n=0) at /usr/include/c++/15/bits/stl_vector.h:1282
#6  0x00007fffd72cb1a9 in ROOT::Experimental::EveGlu::TriangleCollector::ProcessData (this=0x7fffcfe8e600, verts=std::vector of length 0, capacity 0, polys=std::vector of length 0, capacity 0, n_polys=0)
    at /home/alja/root-dev/master/root/graf3d/eve7/src/REveGluTess.cxx:181
#7  0x00007fffd730b77c in ROOT::Experimental::REvePolygonSetProjected::BuildRenderData (this=0x9ca78e0) at /home/alja/root-dev/master/root/graf3d/eve7/src/REvePolygonSetProjected.cxx:121
#8  0x00007fffd72ace22 in ROOT::Experimental::REveElement::WriteCoreJson (this=0x9ca78e0, j=..., rnr_offset=1552) at /home/alja/root-dev/master/root/graf3d/eve7/src/REveElement.cxx:1527
#9  0x00007fffd730b2e0 in ROOT::Experimental::REvePolygonSetProjected::WriteCoreJson (this=0x9ca78e0, j=..., rnr_offset=1552) at /home/alja/root-dev/master/root/graf3d/eve7/src/REvePolygonSetProjected.cxx:73
#10 0x00007fffd7320629 in ROOT::Experimental::REveScene::StreamJsonRecurse (this=0x9c87160, el=0x9ca78e0, jarr=...) at /home/alja/root-dev/master/root/graf3d/eve7/src/REveScene.cxx:189
#11 0x00007fffd7320747 in ROOT::Experimental::REveScene::StreamJsonRecurse (this=0x9c87160, el=0x8ea3650, jarr=...) at /home/alja/root-dev/master/root/graf3d/eve7/src/REveScene.cxx:225
#12 0x00007fffd7320747 in ROOT::Experimental::REveScene::StreamJsonRecurse (this=0x9c87160, el=0x9c87160, jarr=...) at /home/alja/root-dev/master/root/graf3d/eve7/src/REveScene.cxx:225
#13 0x00007fffd7320292 in ROOT::Experimental::REveScene::StreamElements (this=0x9c87160) at /home/alja/root-dev/master/root/graf3d/eve7/src/REveScene.cxx:165
#14 0x00007fffd72d9568 in ROOT::Experimental::REveManager::WindowConnect (this=0x622f2c0, connid=1) at /home/alja/root-dev/master/root/graf3d/eve7/src/REveManager.cxx:780

@alja
Copy link
Copy Markdown
Contributor Author

alja commented May 8, 2026

@linev Please check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant