Problem 1623 - G4WrapperProcess crashes with Geant4 10.0
Summary: G4WrapperProcess crashes with Geant4 10.0
Status: RESOLVED MOVED
Alias: None
Product: Bugzilla
Classification: Unclassified
Component: general (show other problems)
Version: other
Hardware: PC Linux
: P5 normal
Assignee: Koichi Murakami
URL:
: 1624 (view as problem list)
Depends on:
Blocks:
 
Reported: 2014-05-01 01:22 CEST by Soon
Modified: 2014-05-05 21:54 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Soon 2014-05-01 01:22:08 CEST
G4WrapperProcess is broken with 10.0 since masterProcess has a null pointer
(for example inside G4VEnergyLossProcess when tried to implement a wrapper process for G4eBremsstrahung or G4eIonization). The same application runs fine with 9.6.p03. Following is a possible cure suggested by Andrea Dotti: 
When using a wrapper around a class of type G4VPRocess, with version 10.0 
there is an important point to take into account. A new G4VProcess (base class) interface should be used to set correctly the pointer to the master.
virtual void G4VProcess::SetMasterProcess( G4VProcess* masterP );
This method is called by G4 kernel passing the master pointer of the same process (in this case an instance of G4WrapperProcess) to the worker thread.

G4WrapperProcess should forward this call to the underlying process, 
implementing the following line of code:

virtual void SetMasterProcess(G4VProcess* masterP) {
pRegProcess->SetMasterProcess(static_cast<G4WrapperProcess*>  (masterP)->GetRegisteredProcess() );
};
Comment 1 Andrea Dotti 2014-05-05 20:23:06 CEST
*** Problem 1624 has been marked as a duplicate of this problem. ***
Comment 2 Soon 2014-05-05 21:54:00 CEST
Reported the problem in the wrong category and move to process/biasing