Skip to content

v0.15.0 crashes when reading from device that went away on Windows 10. #756

@dmaone

Description

@dmaone

Thanks for picking up the maintenance of hidapi. However, I think 0.15.0 is broken now.

Steps to reproduce:

  • open hid device
  • periodically call hid_read() (I'm using non-blocking version, but I don't see how it'll make things different)
  • unplug the device
  • observe program crash.

v0.14.0 works in the same scenario.
I tried rewrite hid_read() to "remember path, and each time hid_open_path() -> hid_read() -> hid_close()" - I'm missing packets the device sends me, plus the application still crashes - looks like there's no way to detect the situation in advance and avoid crashing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    WindowsRelated to Windows backend

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions