-
Notifications
You must be signed in to change notification settings - Fork 1.5k
TGDMLParse::Tessellated handling of "type" attribute (not added with G4 10.5 export) #6868
Description
- Checked for duplicates: No duplicated found
Issue also reported here:
https://root-forum.cern.ch/t/importing-and-visualizing-gdml-with-tessellated-solids/40903
Describe the bug
Exporting a GDML file from GEANT4 (10.5) containing a tessellated object. This tessellated object is defined via vertex1 vertex2 vertex3, but does not add the "type" (absolute/relative) attribute if its in absolute coordinates (not 100% percent sure about this).
Loading this *.gdml file which contains a tessellated object results in a problem since the AddTriangularFacet(bool relative)
is not called due to the missing "type" statement in the if-else statement from TGDMLParse::Tessellated(4247) resulting in invalid boxed (dX/dY/dZ < 0):
Error in <TGeoVolume::SortNodes>: Bounding box not valid
Error in <TGeoVolume::Voxelize>: Bounding box not valid
Error in <TGeoVolume::FindOverlaps>: Bounding box not valid
and a following crash:
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00007fb46acdc46c in waitpid () from /lib64/libc.so.6
#1 0x00007fb46ac59f62 in do_system () from /lib64/libc.so.6
#2 0x00007fb46f5e9524 in TUnixSystem::StackTrace() () from /nfs/mnemosyne/sys/cc7/sw/root/x86-64/6.22.02/system/root/lib/libCore.so
#3 0x00007fb46f5eb1ba in TUnixSystem::DispatchSignals(ESignals) () from /nfs/mnemosyne/sys/cc7/sw/root/x86-64/6.22.02/system/root/lib/libCore.so
#4 <signal handler called>
#5 0x00007fb46db2607d in TViewer3DPad::AddObject(TBuffer3D const&, bool*) () from /nfs/mnemosyne/sys/cc7/sw/root/x86-64/6.22.02/system/root/lib/libGpad.so
#6 0x00007fb451224035 in TGeoPainter::PaintShape(TGeoShape const&, char const*) const () from /nfs/mnemosyne/sys/cc7/sw/root/x86-64/6.22.02/system/root/lib/libGeomPainter.so
#7 0x00007fb4512261ad in TGeoPainter::PaintVolume(TGeoVolume*, char const*, TGeoMatrix*) () from /nfs/mnemosyne/sys/cc7/sw/root/x86-64/6.22.02/system/root/lib/libGeomPainter.so
#8 0x00007fb451224a01 in TGeoPainter::Paint(char const*) () from /nfs/mnemosyne/sys/cc7/sw/root/x86-64/6.22.02/system/root/lib/libGeomPainter.so
#9 0x00007fb451222460 in TGeoPainter::DrawVolume(TGeoVolume*, char const*) () from /nfs/mnemosyne/sys/cc7/sw/root/x86-64/6.22.02/system/root/lib/libGeomPainter.so
#10 0x0000000000400a94 in main ()
===========================================================
The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum http://root.cern.ch/forum
Only if you are really convinced it is a bug in ROOT then please submit a
report at http://root.cern.ch/bugs Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5 0x00007fb46db2607d in TViewer3DPad::AddObject(TBuffer3D const&, bool*) () from /nfs/mnemosyne/sys/cc7/sw/root/x86-64/6.22.02/system/root/lib/libGpad.so
#6 0x00007fb451224035 in TGeoPainter::PaintShape(TGeoShape const&, char const*) const () from /nfs/mnemosyne/sys/cc7/sw/root/x86-64/6.22.02/system/root/lib/libGeomPainter.so
#7 0x00007fb4512261ad in TGeoPainter::PaintVolume(TGeoVolume*, char const*, TGeoMatrix*) () from /nfs/mnemosyne/sys/cc7/sw/root/x86-64/6.22.02/system/root/lib/libGeomPainter.so
#8 0x00007fb451224a01 in TGeoPainter::Paint(char const*) () from /nfs/mnemosyne/sys/cc7/sw/root/x86-64/6.22.02/system/root/lib/libGeomPainter.so
#9 0x00007fb451222460 in TGeoPainter::DrawVolume(TGeoVolume*, char const*) () from /nfs/mnemosyne/sys/cc7/sw/root/x86-64/6.22.02/system/root/lib/libGeomPainter.so
#10 0x0000000000400a94 in main ()
===========================================================
Expected behavior
Loading of the *.GDML file without issues - default behaviour for non-existing "type" argument
To Reproduce
- Create a GDML file with G4 (10.5) containing a tessellated object
- Importing it with ROOT TGeoManager::Import()
Setup
- ROOT version: 6.22.02
- Operating system: CC7
- How you obtained ROOT: built myself
Additional context
I add an example *gdml file with the missing "type" attribute in the tessellated object. The CAD part are here the simple "Cubes" for testing - tiny things at the very front. Don't get confused by the "normal" G4 geometry "TPC' object in the center
withTessCAD.gdml.zip