Giter VIP home page Giter VIP logo

intiface-cli-rs's People

Contributors

qdot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

intiface-cli-rs's Issues

Export client name to GUI

We can see when we get the ServerInfo message, but we don't currently have a way to send the client name to the GUI. Need to figure this out.

Massive memory leak when on for long durations

It doesn't happen linearly, rather it looks fine with memory usage in the 10's of MB for a long time until it suddenly spirals and grows. It seems to demand a lot of CPU time as well as this is happening.

Taskmgr_QI9bH9fDT7

another instance
image

I'm not sure if this is what causes it to happen, but I run scanning in a 5 second loop like this from the C# library, and if I increase the timeout to 60 seconds instead of 5 it doesn't seem to spiral out of control. Either that or the effect is just delayed by 12 times so I haven't had a chance to experience it...

mClient.StartScanningAsync();
await Task.Delay(1000);
mClient.StopScanningAsync();

websocket_server panics when `--wsallinterfaces` is supplied without any other arguments.

In my attempts to test the btleplug/buttplug libraries, I grabbed this project to try to quickly get myself up and running.
I've currently got ca76f78 (v23) and I've modified the Cargo.toml to use a local development copy of buttplug-rs as well as a local development copy of btleplug.

Expected behaviour

Running cargo run -- --wsallinterfaces would sping up an insecure Intiface server to test with uing default ports that is commonly associated with Intiface (12345, 12346)

Actual Behaviour

main' panicked at 'assertion failed: !ret.inner.is_empty()', /home/nzsmartie/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.8/src/future/select_all.rs:40:5

This happens in:
buttplug-rs panics in buttplug-rs/buttplug/src/connector/transport/websocket/websocket_server.rs::impl ButtplugConnectorTransport for ButtplugWebsocketServerTransport::connect()

    Box::pin(async move {
      *disconnect_sender.lock().await = request_sender.clone();
      if let Err(connector_err) = select_all(tasks).await.0 {
        Err(connector_err)
      } else {
        Ok((request_sender, response_receiver))
      }
    })

select_all asserts that tasks is not empty. However, since neither the port for an insecure websocket or secure websocket was provided, no websocket future tasks were added to tasks. causing the assertion to trigger.

Does not install on Ubuntu 22.04 LTS.

Using rustup and the default toolchain:

cargo +stable-x86_64-unknown-linux-gnu install intiface-cli

ultimately fails with

   Compiling git2 v0.15.0
   Compiling intiface-cli v50.0.0
error: failed to run custom build command for `intiface-cli v50.0.0`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installi2JrcJ/release/build/intiface-cli-8cd53a1f867a084a/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: could not find repository from '/home/natalie/.cargo/registry/src/github.com-1ecc6299db9ec823/intiface-cli-50.0.0'; class=Repository (6); code=NotFound (-3)', /home/natalie/.cargo/registry/src/github.com-1ecc6299db9ec823/intiface-cli-50.0.0/build.rs:9:18
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Interestingly it does succeed if I clone this repo and do a cargo build instead. So maybe this is something about how this package is published?

It would be good if it could be installed directly, since the released binaries don't work well on linux. There are too many different configurations and I can't get it to work on Ubuntu 22.04 without rebuilding it locally. There is a hack for making libssl.so.1.1 work there but it will kinda mess up the system.

intiface-cli-rs: Stops accepting connections if the connection is "reset without closing handshake" too many times

After a few times closing + restarting some scripts, I noticed the Rust server would stop accepting connections if the connection was not closed gracefully too many times.

Steps to reproduce:

  1. Run Intiface's Rust server
  2. Run a script that connects to the server (e.g. the Python example)
  3. Terminate that script with Ctrl+C, or otherwise end it in a non-graceful way
  4. IntifaceCLI will display an error such as:
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Protocol("Connection reset without closing handshake")', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/buttplug-0.7.2/src/connector/transport/websocket/websocket_server.rs:59:5
  1. Continue doing this several more times.
  2. After 5 or so attempts, the script will fail to connect to the server anymore.
Could not connect to server, exiting: [Errno 111] Connect call failed ('127.0.0.1', 12345)

The server appears to accept new connections if they are all closed gracefully, but not if they are non-graceful.

Expected behavior:

The server would continue to accept new connections.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.