Error reading DI

Hi Chris,

One of our experiments is inexplicably crashing when we use the nightly from a few weeks ago (I haven’t tried the one in which you fixed some of the compile issues). It crashes after the first trial each time and says “ERROR reading DI, stopping IO and returning FALSE” (see screenshot). This experiment works fine with a version of 0.9 from April. Any suggestions for what might be the cause?

Thanks,
Lindsey.

Attachment: Screen_Shot_2020-03-17_at_4.05.19_PM.jpg (285 KB)

Hi Lindsey,

I don’t have any immediate insight into why this might be happening. If you want to send me your current LabJack plugin code, I can take a look and try to spot any issues. (Unfortunately, I’m working from home for the foreseeable future and don’t have my LabJack U6 to test on.)

Cheers,
Chris

Thanks Chris,
Here is our LabJack Plugin repository:

Let me know if I need to add you to our group.
Do you know what kind of conditions will drive this error?
And let me know if it would help to ship you a new LabJack :slight_smile:
Lindsey.

It seems to be specific to the variable set used- we’ll hopefully hunt it
down.
Lindsey.

Hi Lindsey,

Thanks for sharing your code.

The function call that’s failing just tries to read the current state of all ports from the LabJack and doesn’t appear to depend on any other settings or plugin state. This makes me think it’s some kind of I/O failure. Right next to the code that issues the error message, there’s a comment that says “We are seeing USB errors causing this”, which seems like a plausible (if unspecific) explanation.

As for the “crash”, the issue is that the plugin’s attempt to clean up in the face of this error is leading to a deadlock, which causes MWServer to become unresponsive. I created a pull request with a fix for this issue (along with some general updates and cleanup). If you have any issues building or using the plugin after merging the PR, please let me know.

Chris

Thanks- I’ll try this out and let you know if I have issues.
May be a few days.
Lindsey.

Hi Chris,

Sorry- I’m a pretty novice GitHub user: I merged your pull request and now
see your commits and the merge on Github. However, when I pull (or fetch)
to my local repository using my git client (Sourcetree), it doesn’t update-
is there something else I need to do?

Also- since I updated to 0.9, I’ve been having some issues with the
collection of counter signals using the Labjack/Mworks (this is how we
synchronize our Mworks data to our microscope). Around the transition
between trials it often has extra counts at intervals that are too fast to
be the microscope rate. I can send more details on the issue if it would
help, but could this have been addressed by some of these changes that you
just made to the Labjack plugin?

Thanks,
Lindsey.

Hi Lindsey,

However, when I pull (or fetch) to my local repository using my git client (Sourcetree), it doesn’t update- is there something else I need to do?

I don’t know anything about Sourcetree. (I always use Git’s command line tools.) As a workaround, you could just download the latest source.

Around the transition between trials it often has extra counts at intervals that are too fast to be the microscope rate. I can send more details on the issue if it would help, but could this have been addressed by some of these changes that you just made to the Labjack plugin?

I really don’t have any idea why that would be happening or whether my changes would make a difference. Maybe try with the updated plugin and see if things work better?

Also, if you haven’t already, I’d recommend installing the latest LabJack Exodriver release. It’s possible that there were changes in macOS that have been addressed with recent versions of the driver.

Cheers,
Chris

Thanks- will try those things.
Lindsey.