[Gate-users] Segmentation violation for water geometry

David Boersma david.boersma at acmit.at
Fri Jun 28 18:55:30 CEST 2019


Hi Matthew and Dimitris,


First: if you manage to get a segfault with Gate (or any other program), then you found a bug, period. No matter how wrong the input, a well-written program should never segfault, it should terminate with a helpful error message that explains which part of your input was problematic. (Unfortunately, it's actually quite easy to get segfaults with Gate, I suspect that users often just don't bother to report of them. It's great that you *do* report it!)


Second: I tried to reproduce this segfault and failed. I do get a crash, but a different one: Qt crashes due to some floating point exception, which seems unrelated to the segfault that you are reporting. When I completely disable the visualization, then Gate runs and terminates normally, no crash.


So... I am going to ask some more details:

  *   It looks like you are using geant4 10.05, is that the original release (7 December 2018) or the "patch01" release (17 April 2019)?
  *   If you run without the viewer (comment out all /vis lines, add a /vis/disable line, run without --qt), do you then still get the same segfault, or some other crash?
  *   What operating system and compiler are you using?
  *   What build type did you set in cmake? "Release" or something else? If you have some time to burn: could you rerun cmake and set it to "Debug", then reproduce the crash? The backtrace should then also quote filenames and line numbers for the items in Gate.
  *   There are several different GateMaterials.db files around (it's fine to edit your own, but we should harmonize the db files that we distribute in Gate and GateContrib). Could you send us the one that you are using?
  *   Which release of Gate are you using? If you got your code directly from github, could you quote to us the output from "git log -n 1", "git branch  -l" and "git remote -v"?

Thanks,
David B.



________________________________
Von: Gate-users <gate-users-bounces at lists.opengatecollaboration.org> im Auftrag von Matthew Strugari <matthew.strugari at dal.ca>
Gesendet: Freitag, 28. Juni 2019 15:36:13
An: Dimitrios Thanasas
Cc: gate-users at lists.opengatecollaboration.org
Betreff: Re: [Gate-users] Segmentation violation for water geometry

Hi Dimitris,

Thanks for the suggestion. Unfortunately, I still encounter the same problem with spaces instead of tabs. I know Qt doesn't work when using tabs in the session command bar but I haven't had any problems using tabs in the macros.

Cheers,
Matthew

________________________________
From: Dimitrios Thanasas <dthanas at uoa.gr>
Sent: June 28, 2019 2:51 AM
To: Matthew Strugari
Cc: gate-users at lists.opengatecollaboration.org
Subject: Re: [Gate-users] Segmentation violation for water geometry

Hi Matthew,

Try not having tabs, only spaces when you write a command.
I think it will work.
See the attached file, I think it is working.

Cheers,
Dimitris


> Hi everyone,
>
> I am not sure if this is a bug, but I am having difficulty defining a
> water phantom. In short, I am able to visualize basic geometries such as a
> sphere, box, or cylinder using the Qt viewer. However, when the material
> is set to Water, the viewer exits with the segmentation violation as shown
> below.
>
> To diagnose, I've found that:
>
>   1.  The fault doesn't appear to happen with G4_WATER or any other
> materials.
>   2.  Water appears to be properly defined in the GateMaterials.db file.
>   3.  If all three geometries are enabled, sometimes the viewer exits
> without the fault and other times with the fault.
>
> Please let me know if you have any ideas on the issue.
>
> Cheers,
> Matthew
>
>
> --
>
> Matthew Strugari
>
> Biomedical Translational Imaging Centre - BIOTIC,
> 5890 University Ave,
> Halifax, NS, B3K 6R8
>
>
>
>  *** Break *** segmentation violation
>
>
>
> ===========================================================
> There was a crash.
> This is the entire stack trace of all threads:
> ===========================================================
> #0  0x00007f09e9b26687 in __GI___waitpid (pid=14368, stat_loc=stat_loc
> entry=0x7ffd32063968, options=options
> entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
> #1  0x00007f09e9a91067 in do_system (line=<optimized out>) at
> ../sysdeps/posix/system.c:149
> #2  0x00007f09f41200d3 in TUnixSystem::Exec (shellcmd=<optimized out>,
> this=0x55f88c467c50) at
> /home/matthew/Programs/root/root-6.14.04/core/unix/src/TUnixSystem.cxx:2119
> #3  TUnixSystem::StackTrace (this=0x55f88c467c50) at
> /home/matthew/Programs/root/root-6.14.04/core/unix/src/TUnixSystem.cxx:2413
> #4  0x00007f09f4122ac4 in TUnixSystem::DispatchSignals
> (this=0x55f88c467c50, sig=kSigSegmentationViolation) at
> /home/matthew/Programs/root/root-6.14.04/core/unix/src/TUnixSystem.cxx:3644
> #5  <signal handler called>
> #6  0x000055f88a6b5805 in GateMaterialDatabase::~GateMaterialDatabase() ()
> #7  0x000055f88a64b88e in
> GateDetectorConstruction::~GateDetectorConstruction() ()
> #8  0x000055f88a64b8a9 in
> GateDetectorConstruction::~GateDetectorConstruction() ()
> #9  0x00007f09f0d04496 in G4RunManager::DeleteUserInitializations() ()
> from /home/matthew/Programs/geant4/geant4.10.05-install/lib/libG4run.so
> #10 0x00007f09f0d056b0 in G4RunManager::~G4RunManager() () from
> /home/matthew/Programs/geant4/geant4.10.05-install/lib/libG4run.so
> #11 0x000055f88a602179 in GateRunManager::~GateRunManager() ()
> #12 0x000055f88a241ae6 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.
> ===========================================================
> #6  0x000055f88a6b5805 in GateMaterialDatabase::~GateMaterialDatabase() ()
> #7  0x000055f88a64b88e in
> GateDetectorConstruction::~GateDetectorConstruction() ()
> #8  0x000055f88a64b8a9 in
> GateDetectorConstruction::~GateDetectorConstruction() ()
> #9  0x00007f09f0d04496 in G4RunManager::DeleteUserInitializations() ()
> from /home/matthew/Programs/geant4/geant4.10.05-install/lib/libG4run.so
> #10 0x00007f09f0d056b0 in G4RunManager::~G4RunManager() () from
> /home/matthew/Programs/geant4/geant4.10.05-install/lib/libG4run.so
> #11 0x000055f88a602179 in GateRunManager::~GateRunManager() ()
> #12 0x000055f88a241ae6 in main ()
> ===========================================================
>
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20190628/d74fb473/attachment-0001.html>


More information about the Gate-users mailing list