Problem 1601 - G4VoxelNavigation::ComputeStep : problem with tessellated solid
Summary: G4VoxelNavigation::ComputeStep : problem with tessellated solid
Status: RESOLVED INVALID
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/solids (show other problems)
Version: 9.6
Hardware: All Linux
: P5 normal
Assignee: tatiana.nikitina
URL: /afs/cern.ch/work/a/andrii/public/For...
Depends on:
Blocks:
 
Reported: 2014-04-02 11:20 CEST by Andrii Tykhonov
Modified: 2014-11-09 18:59 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Andrii Tykhonov 2014-04-02 11:20:42 CEST
Dear Geant4 developers,

I get the following segmentation violation as I run the geant4 simulation. The problem seems to be purely geant4. I have quite complicated detector geometry with quite some tessellated structures. Once I remove the most complicated sub-detector, I get it working ok. The error stack trace is attached below.

Thank you for your time!
Andrii






 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007f1faf641c8e in waitpid () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f1faf5c729e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007f1fb14d8dd7 in TUnixSystem::StackTrace() () from /home/andrii/root/root/lib/libCore.so
#3  0x00007f1fb14db6c3 in TUnixSystem::DispatchSignals(ESignals) () from /home/andrii/root/root/lib/libCore.so
#4  <signal handler called>
#5  0x00007f1fb2984d3c in G4VoxelNavigation::ComputeStep(CLHEP::Hep3Vector const&, CLHEP::Hep3Vector const&, double, double&, G4NavigationHistory&, bool&, CLHEP::Hep3Vector&, bool&, bool&, G4VPhysicalVolume**, int&) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4geometry.so
#6  0x00007f1fb2962b2d in G4Navigator::ComputeStep(CLHEP::Hep3Vector const&, CLHEP::Hep3Vector const&, double, double&) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4geometry.so
#7  0x00007f1fabe17bc0 in G4Transportation::AlongStepGetPhysicalInteractionLength(G4Track const&, double, double, double&, G4GPILSelection*) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4processes.so
#8  0x00007f1fb32fbb49 in G4SteppingManager::DefinePhysicalStepLength() () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4tracking.so
#9  0x00007f1fb32fa1e6 in G4SteppingManager::Stepping() () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4tracking.so
#10 0x00007f1fb3303dcc in G4TrackingManager::ProcessOneTrack(G4Track*) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4tracking.so
#11 0x00007f1fb3531fbf in G4EventManager::DoProcessing(G4Event*) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4event.so
#12 0x00000000004269ec in DmpG4RunManager::ProcessOneEvent (this=0x14d2bc0, i_event=288) at Simulation/DmpSim/src/DmpG4RunManager.cc:18
#13 0x00007f1fb3796675 in G4RunManager::DoEventLoop(int, char const*, int) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4run.so
#14 0x00007f1fb3797d5c in G4RunManager::BeamOn(int, char const*, int) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4run.so
#15 0x00007f1fb379f41c in G4RunMessenger::SetNewValue(G4UIcommand*, G4String) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4run.so
#16 0x00007f1fb214d8b0 in G4UIcommand::DoIt(G4String) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#17 0x00007f1fb2162764 in G4UImanager::ApplyCommand(char const*) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#18 0x00007f1fb213d857 in G4UIbatch::ExecCommand(G4String const&) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#19 0x00007f1fb213ec2b in G4UIbatch::SessionStart() () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#20 0x00007f1fb215e3f3 in G4UImanager::ExecuteMacroFile(char const*) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#21 0x00007f1fb2156f05 in G4UIcontrolMessenger::SetNewValue(G4UIcommand*, G4String) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#22 0x00007f1fb214d8b0 in G4UIcommand::DoIt(G4String) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#23 0x00007f1fb2162764 in G4UImanager::ApplyCommand(char const*) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#24 0x000000000042847c in main (argc=2, argv=0x7ffff50ef4f8) at Simulation/DmpSim/src/DmpSimu.cc:100
===========================================================


