Dear all,
I recently managed to dump into a gdml file a very simple geometry using Geant4, mainly boxes made of silicon. For doing that I used the gdml parser G4GDMLParser with its function, fParser.Write(fWriteFile,fWorldPhysVol). The gdml file is attached (I changed the extension to gdml.cc because the forum gave an error with invalid file extension).
I reinstalled ROOT enabling opengl and gdml (–enable-opengl --enable-gdml). I then tried to visualize the geometry using with ROOT using the TGeoManager class as described in this web page,
root.cern.ch/svn/root/trunk/geom/gdml/README
I did as follows,
$ root -l
TGeoManager::Import(“run35704.cfg.gdml”);
This seems to work,
Info in TGeoManager::Import: Reading geometry from file: run35704.cfg.gdml
Info in TGeoManager::TGeoManager: Geometry GDMLImport, Geometry imported from GDML created
Error in TGeoElementTable::AddIsotope: Isotope with the same name: H1 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: H2 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: Si28 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: Si29 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: Si30 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: H1 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: H2 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: Si28 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: Si29 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: Si30 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: H1 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: H2 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: Si28 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: Si29 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: Si30 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: H1 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: H2 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: Si28 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: Si29 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: Si30 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: H1 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: H2 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: Si28 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: Si29 already in table. Not adding.
Error in TGeoElementTable::AddIsotope: Isotope with the same name: Si30 already in table. Not adding.
Info in TGeoManager::SetTopVolume: Top volume is World. Master volume is World
Info in TGeoNavigator::BuildCache: — Maximum geometry depth set to 100
Info in TGeoManager::CheckGeometry: Fixing runtime shapes…
Info in TGeoManager::CheckGeometry: …Nothing to fix
Info in TGeoManager::CloseGeometry: Counting nodes…
Info in TGeoManager::Voxelize: Voxelizing…
Info in TGeoManager::CloseGeometry: Building cache…
Info in TGeoManager::CountLevels: max level = 1, max placements = 18
Info in TGeoManager::CloseGeometry: 19 nodes/ 4 volume UID’s in Geometry imported from GDML
Info in TGeoManager::CloseGeometry: ----------------modeler ready----------------
This seems to work OK, but when I do
gGeoManager->GetTopVolume()->Draw(“ogl”);
I get a *** Break *** segmentation violation error.
===========================================================
There was a crash.
This is the entire stack trace of all threads:
from libstdcxx.v6.printers import register_libstdcxx_printers
#0 0x00007fbd95fbab4c in __libc_waitpid (pid=9241, stat_loc=stat_loc
entry=0x7ffeb1e16e80, options=options
entry=0) at …/sysdeps/unix/sysv/linux/waitpid.c:31
#1 0x00007fbd95f402e2 in do_system (line=) at …/sysdeps/posix/system.c:148
#2 0x00007fbd96e84bf3 in TUnixSystem::StackTrace() () from /home/aperez/root/lib/libCore.so
#3 0x00007fbd96e868dc in TUnixSystem::DispatchSignals(ESignals) () from /home/aperez/root/lib/libCore.so
#4
#5 do_lookup_x (new_hash=new_hash
entry=3787834677, old_hash=old_hash
entry=0x7ffeb1e196c0, result=result
entry=0x7ffeb1e196d0, scope=, i=i
entry=0, flags=flags
entry=2, skip=skip
entry=0x0, undef_map=undef_map
entry=0x135fa50) at dl-lookup.c:98
#6 0x00007fbd97616991 in _dl_lookup_symbol_x (undef_name=0x1236af0 “G__SetCCintApiPointers”, undef_map=0x135fa50, ref=0x7ffeb1e197b0, symbol_scope=0x135fdd8, version=0x0, type_class=0, flags=2, skip_map=0x0) at dl-lookup.c:737
#7 0x00007fbd96030416 in do_sym (handle=0x135fa50, name=0x1236af0 “G__SetCCintApiPointers”, who=, vers=vers
entry=0x0, flags=flags
entry=2) at dl-sym.c:168
#8 0x00007fbd960308fd in _dl_sym (handle=, name=, who=) at dl-sym.c:273
#9 0x00007fbd9515e144 in dlsym_doit (a=a
entry=0x7ffeb1e199c0) at dlsym.c:50
#10 0x00007fbd9761bff4 in _dl_catch_error (objname=0x1055eb0, errstring=0x1055eb8, mallocedp=0x1055ea8, operate=0x7fbd9515e130 <dlsym_doit>, args=0x7ffeb1e199c0) at dl-error.c:187
#11 0x00007fbd9515e62d in _dlerror_run (operate=operate
entry=0x7fbd9515e130 <dlsym_doit>, args=args
entry=0x7ffeb1e199c0) at dlerror.c:163
#12 0x00007fbd9515e198 in __dlsym (handle=, name=) at dlsym.c:70
#13 0x00007fbd954c896a in G__shl_findsym () from /home/aperez/root/lib/libCint.so
#14 0x00007fbd954c8cd1 in G__SetCintApiPointers () from /home/aperez/root/lib/libCint.so
#15 0x00007fbd954ccb0c in G__shl_load () from /home/aperez/root/lib/libCint.so
#16 0x00007fbd95447734 in G__loadfile () from /home/aperez/root/lib/libCint.so
#17 0x00007fbd954c86d6 in G__loadsystemfile () from /home/aperez/root/lib/libCint.so
#18 0x00007fbd96e4743d in TCint::Load(char const*, bool) () from /home/aperez/root/lib/libCore.so
#19 0x00007fbd96e137ce in TSystem::Load(char const*, char const*, bool) () from /home/aperez/root/lib/libCore.so
#20 0x00007fbd96df7457 in TROOT::LoadClass(char const*, char const*, bool) () from /home/aperez/root/lib/libCore.so
#21 0x00007fbd96e48cfe in TCint::AutoLoad(char const*) () from /home/aperez/root/lib/libCore.so
#22 0x00007fbd96df6b13 in TROOT::LoadClass(char const*, bool) const () from /home/aperez/root/lib/libCore.so
#23 0x00007fbd96de1630 in TPluginHandler::LoadPlugin() () from /home/aperez/root/lib/libCore.so
#24 0x00007fbd96db51ba in TApplication::InitializeGraphics() () from /home/aperez/root/lib/libCore.so
#25 0x00007fbd96e1386a in TSystem::Load(char const*, char const*, bool) () from /home/aperez/root/lib/libCore.so
#26 0x00007fbd96df7457 in TROOT::LoadClass(char const*, char const*, bool) () from /home/aperez/root/lib/libCore.so
#27 0x00007fbd96e48c43 in TCint::AutoLoad(char const*) () from /home/aperez/root/lib/libCore.so
#28 0x00007fbd96df6b13 in TROOT::LoadClass(char const*, bool) const () from /home/aperez/root/lib/libCore.so
#29 0x00007fbd96de1630 in TPluginHandler::LoadPlugin() () from /home/aperez/root/lib/libCore.so
#30 0x00007fbd9359e31f in TGeoManager::GetGeomPainter() () from /home/aperez/root/lib/libGeom.so
#31 0x00007fbd93604855 in TGeoVolume::Draw(char const*) () from /home/aperez/root/lib/libGeom.so
#32 0x00007fbd97035238 in G__G__Base2_10_0_15(G__value*, char const*, G__param*, int) () from /home/aperez/root/lib/libCore.so
#33 0x00007fbd953ad88d in Cint::G__ExceptionWrapper(int ()(G__value, char const*, G__param*, int), G__value*, char*, G__param*, int) () from /home/aperez/root/lib/libCint.so
#34 0x00007fbd95451757 in G__execute_call () from /home/aperez/root/lib/libCint.so
#35 0x00007fbd95451b15 in G__call_cppfunc () from /home/aperez/root/lib/libCint.so
#36 0x00007fbd95431087 in G__interpret_func () from /home/aperez/root/lib/libCint.so
#37 0x00007fbd9541e9b1 in G__getfunction () from /home/aperez/root/lib/libCint.so
#38 0x00007fbd95504d55 in G__getstructmem(int, G__FastAllocString&, char*, int, char*, int*, G__var_array*, int) () from /home/aperez/root/lib/libCint.so
#39 0x00007fbd954fc28a in G__getvariable () from /home/aperez/root/lib/libCint.so
#40 0x00007fbd95504d1a in G__getstructmem(int, G__FastAllocString&, char*, int, char*, int*, G__var_array*, int) () from /home/aperez/root/lib/libCint.so
#41 0x00007fbd954fc28a in G__getvariable () from /home/aperez/root/lib/libCint.so
#42 0x00007fbd953f8a69 in G__getitem () from /home/aperez/root/lib/libCint.so
#43 0x00007fbd953fe3e5 in G__getexpr () from /home/aperez/root/lib/libCint.so
#44 0x00007fbd95480563 in G__exec_statement () from /home/aperez/root/lib/libCint.so
#45 0x00007fbd953e5371 in G__exec_tempfile_core () from /home/aperez/root/lib/libCint.so
#46 0x00007fbd953e68be in G__exec_tempfile_fp () from /home/aperez/root/lib/libCint.so
#47 0x00007fbd9548b171 in G__process_cmd () from /home/aperez/root/lib/libCint.so
#48 0x00007fbd96e4e070 in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /home/aperez/root/lib/libCore.so
#49 0x00007fbd96db5e02 in TApplication::ProcessLine(char const*, bool, int*) () from /home/aperez/root/lib/libCore.so
#50 0x00007fbd96a09059 in TRint::HandleTermInput() () from /home/aperez/root/lib/libRint.so
#51 0x00007fbd96e860c5 in TUnixSystem::CheckDescriptors() () from /home/aperez/root/lib/libCore.so
#52 0x00007fbd96e86bca in TUnixSystem::DispatchOneEvent(bool) () from /home/aperez/root/lib/libCore.so
#53 0x00007fbd96e0cd26 in TSystem::InnerLoop() () from /home/aperez/root/lib/libCore.so
#54 0x00007fbd96e0d930 in TSystem::Run() () from /home/aperez/root/lib/libCore.so
#55 0x00007fbd96db495f in TApplication::Run(bool) () from /home/aperez/root/lib/libCore.so
#56 0x00007fbd96a0a28e in TRint::Run(bool) () from /home/aperez/root/lib/libRint.so
#57 0x0000000000400fec in main ()
The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
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 do_lookup_x (new_hash=new_hash
entry=3787834677, old_hash=old_hash
entry=0x7ffeb1e196c0, result=result
entry=0x7ffeb1e196d0, scope=, i=i
entry=0, flags=flags
entry=2, skip=skip
entry=0x0, undef_map=undef_map
entry=0x135fa50) at dl-lookup.c:98
#6 0x00007fbd97616991 in _dl_lookup_symbol_x (undef_name=0x1236af0 “G__SetCCintApiPointers”, undef_map=0x135fa50, ref=0x7ffeb1e197b0, symbol_scope=0x135fdd8, version=0x0, type_class=0, flags=2, skip_map=0x0) at dl-lookup.c:737
#7 0x00007fbd96030416 in do_sym (handle=0x135fa50, name=0x1236af0 “G__SetCCintApiPointers”, who=, vers=vers
entry=0x0, flags=flags
entry=2) at dl-sym.c:168
#8 0x00007fbd960308fd in _dl_sym (handle=, name=, who=) at dl-sym.c:273
#9 0x00007fbd9515e144 in dlsym_doit (a=a
entry=0x7ffeb1e199c0) at dlsym.c:50
#10 0x00007fbd9761bff4 in _dl_catch_error (objname=0x1055eb0, errstring=0x1055eb8, mallocedp=0x1055ea8, operate=0x7fbd9515e130 <dlsym_doit>, args=0x7ffeb1e199c0) at dl-error.c:187
#11 0x00007fbd9515e62d in _dlerror_run (operate=operate
entry=0x7fbd9515e130 <dlsym_doit>, args=args
entry=0x7ffeb1e199c0) at dlerror.c:163
#12 0x00007fbd9515e198 in __dlsym (handle=, name=) at dlsym.c:70
Do any of you guys knows what is going on?
Many thanks,
Alejandro
run35704.cfg.Pl3DUT.gdml.cc (20.1 KB)