<div dir="ltr"><div>Hello,</div><div><br></div><div>Having done further investigation into why I am getting this error in Gate v9.0, I tried running my code in Gate v8.2 and found in that version, the segmentation violation does not occur. Unfortunately, that doesn't completely solve the problem as the ring repeater for the second system does not work the way I expect it to. Both systems have two heads but while SpectHead1 has two sets of projection data, SpectHead2 only has one set of full projection data and the second set is blank. <br></div><div> If I change the ring repeater for the first system (SpectHead1) to have 3 heads, then there are three sets of projection data produced for that system. It also tried to give SpectHead2 three sets of projection data (even though its ring repeater was set to two repeats) but now two of them are blank. If I change the ring repeater of SpectHead2, nothing changes in regard to the projection data. <br></div><div>In all cases, the visualisation shows the number of heads and positions that I expect. I don't get any errors when I run the simulation in v8.2.<br></div><div><br></div><div>I've included a zip file with the macros I'm using to test the system. Is this a problem with the way the ring repeater is implemented in v8.2, or a problem in how I am using it?</div><div><br></div><div>Cheers,</div><div>Miriam<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 28, 2020 at 3:49 PM Miriam Dixon <<a href="mailto:miriam.gatemc@gmail.com">miriam.gatemc@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello GATE-users,</div><div><br></div><div>I am trying to set up a four-head SPECT system by creating two 2-head systems, SpectHead1 and SpectHead2, both using the built in SPECThead system. I have found the online documentation outlining how to do this, but I am getting an error I am not sure how to fix. The error does not occur if I run the simulation only using SpectHead1 or only using SpectHead2, but does occur if they are both included. This indicates there is something wrong in how they interact within the simulation - does anyone have a suggestion of what I could do to fix this? <br></div><div><br></div><div>The error message is:</div><div>*** Break *** segmentation violation</div><div>


















<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">The lines below might hint at
the cause of the crash.<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#5  0x0000564fdfdac8ed in
GateDeadTime::ProcessOnePulse(GatePulse const*, GatePulseList&) ()<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#6  0x0000564fe01d7594 in
GateVPulseProcessor::ProcessPulseList(GatePulseList const*) ()<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#7  0x0000564fe0138f9d in
GatePulseProcessorChain::ProcessPulseList() ()<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#8  0x0000564fdfdc64ac in
GateDigitizer::DigitizePulses() ()<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#9  0x0000564fdfdc6875 in
GateDigitizer::Digitize() ()<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#10 0x0000564fdff4c545 in
GateOutputMgr::RecordEndOfEvent(G4Event const*) ()<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#11 0x0000564fdfd39a5b in
GateEventAction::EndOfEventAction(G4Event const*) ()<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#12 0x00007fdabbec3be2 in
G4EventManager::DoProcessing(G4Event*) () at
/usr/share/geant4/geant4-install/lib/libG4event.so<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#13 0x00007fdabc163585 in
G4RunManager::ProcessOneEvent(int) () at
/usr/share/geant4/geant4-install/lib/libG4run.so<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#14 0x00007fdabc16167b in
G4RunManager::BeamOn(int, char const*, int) () at
/usr/share/geant4/geant4-install/lib/libG4run.so<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#15 0x0000564fe01f8bf1 in
GateApplicationMgr::StartDAQ() ()<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#16 0x0000564fe01ffb50 in
GateApplicationMgrMessenger::SetNewValue(G4UIcommand*, G4String) ()<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#17 0x00007fdab5e3e3bc in
G4UIcommand::DoIt(G4String) () at
/usr/share/geant4/geant4-install/lib/libG4intercoms.so<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#18 0x00007fdab5e5fc4c in
G4UImanager::ApplyCommand(char const*) () at
/usr/share/geant4/geant4-install/lib/libG4intercoms.so<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#19 0x00007fdab5e29c77 in
G4UIbatch::ExecCommand(G4String const&) () at
/usr/share/geant4/geant4-install/lib/libG4intercoms.so<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#20 0x00007fdab5e2bc9e in
G4UIbatch::SessionStart() () at
/usr/share/geant4/geant4-install/lib/libG4intercoms.so<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#21 0x00007fdab5e6114c in
G4UImanager::ExecuteMacroFile(char const*) () at
/usr/share/geant4/geant4-install/lib/libG4intercoms.so<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#22 0x00007fdab5e4b9cb in
G4UIcontrolMessenger::SetNewValue(G4UIcommand*, G4String) () at
/usr/share/geant4/geant4-install/lib/libG4intercoms.so<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#23 0x00007fdab5e3e3bc in
G4UIcommand::DoIt(G4String) () at
/usr/share/geant4/geant4-install/lib/libG4intercoms.so<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">#24 0x00007fdab5e5fc4c in
G4UImana<span style="background-color:rgb(255,255,255)"><span></span></span>ger::ApplyCommand(char const*) () at
/usr/share/geant4/geant4-install/lib/libG4intercoms.so<span></span></span></span></p><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0)">