The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug 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  0x00007f1fb2984d3c in G4VoxelNavigation::ComputeStep(CLHEP::Hep3Vector const&, CLHEP::Hep3Vector const&, double, double&, G4NavigationHistory&, bool&, CLHEP::Hep3Vector&, bool&, bool&, G4VPhysicalVolume**, int&) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4geometry.so
#6  0x00007f1fb2962b2d in G4Navigator::ComputeStep(CLHEP::Hep3Vector const&, CLHEP::Hep3Vector const&, double, double&) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4geometry.so
#7  0x00007f1fabe17bc0 in G4Transportation::AlongStepGetPhysicalInteractionLength(G4Track const&, double, double, double&, G4GPILSelection*) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4processes.so
#8  0x00007f1fb32fbb49 in G4SteppingManager::DefinePhysicalStepLength() () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4tracking.so
#9  0x00007f1fb32fa1e6 in G4SteppingManager::Stepping() () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4tracking.so
#10 0x00007f1fb3303dcc in G4TrackingManager::ProcessOneTrack(G4Track*) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4tracking.so
#11 0x00007f1fb3531fbf in G4EventManager::DoProcessing(G4Event*) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4event.so
#12 0x00000000004269ec in DmpG4RunManager::ProcessOneEvent (this=0x14d2bc0, i_event=288) at Simulation/DmpSim/src/DmpG4RunManager.cc:18
#13 0x00007f1fb3796675 in G4RunManager::DoEventLoop(int, char const*, int) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4run.so
#14 0x00007f1fb3797d5c in G4RunManager::BeamOn(int, char const*, int) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4run.so
#15 0x00007f1fb379f41c in G4RunMessenger::SetNewValue(G4UIcommand*, G4String) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4run.so
#16 0x00007f1fb214d8b0 in G4UIcommand::DoIt(G4String) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#17 0x00007f1fb2162764 in G4UImanager::ApplyCommand(char const*) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#18 0x00007f1fb213d857 in G4UIbatch::ExecCommand(G4String const&) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#19 0x00007f1fb213ec2b in G4UIbatch::SessionStart() () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#20 0x00007f1fb215e3f3 in G4UImanager::ExecuteMacroFile(char const*) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#21 0x00007f1fb2156f05 in G4UIcontrolMessenger::SetNewValue(G4UIcommand*, G4String) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#22 0x00007f1fb214d8b0 in G4UIcommand::DoIt(G4String) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#23 0x00007f1fb2162764 in G4UImanager::ApplyCommand(char const*) () from /home/andrii/geant4_/geant4.9.6-install/lib/libG4intercoms.so
#24 0x000000000042847c in main (argc=2, argv=0x7ffff50ef4f8) at Simulation/DmpSim/src/DmpSimu.cc:100
===========================================================
Comment 1 Gabriele Cosmo 2014-04-02 11:27:19 CEST
It appears you're trying to run a geometry with tessellated solids through Root, when tessellated solids are not available in Root. Have you discussed this with the Root developers?
Comment 2 Andrii Tykhonov 2014-04-02 11:51:18 CEST
Dear Gabriele,

Sorry if I miss the point, but I don't use ROOT in the simulation. I'm aware of the fact that ROOT doesn't support tessellated solids. This is rather a problem of geant4 geometry navigation. For example, if I apply the same to a much more simpler (but still tessellated) geometry, it works without problems...

Thanks,
Andrii
Comment 3 Gabriele Cosmo 2014-04-02 11:57:59 CEST
Can you please provide a sample of a tessellated solid that fails?
If you have a standalone -Geant4- example where we can reproduce the problem that would help a lot.
Which version of Geant4 are you running on? 9.6.p03 ?  Asking this, as the latest patch includes fixes which affect precision response by tessellated-solids.
Comment 4 Andrii Tykhonov 2014-04-02 14:39:03 CEST
Dear Gabriele,

