Hi Nina,
I wasn’t able to load your mwel because of the following error
00:00:29 : ERROR: Can’t start iodevice (LabJackU6) and no alt tag specified
Oh, no. I think this means that there isn’t actually any memory corruption, and the problems you’re seeing have a much simpler (and sillier) explanation, namely: The LabJack is failing to initialize, and your experiment is falling back on the FakeMonkey
device.
This would explain the crash on exit: If the LabJack device never initializes, the connected
flag is never set to true, and the previously-mentioned assertion in detachPhysicalDevice
fails and crashes MWServer. (FYI, that’s a really silly assertion that should be removed.) It also explains why I wasn’t seeing the crash: The LabJack device did initialize for me.
Here’s a quick test to verify this conclusion: In MWELSharedCode/includeExptDevices.mwel
, comment out or remove the alt
attribute of the LabJack device, i.e.
iodevice/labjacku6 LabJackU6 (
//alt = FakeMonkey
...
Then, try to load one of your experiments. If it fails with “ERROR: Can’t start iodevice (LabJackU6) and no alt tag specified”, my conclusion is correct.
Chris