Closed Fantasticlyy closed 1 year ago
Can confirm. I ran valgrind and the following part is what increases as duration of simulation increase:
After a while I realize the cause of the problem is kind simple. A lot of digitizer ( not sure if it's all of them) said
GateDigi* inputDigi = new GateDigi();
in their ::Digitize()
method. And without delete
.
It could be patched with ease.
Wow it turn outs that this pointer will be assigned other values and should not allocate anything in the first place. Make a PR hope it will be merged asap.
It seems there are more leak other than the one showed above. I'll try to find it.
Edit: Turns out to be it's something else. The fix above should be sufficient.
You can now git pull origin develop
in your virtual machine ~/Software/Gate/src
dir and make
in ~/Software/Gate/bin
dir to fix the problem. @Fantasticlyy
done #619
Describe the bug use the vGate 9.3,while use digitizer and enable the “/gate/output/” ,when run a simulation ,the RAM will be raise by follow time,I thin may be enable the “/gate/output/” with memory leak,this issue only appear in vGate9.3 ,the other version not appear. Desktop (please complete the following information): vGate9.3 VirtualBox 7.06
#############
DIGITIZER
############# /gate/digitizerMgr/name LESingles /gate/digitizerMgr/chooseSD pixel /gate/digitizerMgr/insert SinglesDigitizer /gate/digitizerMgr/pixel/SinglesDigitizer/LESingles/setInputCollection Singles /gate/digitizerMgr/pixel/SinglesDigitizer/LESingles/insert energyFraming /gate/digitizerMgr/pixel/SinglesDigitizer/LESingles/energyFraming/setMin 0. keV /gate/digitizerMgr/pixel/SinglesDigitizer/LESingles/energyFraming/setMax 6000. keV
########
OUTPUT
######## /gate/output/tree/enable /gate/output/tree/addFileName output/LHCsI.txt /gate/output/tree/hits/enable
/gate/output/tree/addCollection LESingles /gate/output/tree/addCollection Singles