Please find here the light-weight version of the code to reproduce the bug: 
/afs/cern.ch/work/a/andrii/public/ForGeant4/source.tgz

Instructions for use:
  1) tar -xzf source.tgz
  2) cd Simulation
  3) make  <-- compiles the code and created executable in the $G4WORKDIR/bin directory (it is assumed that you have geant4 with gdml support installed)
  4) cd $G4WORKDIR/bin/Linux-g++/
  5) cp -r [path_with_the_provided_source_code]/Geometry  ./
  6) cp -r [path_with_the_provided_source_code]/test_moun_cosmics_vertical.mac ./
  7) load_gdml test_moun_cosmics_vertical.mac


This will reproduce the bug. There's one caveat however.. I use "scons" utility as a software building tool, which compiles code in the way that I see the stacktrace of the error. If you use "make" utility (GNUmakefile is borrowed from geant4 G01 example), no stacktrace appears, only "Segmentation fault (core dumped)" message. I hope it is possible for you to "turn on" the stacktrace option for the "make" compiler. 

please let me know if experience any problem with the provided example.

Thanks a lot,
Andrii
Comment 5 Gabriele Cosmo 2014-04-03 15:24:36 CEST
Thanks for providing the test.
Can you please let us know exactly which version of Geant4 you're using ?
Have you tried with 9.6.p03 ?
Comment 6 Andrii Tykhonov 2014-04-03 19:19:41 CEST
Dear Gabriele,

I was running geant4 9.6.p02. I will check also with the p03. Did you actually succeed to reproduce the bug, or you think it should not take place in release p03?

Thanks a lot,
Andrii
Comment 7 Gabriele Cosmo 2014-04-07 09:05:44 CEST
Hi Andrii,
please, try out 9.6.p03. There're fixes that may help with the problem you observe. Let us know if it helps!
Cheers, Gabriele
Comment 8 Andrii Tykhonov 2014-04-10 14:46:16 CEST
Dear Gabriele,

Sorry, but even with release 9.6.po3 the problem remains. Just in case, I give a stack trace of error that I get with this release. It seems to completely identical to the one that I get with the previous release (9.6.p02)


Thank you in advance,
Andrii








 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007f127b4a3c8e in waitpid () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f127b42929e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007f127d5bfdd7 in TUnixSystem::StackTrace() () from /home/andrii/root/root/lib/libCore.so
#3  0x00007f127d5c26c3 in TUnixSystem::DispatchSignals(ESignals) () from /home/andrii/root/root/lib/libCore.so
#4  <signal handler called>
#5  0x00007f127e7ddbe8 in G4VoxelNavigation::ComputeStep(CLHEP::Hep3Vector const&, CLHEP::Hep3Vector const&, double, double&, G4NavigationHistory&, bool&, CLHEP::Hep3Vector&, bool&, bool&, G4VPhysicalVolume**, int&) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4geometry.so
#6  0x00007f127e7bbb9d in G4Navigator::ComputeStep(CLHEP::Hep3Vector const&, CLHEP::Hep3Vector const&, double, double&) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4geometry.so
#7  0x00007f1279117030 in G4Transportation::AlongStepGetPhysicalInteractionLength(G4Track const&, double, double, double&, G4GPILSelection*) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4processes.so
#8  0x00007f127f155b49 in G4SteppingManager::DefinePhysicalStepLength() () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4tracking.so
#9  0x00007f127f1541e6 in G4SteppingManager::Stepping() () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4tracking.so
#10 0x00007f127f15ddcc in G4TrackingManager::ProcessOneTrack(G4Track*) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4tracking.so
#11 0x00007f127f38bfbf in G4EventManager::DoProcessing(G4Event*) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4event.so
#12 0x00000000004268f4 in DmpG4RunManager::ProcessOneEvent (this=0x268e240, i_event=314) at Simulation/DmpSim/src/DmpG4RunManager.cc:18
#13 0x00007f127f5f0675 in G4RunManager::DoEventLoop(int, char const*, int) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4run.so
#14 0x00007f127f5f1d5c in G4RunManager::BeamOn(int, char const*, int) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4run.so
#15 0x00007f127f5f941c in G4RunMessenger::SetNewValue(G4UIcommand*, G4String) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4run.so
#16 0x00007f127e2348b0 in G4UIcommand::DoIt(G4String) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#17 0x00007f127e249764 in G4UImanager::ApplyCommand(char const*) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#18 0x00007f127e224857 in G4UIbatch::ExecCommand(G4String const&) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#19 0x00007f127e225c2b in G4UIbatch::SessionStart() () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#20 0x00007f127e2453f3 in G4UImanager::ExecuteMacroFile(char const*) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#21 0x00007f127e23df05 in G4UIcontrolMessenger::SetNewValue(G4UIcommand*, G4String) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#22 0x00007f127e2348b0 in G4UIcommand::DoIt(G4String) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#23 0x00007f127e249764 in G4UImanager::ApplyCommand(char const*) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#24 0x0000000000428238 in main (argc=2, argv=0x7ffff1a0c828) at Simulation/DmpSim/src/DmpSimu.cc:100
===========================================================


