Problem 1625 - G4WrapperProcess crashes with Geant4 10.0
Summary: G4WrapperProcess crashes with Geant4 10.0
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes (show other problems)
Version: 10.0
Hardware: All All
: P5 trivial
Assignee: Marc.Verderi
URL:
Depends on:
Blocks:
 
Reported: 2014-05-06 15:40 CEST by Soon
Modified: 2014-06-02 16:53 CEST (History)
2 users (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-06 15:40:30 CEST
G4WrapperProcess is broken with 10.0 (sequential mode) 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-12 10:09:04 CEST
Hello,
the tag procman-V10-00-01 should fix the problem. It will be included in next patches and public releases.

Andrea
Comment 2 Vladimir.Ivantchenko 2014-05-12 10:25:22 CEST
hello,

In parallel extra protection is included inside the tag emutils-V10-00-13 which also fix the problem 1594 fixing bremssrahlung splitting functionality in G4WrapperProcess.

Vladimir
Comment 3 Marc.Verderi 2014-06-02 16:53:22 CEST
Bug fixed by Andrea Dotti : procman-V10-00-01 .