padsley / k600analyser

Code for the K600 analyser including plugin codes for silicon, clover and HAGAR data
1 stars 4 forks source link

SiliconHits is too high - crashing #90

Closed padsley closed 8 years ago

padsley commented 8 years ago

@neveling noticed a problem with run 1009 from PR226 - the second event crashes the analyser.

The problem seems to be manifested in the silicon event size being: 229376

Which is wrong.

Currently investigating.

padsley commented 8 years ago

Huh.

I don't have any problem, using the version of the code I got from the repo.

padsley commented 8 years ago

Argh. I hate computers. Lovely lovely beer. Beeer.

neveling commented 8 years ago

It happened because I had this line almost at the end of main.c uncommented for some reason: //delete si; //Delete the pointer otherwise we lose access to the memory and start to crash the machine

Should this cleanup not happen inside the EOR routine?

padsley commented 8 years ago

Oh! That's my fault.

Yeah... so, if we delete the pointer, the code flakes out.

I think that, yes, it should happen at the end of the run, especially as the pointer is cleared in at the end of each event. In any case, then the program finishes, then the memory will be freed (I think?) so that doesn't matter too much.

I have a feeling that I needed to delete it when I was structuring the plugins in a different manner. Now that I've changed it (from returning pointers to being voids, like my social life) then they shouldn't be deleted.