The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug 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  0x00007f127e7ddbe8 in G4VoxelNavigation::ComputeStep(CLHEP::Hep3Vector const&, CLHEP::Hep3Vector const&, double, double&, G4NavigationHistory&, bool&, CLHEP::Hep3Vector&, bool&, bool&, G4VPhysicalVolume**, int&) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4geometry.so
#6  0x00007f127e7bbb9d in G4Navigator::ComputeStep(CLHEP::Hep3Vector const&, CLHEP::Hep3Vector const&, double, double&) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4geometry.so
#7  0x00007f1279117030 in G4Transportation::AlongStepGetPhysicalInteractionLength(G4Track const&, double, double, double&, G4GPILSelection*) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4processes.so
#8  0x00007f127f155b49 in G4SteppingManager::DefinePhysicalStepLength() () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4tracking.so
#9  0x00007f127f1541e6 in G4SteppingManager::Stepping() () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4tracking.so
#10 0x00007f127f15ddcc in G4TrackingManager::ProcessOneTrack(G4Track*) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4tracking.so
#11 0x00007f127f38bfbf in G4EventManager::DoProcessing(G4Event*) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4event.so
#12 0x00000000004268f4 in DmpG4RunManager::ProcessOneEvent (this=0x268e240, i_event=314) at Simulation/DmpSim/src/DmpG4RunManager.cc:18
#13 0x00007f127f5f0675 in G4RunManager::DoEventLoop(int, char const*, int) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4run.so
#14 0x00007f127f5f1d5c in G4RunManager::BeamOn(int, char const*, int) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4run.so
#15 0x00007f127f5f941c in G4RunMessenger::SetNewValue(G4UIcommand*, G4String) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4run.so
#16 0x00007f127e2348b0 in G4UIcommand::DoIt(G4String) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#17 0x00007f127e249764 in G4UImanager::ApplyCommand(char const*) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#18 0x00007f127e224857 in G4UIbatch::ExecCommand(G4String const&) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#19 0x00007f127e225c2b in G4UIbatch::SessionStart() () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#20 0x00007f127e2453f3 in G4UImanager::ExecuteMacroFile(char const*) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#21 0x00007f127e23df05 in G4UIcontrolMessenger::SetNewValue(G4UIcommand*, G4String) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#22 0x00007f127e2348b0 in G4UIcommand::DoIt(G4String) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#23 0x00007f127e249764 in G4UImanager::ApplyCommand(char const*) () from /home/andrii/geant4_9.p03/geant4.9.6-install/lib/libG4intercoms.so
#24 0x0000000000428238 in main (argc=2, argv=0x7ffff1a0c828) at Simulation/DmpSim/src/DmpSimu.cc:100
===========================================================


