Skip to content
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

Lock up when sweep_device_construct is called too soon after device connect #126

Open
FPtje opened this issue Nov 8, 2017 · 0 comments
Open

Comments

@FPtje
Copy link

FPtje commented Nov 8, 2017

sweep firmware version

1.4

libsweep version + affected bindings

Libsweep on commit 8539c1c, compiled with -DCMAKE_BUILD_TYPE=Release
Also (with some effort) reproducable with the scanse tool on Windows.
Affected bindings: probably all, I'm currently using my own Haskell binding.

operating system

Linux (NixOS), Windows (with scanse tool)

Platform/Hardware Setup

Tested with Scanse sweep V1.0

How to reproduce

  1. Disconnect Scanse device from USB
  2. Run a program that tries to open /dev/ttyUSB0 every 100ms or so. Ignore the opening serial port failed error and just keep trying.
  3. Connect the Scanse device while this program is running.
  4. Find that the program is blocking on the sweep_device_construct C call indefinitely.

Motivation

This negatively affects the stability of the device. I've written a program that will try to reconnect to the device after it disconnects. With this bug the program freezes and I have to resort to timeouts. A device not ready exception or an internal retry mechanism would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant