Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix crashing when attempting to lock shared memory in debug build #76

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

Sainan
Copy link
Contributor

@Sainan Sainan commented Feb 2, 2024

This is a bandaid at best.

  • Ideally, this outdated "shared_memory" crate version should be avoided since even its author is now heavily backpedalling on this.
  • Probably the virtual control executable should be bundled with the SDK, so one doesn't have to compile it themselves and then run into these issues.

In any case, previously using cargo build to get the wooting-analog-virtual-control.exe would have the executable crash/panic on start, now it doesn't anymore. The plugin had the same issue when compiled in the debug configuration.

And the device_id field was unused anyway.

@simon-wh
Copy link
Member

  • Ideally, this outdated "shared_memory" crate version should be avoided since even its author is now heavily backpedalling on this.
  • Probably the virtual control executable should be bundled with the SDK, so one doesn't have to compile it themselves and then run into these issues.

Agree on the first point, I'm not a massive fan of the way it's set-up.

For second point, I somewhat feel like maybe this whole thing shouldn't necessarily exist in the first place?

@Sainan
Copy link
Contributor Author

Sainan commented Oct 21, 2024

I think the test plugin is still useful for developers without an analogue keyboard of their own, it's just a matter of making sure they're able to actually use it without problems.

@simon-wh
Copy link
Member

simon-wh commented Oct 21, 2024

True, it is a helpful tool for that purpose, which is why I created it in the first place. However, I feel like currently it opens up some doors for input automation in games which I'm not sure if game devs would be super happy about 😬 (but maybe test-plugin or not doesn't really change that story)

Either way, I'll merge this PR as this discussion is somewhat unrelated to the changes themselves

@simon-wh simon-wh merged commit cd412d3 into WootingKb:develop Oct 21, 2024
@Sainan Sainan deleted the fix-test-plugin branch October 21, 2024 15:37
@Sainan
Copy link
Contributor Author

Sainan commented Oct 21, 2024

As long as there is a plugin system without some sort of approval process (and verified e.g. via digital signatures), it's always gonna be possible to 'abuse' the analogue SDK for input automation. I doubt that's a huge concern right now, tho.

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

Successfully merging this pull request may close these issues.

2 participants