WARNING - Attempt to delete the physical volume store while geometry closed !
WARNING - Attempt to delete the logical volume store while geometry closed !
WARNING - Attempt to delete the solid store while geometry closed !
WARNING - Attempt to delete the region store while geometry closed !
Comment 9 Andrii Tykhonov 2014-04-24 14:43:15 CEST
Dear Geant4 experts,

Is there any update on the status of the problem?

Thanks a lot in advance,
Andrii
Comment 10 tatiana.nikitina 2014-04-24 15:13:43 CEST
Dear Andrii,

Thank you for the message.
I can not compile your test. May be something is missing?
I have following errors when using cmake :

-- Configuring done
CMake Error at CMakeLists.txt:34 (add_executable):
  Cannot find source file:

    load_gdml.cc

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


Thank you in advance,

Best Regards,
Tatiana.
Comment 11 Andrii Tykhonov 2014-04-24 15:23:29 CEST
(In reply to comment #10)
> Dear Andrii,
> 
> Thank you for the message.
> I can not compile your test. May be something is missing?
> I have following errors when using cmake :
> 
> -- Configuring done
> CMake Error at CMakeLists.txt:34 (add_executable):
>   Cannot find source file:
> 
>     load_gdml.cc
> 
>   Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
>   .hxx .in .txx
> 
> 
> Thank you in advance,
> 
> Best Regards,
> Tatiana.


Dear Tatiana,

Could you please compile it with "make" (not "cmake"), it doesnt't work with cmake.. Here are the step-by-step instructions to follow:

  1) tar -xzf source.tgz
  2) cd Simulation
  3) make  <-- compiles the code and created executable in the $G4WORKDIR/bin
directory (it is assumed that you have geant4 with gdml support installed)
  4) cd $G4WORKDIR/bin/Linux-g++/
  5) cp -r [path_with_the_provided_source_code]/Geometry  ./
  6) cp -r [path_with_the_provided_source_code]/test_moun_cosmics_vertical.mac
./
  7) load_gdml test_moun_cosmics_vertical.mac


Please let me know if you still have problems with this..

Thanks!
Andrii
Comment 12 tatiana.nikitina 2014-04-24 17:41:33 CEST
Dear Andrii,

I think that 'load_gdml.cc' is missing in the test.

Could you send me this file?

Thank you,
Tatiana.
Comment 13 Andrii Tykhonov 2014-04-24 18:09:36 CEST
(In reply to comment #12)
> Dear Andrii,
> 
> I think that 'load_gdml.cc' is missing in the test.
> 
> Could you send me this file?
> 
> Thank you,
> Tatiana.


Dear Tatiana,

Sorry, indeed my mistake. Please find the corrected tarball here:
/afs/cern.ch/work/a/andrii/public/ForGeant4/source.tgz

I have also changed the "Simulation" to "load_gdml", i.e. on step 2 do:
 "cd load_gdml" instead of "cd Simulation"

Please let me know if you succeed to compile it..

Thank you!
Andrii
Comment 14 tatiana.nikitina 2014-04-25 14:09:13 CEST
Dear Andrii,

Thank you, now I can run your test.
I used geant4.9.p02 and geant4.9.6.p03.

I don't have crashes, but many of following messages :

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomNav1002
      issued by : G4Navigator::ComputeStep()
Track stuck or not moving.
          Track stuck, not moving for 10 steps
          in volume -kx-b1_PV- at point (547.415,18.767,690)
          direction: (0.00115126,-0.000731656,0.999999).
          Potential geometry or navigation problem !
          Trying pushing it of 1e-07 mm ...Potential overlap in geometry!

*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomNav1002
      issued by : G4Navigator::ComputeStep()
Track stuck or not moving.
          Track stuck, not moving for 10 steps
          in volume -World_PV- at point (349.133,-521.069,689.5)
          direction: (-0.00113592,0.000482204,0.999999).
          Potential geometry or navigation problem !
          Trying pushing it of 1e-07 mm ...Potential overlap in geometry!

*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

It seems, that the Geometry description has a problem, possibly overlaps or bad solid definition, for example wrong orientation of Facets of Tessellated Solid.
Could you, please, check this?

Best Regards,
Tatiana.
Could you
Comment 15 Andrii Tykhonov 2014-04-29 11:01:10 CEST
Dear Tatiana,
 
Indeed, there are some small overlaps in the geometry (I used to observe them before, but they seemed to be quite harmless, the code was running okay). The strange thing is that exactly with the same geant4 version I get the segmentation fault, while you don't.. In this view, could you please answer two following questions:

  1) Which exact message do you get in the end? For example, in my case it is "Segmentation fault (core dumped)":
    

