New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hwPortUtils.listComPorts: Querying PortName can fail #6015

Closed
jcsteh opened this Issue May 30, 2016 · 7 comments

Comments

Projects
None yet
3 participants
@jcsteh
Contributor

jcsteh commented May 30, 2016

Originally reported by @mohdshara in this nvda-devel thread.

It seems that some com ports don't have a PortName registry value:

ERROR - unhandled exception (15:22:32):
Traceback (most recent call last):
  File "gui\settingsDialogs.pyo", line 1537, in onDisplayNameChanged
  File "gui\settingsDialogs.pyo", line 1544, in updatePossiblePorts
  File "brailleDisplayDrivers\baum.pyo", line 117, in getPossiblePorts
  File "hwPortUtils.pyo", line 192, in listComPorts
WindowsError: [Error 2] The system cannot find the file specified

Unless I'm missing something, this is broken, but clearly, it can happen. I guess we should just catch the error and skip the port.

@jcsteh jcsteh self-assigned this May 30, 2016

jcsteh added a commit that referenced this issue May 30, 2016

Fixed a rare issue when scanning for serial ports on some systems whi…
…ch made some braille display drivers unusable.

hwPortUtils.listComPorts: In some rare cases, the PortName registry value doesn't exist. Just skip the port if this occurs.
Fixes #6015.
@nvaccessAuto

This comment has been minimized.

Show comment
Hide comment
@nvaccessAuto

nvaccessAuto commented May 30, 2016

Incubated in 73ee6b2.

@mohdshara

This comment has been minimized.

Show comment
Hide comment
@mohdshara

mohdshara May 30, 2016

Wonderful! thank you very much for looking into it and for fixing the issue. confirmed, I can now connect through USP and bluetooth.

mohdshara commented May 30, 2016

Wonderful! thank you very much for looking into it and for fixing the issue. confirmed, I can now connect through USP and bluetooth.

@mohdshara

This comment has been minimized.

Show comment
Hide comment
@mohdshara

mohdshara May 31, 2016

Hi. It may be worth noting here, that this happened to me on 3 different laptops. They are all made by Linovo and all have windows 10 64 bit. of course, this commit fixes the issues on all of them. what I am trying to say is that there maybe a pattern here.

mohdshara commented May 31, 2016

Hi. It may be worth noting here, that this happened to me on 3 different laptops. They are all made by Linovo and all have windows 10 64 bit. of course, this commit fixes the issues on all of them. what I am trying to say is that there maybe a pattern here.

@jcsteh

This comment has been minimized.

Show comment
Hide comment
@jcsteh

jcsteh May 31, 2016

Contributor

That would suggest Lenovo are installing something that creates this issue. It'd be interesting to see a log file at level debugWarning covering selecting a Baum display with this new build on one of those computers. The build logs some info when it encounters this issue. There's nothing we can do about it, but seeing the log might give me some idea of what this actually is.

Contributor

jcsteh commented May 31, 2016

That would suggest Lenovo are installing something that creates this issue. It'd be interesting to see a log file at level debugWarning covering selecting a Baum display with this new build on one of those computers. The build logs some info when it encounters this issue. There's nothing we can do about it, but seeing the log might give me some idea of what this actually is.

@jcsteh jcsteh added this to the 2016.3 milestone May 31, 2016

@mohdshara

This comment has been minimized.

Show comment
Hide comment
@mohdshara

mohdshara May 31, 2016

attached are the log files with a usp connection and another with a bluetooth connection.

nvda-log-bluetooth-lenovo.txt
nvda-log-usb.txt
|

mohdshara commented May 31, 2016

attached are the log files with a usp connection and another with a bluetooth connection.

nvda-log-bluetooth-lenovo.txt
nvda-log-usb.txt
|

@jcsteh

This comment has been minimized.

Show comment
Hide comment
@jcsteh

jcsteh May 31, 2016

Contributor

Looks like the problematic port is a modem (hardware id: USB\Vid_0bdb&Pid_193e&Cdc_Modem&Mi_03), so it's not important. That's good.

However, I did notice you're connecting via Bluetooth by choosing a specific com port, rather than selecting automatic 'as the port and letting NVDA detect. Is automatic not working for you with Bluetooth?

Contributor

jcsteh commented May 31, 2016

Looks like the problematic port is a modem (hardware id: USB\Vid_0bdb&Pid_193e&Cdc_Modem&Mi_03), so it's not important. That's good.

However, I did notice you're connecting via Bluetooth by choosing a specific com port, rather than selecting automatic 'as the port and letting NVDA detect. Is automatic not working for you with Bluetooth?

@mohdshara

This comment has been minimized.

Show comment
Hide comment
@mohdshara

mohdshara Jun 1, 2016

Hi Jamie.

I was manually selecting a port because that was what Baum suggested. however, I have just tried, and I found out that automatic will now work too.

Thanks for your help and for fixing the issue.

mohdshara commented Jun 1, 2016

Hi Jamie.

I was manually selecting a port because that was what Baum suggested. however, I have just tried, and I found out that automatic will now work too.

Thanks for your help and for fixing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment