Open tlatorre-uchicago opened 7 years ago
@BenLand100 ?
Does anyone know if there a notification I can listen for to stop the thread?
Whenever the XL3 connects/disconnects you can listen for a notification called XL3_LinkConnectionChanged (see https://github.com/snoplus/orca/blob/reset_crate/Source/Objects/Custom%20Hardware/SNO%2B/XL3/XL3_Link.m#L34). I'm not sure what the sequence of events is when the experiment is closed, but that might be enough.
Unfortunately I already have a condition to exit the thread if the XL3 disconnects https://github.com/snoplus/orca/blob/master/Source/Objects/Custom%20Hardware/SNO%2B/XL3/ORXL3Model.m#L4791
It must be the case that you only see this when the objects get cleaned up before it calls readhvstatus but after it's checked that the XL3 is connected... I'm not super concerned about this being a dangerous bug but it's certainly not pretty. I'll see if I can find a more robust way to handle ORCA cleaning up the experiment - presumably it informs the objects before simply deleting them.
Fixed in #243.
Still seem to be having problems. I've attached a screenshot from the debugger when quitting Orca.
When closing the experiment in ORCA to switch to a new .Orca file, sometimes the ORXL3Model segfaults in readHVStatus. Here is the debugger output: