Problem 1315 - issuing /process/em/setForcedInteraction prior building of physics tables results in seg fault
Summary: issuing /process/em/setForcedInteraction prior building of physics tables res...
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/electromagnetic (show other problems)
Version: 9.5
Hardware: All All
: P5 trivial
Assignee: Vladimir.Ivantchenko
URL:
Depends on:
Blocks:
 
Reported: 2012-05-18 14:48 CEST by Iwan Cornelius
Modified: 2012-08-01 12:01 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Iwan Cornelius 2012-05-18 14:48:48 CEST
when using UI command to activate the forced interaction, such as:

/process/em/setForcedInteraction compt forced 0.001 mm true

a seg fault occurs in the method G4VEmProcess::ActivateForcedInteraction

if this UI command is issued prior to the physicstable being built. In this case, the 'particle' pointer is NULL. 

this would be an easy fix, just by checking the particle pointer first. 

I hope this helps. 

Best Regards, 
Iwan Cornelius
Comment 1 Vladimir.Ivantchenko 2012-08-01 12:01:06 CEST
Hellow Iwan,

Thanks you for pointing to the problem. It is true that there is not possible to define EM biased interaction before physics processes are instantiated. So, we enable EM biasing UI commands only in G4_Idle state and if the command will be called before /run/initialize the run will be aborted. This will be available in new reference version of geant4. In 9.6beta if forced interaction command is issued before it has no effect and no crash at the same time.

Vladimir