Closed CamphynR closed 1 week ago
At least one of the problems is that on line https://github.com/RNO-G/mattak/blob/main/src/VoltageCalibration.cc#L1036 and the following, the size is wrong (shouldn't be -1).
Probably time to resurrect my memory_fixes branch...
Is that fixed by now?
I assume this is fixed after merging #39 . Feel free to reopen this issue if the issue persist for you
When trying to iterate over a mattak.Dataset.Dataset in pyroot, given a calibration file, the program crashes and states: malloc(): invalid size (unsorted). Using the gdb debugger I managed to point to VoltageCalibration.cc line 1015 as the problem:
TObject * obj = inputFile->Get(graphNameTitle);
More specifically the line crashes on the second iteration of the loop. Commenting out lines 1045-1047 does allow the code to run. These are the upsampling linesI tried to do something like this and this does solve the crash but makes the code crash in other places.
I suspect the allocation of TObject * obj is causing the problem but I am definitely not an expert in C/C++ so any help would be appreciated.
Note that I changed line 88 in mattak/py/mattak/backends/pyroot/dataset.py to, because there was a small bug in there
self.set_calibration(cal_file, cache_calibration=cache_calibration)
Minimal code to reproduce problem
System on which crash occurs Python 3.10.12 ROOT 6.28/06 mattak: current main branch (19/06/2024)
Full gdb backtrace