Message: Re: Nested Param Access violation Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Nested Param Access violation 

Forum: Geometry
Re: Question Nested Param Access violation (Youming Yang)
Date: 20 Jun, 2012
From: John Apostolakis <John Apostolakis>

Dear Ming,

It is difficult to diagnose the issue you report without further information.

In the most recent version of Geant4, in G4Transportation you will find the following code.

  if( pNewVol!=0 && pNewMaterialCutsCouple!=0 && pNewMaterialCutsCouple->GetMaterial()!=pNewMaterial )
  {
    // for parametrized volume
    //
    pNewMaterialCutsCouple =
      G4ProductionCutsTable::GetProductionCutsTable()
                             ->GetMaterialCutsCouple(pNewMaterial,
                               pNewMaterialCutsCouple->GetProductionCuts());
  }

Can you replace the code above with the following code, and run again.

  if( pNewVol!=0 && pNewMaterialCutsCouple!=0 && pNewMaterialCutsCouple->GetMaterial()!=pNewMaterial )
  {
    // for parametrized volume
    //
    pNewMaterialCutsCouple =
      G4ProductionCutsTable::GetProductionCutsTable()
                             ->GetMaterialCutsCouple(pNewMaterial,
                               pNewMaterialCutsCouple->GetProductionCuts());
    G4cout << " G4Transportation:  Obtained Cut Couple ptr=" <<   pNewMaterialCutsCouple << G4endl;
  } else { 
    G4cout << " G4Transportation:  Did not request Cut Couple - ptr was = " <<  pNewMaterialCutsCouple;
    if ( pNewMaterialCutsCouple ) 
 G4cout << "  Material of couple = " <<  pNewMaterialCutsCouple->GetMaterial()
               << "  previous material = " << pNewMaterial; 
    G4cout << G4endl;
  } 

This should identify which part of the code was responsible for the current value of the pointer.

Best regards,
John
===================================================
John Apostolakis, SFT (SoFTware) Group, PH Department, CERN
Email:  john.apostolakis@cern.ch       Office Tel:  +41-22-767-7239
------------------------------------------------------------------------------------------

On Jun 18, 2012, at 10:52 PM, Youming Yang wrote:

> 
> *** Discussion title: Geometry
> 
> Hello Geant4 Community,
> 
> I am having an issue with particle transport within my Nested Param
> setup. I've tracked it down to the following: I will begin an event, and
> it will dig deeper into my nested volumes, from my planar slice, to my
> bar within the plane, to finally my parameterized voxel. When it hits
> that voxel, it will crash at:
> 
> DefineMaterial(track.GetMaterialCutsCouple())
> 
> -Track is defined
> 
> -It is step 3 (makes sense)
> 
> -Track has an XYZ coordinate
> 
> -However the GetMaterialCutsCouple() function returns a null pointer 0x00000000, which is then fed into DefineMaterial which crashes.
> 
> I am wondering if anyone has experienced this issue before? I read 
> something else in another thread regarding the DICOM example (which I
> have used as a framework for mine) that there were too mate MadeIDs or
> something in Geant 4.9.3, could that have something to do with this?
> It's a pretty low-level part of the code that I've traced my issue to,
> so I am not sure what tidbits of code are useful, if anyone is able to
> help please let me know what code to attach!
> 
> Thanks in advance, Ming
> 
> -------------------------------------------------------------
> Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or unsubscribe) at: 
> http://hypernews.slac.stanford.edu/HyperNews/geant4/get/geometry/1193.html 

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Nested Param Access violation   (Ming - 20 Jun, 2012)
2 None: Re: Nested Param Access violation   (Youming Yang - 20 Jun, 2012)
1 None: Re: Nested Param Access violation   (Youming Yang - 20 Jun, 2012)
(_ None: Re: Nested Param Access violation   (John Apostolakis - 27 Jun, 2012)
 Add Message Add Message
to: "Re: Nested Param Access violation"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]