</span></span><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><span style="color:rgb(31,73,125)"><span style="color:rgb(0,0,0)">#25 0x0000564fdfb48c16 in main
()</span></span></span></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><br></span></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)">I have included an outline of how I created the two systems below, if that helps identify the problem.</span></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"><br></span></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)">Cheers,</span></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)">Miriam</span></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="background-color:rgb(255,255,255)"></span><br></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span style="color:rgb(31,73,125)"><span style="color:rgb(0,0,0)"></span><span></span></span></p>





</div><div>Below is a brief outline of what I have done to create the two systems:</div><div><i>## Detector System 1</i><br></div><div>/gate/world/daughters/name SpectHead1<br>/gate/world/daughters/systemType    SPECThead<br>/gate/world/daughters/insert box<br>/gate/SpectHead1/geometry/setXLength 57.6 cm<br>/gate/SpectHead1/geometry/setYLength 44.6 cm<br>/gate/SpectHead1/geometry/setZLength 18 cm<br>/gate/SpectHead1/vis/setColor white<br>/gate/SpectHead1/setMaterial Air<br>/gate/SpectHead1/vis/forceWireframe</div><div>/gate/SpectHead1/repeaters/insert ring<br>/gate/SpectHead1/ring/setPoint1 0 0 0<br>/gate/SpectHead1/ring/setPoint2 0 1 0<br>/gate/SpectHead1/ring/enableAutoRotation</div><div>/gate/SpectHead1/ring/setFirstAngle 0 deg  <br>/gate/SpectHead1/ring/setAngularSpan 76 deg<br>/gate/SpectHead1/ring/setRepeatNumber 2 <br></div><div><br></div><div><i>## Detector System 2</i></div><div>/gate/world/daughters/name SpectHead2<br>/gate/world/daughters/systemType SPECThead<br>/gate/world/daughters/insert box<br>/gate/SpectHead2/geometry/setXLength 57.6 cm<br>/gate/SpectHead2/geometry/setYLength 44.6 cm<br>/gate/SpectHead2/geometry/setZLength 18 cm<br>/gate/SpectHead2/vis/setColor white<br>/gate/SpectHead2/setMaterial Air<br>/gate/SpectHead2/vis/forceWireframe</div><div>/gate/SpectHead2/repeaters/insert ring<br>/gate/SpectHead2/ring/setPoint1 0 0 0<br>/gate/SpectHead2/ring/setPoint2 0 1 0<br>/gate/SpectHead2/ring/enableAutoRotation</div><div>/gate/SpectHead2/ring/setFirstAngle 180 deg  <br>/gate/SpectHead2/ring/setAngularSpan 76 deg<br>/gate/SpectHead2/ring/setRepeatNumber 2 <br></div><div><br></div><div><i>....further details about the head setup (can be provided if needed)....</i></div><div><br></div><div><i>## Digitizer System 1 </i><br></div><div>/gate/digitizer/Singles/insert systemFilter<br>/gate/digitizer/Singles/systemFilter/selectSystem SpectHead1</div><div>/gate/digitizer/Singles/insert adder</div><div>/gate/digitizer/Singles/insert readout</div><div>/gate/digitizer/Singles/readout/setDepth 1</div><div>/gate/digitizer/Singles/insert spblurring<br>/gate/digitizer/Singles/spblurring/setSpresolution 3.97 mm<br>/gate/digitizer/Singles/spblurring/verbose 0</div><div>
<div><i>##....further details about the digitizer (can be provided if needed)....</i></div>

</div><div>/gate/digitizer/Singles/insert deadtime<br>/gate/digitizer/Singles/deadtime/setDeadTime 1650 ns<br>/gate/digitizer/Singles/deadtime/setMode paralysable<br>/gate/digitizer/Singles/deadtime/chooseDTVolume crystal_volume</div><div><br></div><div><i>## Digitizer System 2</i></div><div>/gate/digitizer/name    Singles2<br>/gate/digitizer/insert  singleChain<br>/gate/digitizer/Singles2/insert systemFilter<br>/gate/digitizer/Singles2/systemFilter/selectSystem SpectHead2</div><div>/gate/digitizer/Singles2/name adder2<br>/gate/digitizer/Singles2/insert adder</div><div>/gate/digitizer/Singles2/name readout2<br>/gate/digitizer/Singles2/insert readout</div><div>/gate/digitizer/Singles2/readout2/setDepth 1</div><div>/gate/digitizer/Singles2/name spblurring2<br>/gate/digitizer/Singles2/insert spblurring<br>/gate/digitizer/Singles2/spblurring2/setSpresolution 3.97 mm<br>/gate/digitizer/Singles2/spblurring2/verbose 0</div><div>
<i>##....further details about the digitizer (can be provided if needed).... </i><br></div><div>/gate/digitizer/Singles2/name deadtime2<br>/gate/digitizer/Singles2/insert deadtime<br>/gate/digitizer/Singles2/deadtime2/setDeadTime 1650 ns<br>/gate/digitizer/Singles2/deadtime2/setMode paralysable<br>/gate/digitizer/Singles2/deadtime2/chooseDTVolume crystal_volume2</div><div><br></div></div>
</blockquote></div>