ERROR_SHARING_VIOLATION

Comments & issues
simonlucas
Phidgetsian
Posts: 8
Joined: Tue Mar 13, 2018 5:30 am
Contact:

ERROR_SHARING_VIOLATION

Postby simonlucas » Tue May 01, 2018 6:15 am

Hi.

we have a Phidgets problem on an installation with Windows 10.

We are using Phidgets driver 21. The Phidgets is set to automatic startup.

After PC start-up (with a. 3 minute delay), our software (written in Flash) connects to the Phidgets driver (we have error messages printed to screen). But it appears that the Phidgets s/w cannot connect to the Phidgets interface (which has an RFID device attached).

However, if we quit our software and open the Phidgets control panel, then the Phidgets starts operating normally. We restart our software and the signals from the RFID come through.

I can see an error on the logs:

Code: Select all

04/17/18 21:25:33,5312,".\windows\cusbwindows.c(580)",INFO,"CreateFileW failed with ERROR_SHARING_VIOLATION - probably the Phidget is opened elsewhere."
04/17/18 21:25:33,5312,".\cphidget.c(1330)",WARN,"unable to open active device: 1"


What does 'probably the Phidget is opened elsewhere', mean? Does this mean that something is using the USB port, stopping the Phidgets driver from connecting the Phidgets interface?

Why does opening the Phidgets control panel fix the issue?

How can I find out what is blocking the driver connecting to the interface?

How can I make this work at startup?

Any help greatly appreciated, please. Thank-You

User avatar
mparadis
Site Admin
Posts: 609
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: ERROR_SHARING_VIOLATION

Postby mparadis » Tue May 01, 2018 9:39 am

This error means that another program or process already has the Phidget channel opened locally. For example, if you open the control panel example, you won't be able to connect to that channel with your own program until the control panel example closes. This can also happen if you have multiple instances of the same program open- only the first will be able to open the channel.

There is no way to determine which program has the channel open, but you can try ending processes in the task manager until it does open, in order to track down which process it is. I'm not sure why opening the control panel solves this issue. Maybe try going into the control panel options and uncheck "Start Phidget Control Panel with Windows" to ensure that it isn't somehow blocking your program when the computer starts up.

simonlucas
Phidgetsian
Posts: 8
Joined: Tue Mar 13, 2018 5:30 am
Contact:

Re: ERROR_SHARING_VIOLATION

Postby simonlucas » Wed May 02, 2018 8:21 am

@mparadis

Thank-you for your ideas. I'm genuinely confused about this. I looked at the PC again last night. I have to log in remotely, as it is in another country. I looked at the Phidgets Control Panel log and noticed that there were no more errors of the kind I described. This made me wonder whether those log errors were a one-off (perhaps when I re-installed Phidgets, and the Phidgets Manager was running simultaneously – as it seems to after first install).

So, now I have to work out why quitting the Flash application and re-opening the Phidgets Control Panel starts it working again. Because after we have done that and re-opened Flash, it works until the next reboot.

I should explain here that there is a three minute delay before Flash is scheduled to open after a restart. Also we know that this system (a different Phidgets application) works perfectly on a machine in the same gallery.


Return to “General”

Who is online

Users browsing this forum: No registered users and 6 guests