....
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomNav1002
      issued by : G4Navigator::ComputeStep()
Track stuck or not moving.
          Track stuck, not moving for 10 steps
          in volume -kx-b1_PV- at point (-488.776,148.881,690)
          direction: (0.000156488,-0.00450514,0.99999).
          Potential geometry or navigation problem !
          Trying pushing it of 1e-07 mm ...Potential overlap in geometry!

*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

Segmentation fault (core dumped)




  2) Which operating system are you running? (I'm using Ubuntu 12.04)


Many thanks,
Andrii








(In reply to comment #14)
> Dear Andrii,
> 
> Thank you, now I can run your test.
> I used geant4.9.p02 and geant4.9.6.p03.
> 
> I don't have crashes, but many of following messages :
> 
> -------- WWWW ------- G4Exception-START -------- WWWW -------
> *** G4Exception : GeomNav1002
>       issued by : G4Navigator::ComputeStep()
> Track stuck or not moving.
>           Track stuck, not moving for 10 steps
>           in volume -kx-b1_PV- at point (547.415,18.767,690)
>           direction: (0.00115126,-0.000731656,0.999999).
>           Potential geometry or navigation problem !
>           Trying pushing it of 1e-07 mm ...Potential overlap in geometry!
> 
> *** This is just a warning message. ***
> -------- WWWW -------- G4Exception-END --------- WWWW -------
> 
> -------- WWWW ------- G4Exception-START -------- WWWW -------
> *** G4Exception : GeomNav1002
>       issued by : G4Navigator::ComputeStep()
> Track stuck or not moving.
>           Track stuck, not moving for 10 steps
>           in volume -World_PV- at point (349.133,-521.069,689.5)
>           direction: (-0.00113592,0.000482204,0.999999).
>           Potential geometry or navigation problem !
>           Trying pushing it of 1e-07 mm ...Potential overlap in geometry!
> 
> *** This is just a warning message. ***
> -------- WWWW -------- G4Exception-END --------- WWWW -------
> 
> It seems, that the Geometry description has a problem, possibly overlaps or bad
> solid definition, for example wrong orientation of Facets of Tessellated Solid.
> Could you, please, check this?
> 
> Best Regards,
> Tatiana.
> Could you
Comment 16 tatiana.nikitina 2014-05-05 09:25:31 CEST
Dear Andrii,

I did not waited enough, in the end I also have segmentation fault in G4VoxelNavigation::ComputeStep().
I'm using Scientific Linux 6. 

The problem is that your geometry, even in this simplified example, is complicated. It is difficult to isolate a solid, that causes this problem.
You told, that by removing some solids, your program is working fine.
What solid did you removed? With removed solid geometry is still reporting overlaps?

Thank you in advance,
Tatiana.
Comment 17 Andrii Tykhonov 2014-05-07 13:33:50 CEST
(In reply to comment #16)
> Dear Andrii,
> 
> I did not waited enough, in the end I also have segmentation fault in
> G4VoxelNavigation::ComputeStep().
> I'm using Scientific Linux 6. 
> 
> The problem is that your geometry, even in this simplified example, is
> complicated. It is difficult to isolate a solid, that causes this problem.
> You told, that by removing some solids, your program is working fine.
> What solid did you removed? With removed solid geometry is still reporting
> overlaps?
> 
> Thank you in advance,
> Tatiana.

Dear Tatiana,

Thank you for the reply! The problematic solid is: 

<physvol name="embeded" >
   <file name="./Geometry/BGO/embeded.gdml" />
   <rotationref ref="adjust_Rot" />
</physvol>

in the Geometry/BGO.gdml file. Once I remove it, the code runs okay. Note that  the "overlap" errors are still reported in this case. Please let me know if you need any additional info.

Thanks!
Andrii
Comment 18 tatiana.nikitina 2014-05-23 10:34:33 CEST
Dear Andrii,

Even with removed 'embeded.gdml' for me segmentation violation persists.

Your  "BGO" detector is overlapping with other parts in detector :

G4GDML: Reading module './Geometry/BGO.gdml' done!
Checking overlaps for volume BGO_detector_vol_PV ... 
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomVol1002
      issued by : G4PVPlacement::CheckOverlaps()
Overlap with volume already placed !
          Overlap is detected for volume BGO_detector_vol_PV
          with kx-b1_PV volume's
          local point (100.798,450,401.432), overlapping by at least: 2.97123 mm 
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW ------

This can be a raison for the crash.

This type of crashes in Navigator can happen when your geometry is ill-defined(overlaps, bed definition of tessels in TessellatedSolid).
Other possibility of error could be the precision of Tessellation algorithm, may be the original solids were not overlapping, but conversion to the Tessellated solids contains overlaps.

I propose to you to check and improve your geometry by removing overlaps. If problem persists, try to look how the tessellation is done, if there is possibility of errors, or hole inside Tessellated Solids.

Best Regards,
Tatiana
Comment 19 Andrii Tykhonov 2014-05-23 11:00:32 CEST
Dear Tatiana,

I have investigated the geometry in more details. Indeed it seems that the problem is not only with the 'embeded.gdml'. Depending on how I set the initial seed the problem may fire even without having this volume included. I will follow your suggestion and try to check/refince the the CAD-gdml conversion step to see where possible overlaps/ill-defined geometries occur. 

Thanks for your help!
Andrii


(In reply to comment #18)
> Dear Andrii,
> 
> Even with removed 'embeded.gdml' for me segmentation violation persists.
> 
> Your  "BGO" detector is overlapping with other parts in detector :
> 
> G4GDML: Reading module './Geometry/BGO.gdml' done!
> Checking overlaps for volume BGO_detector_vol_PV ... 
> -------- WWWW ------- G4Exception-START -------- WWWW -------
> *** G4Exception : GeomVol1002
>       issued by : G4PVPlacement::CheckOverlaps()
> Overlap with volume already placed !
>           Overlap is detected for volume BGO_detector_vol_PV
>           with kx-b1_PV volume's
>           local point (100.798,450,401.432), overlapping by at least: 2.97123
> mm 
> *** This is just a warning message. ***
> -------- WWWW -------- G4Exception-END --------- WWWW ------
> 
> This can be a raison for the crash.
> 
> This type of crashes in Navigator can happen when your geometry is
> ill-defined(overlaps, bed definition of tessels in TessellatedSolid).
> Other possibility of error could be the precision of Tessellation algorithm,
> may be the original solids were not overlapping, but conversion to the
> Tessellated solids contains overlaps.
> 
> I propose to you to check and improve your geometry by removing overlaps. If
> problem persists, try to look how the tessellation is done, if there is
> possibility of errors, or hole inside Tessellated Solids.
> 
> Best Regards,
> Tatiana
Comment 20 tatiana.nikitina 2014-10-14 14:42:16 CEST
Dear Andrii,

Could you find and remove the overlaps in your application?
Did it solve the problem with Navigation with Tessellated Solid?

Best Regards,
Tatiana
Comment 21 tatiana.nikitina 2014-11-09 18:59:10 CET
Problem is closed. Crashes in VoxelNavigation with tesselleted solid most probably due to overlaps in user geometry.