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

Fix app freezing (fixes: #93) #145

Closed
wants to merge 1 commit into from
Closed

Conversation

Luke265
Copy link

@Luke265 Luke265 commented Feb 13, 2019

When running multiple apps with iohook, mouse/key inputs becomes very laggy, sometimes even completely frozen.

Description

I am not a c++ programmer, and I am not exactly sure what I did here.

Motivation and Context

See #93

How Has This Been Tested?

With the patch iohook installs locally on Windows 10.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

I am not a c++ programmer, and I am not sure what I did here. But this fixes issue wilix-team#93.
@Djiit
Copy link
Collaborator

Djiit commented Jun 4, 2019

I'm closing this for now. Feel free to reopen it if you want to.

@Djiit Djiit closed this Jun 4, 2019
@sentialx
Copy link

@Djiit Why it has been closed?

@Wizek
Copy link
Contributor

Wizek commented Sep 2, 2019

Hey @Luke265, do you understand why this PR was closed? Was there some issue with it that might not be apparent for me and sentialx? Or was its closure confusing for you too?

@Luke265
Copy link
Author

Luke265 commented Sep 6, 2019

@Wizek Sorry, I don't know why this PR was closed. I had no issues, so far, using iohook with this PR.

@Djiit
Copy link
Collaborator

Djiit commented Sep 6, 2019

Hi guys, Sorry if I closed this too soon. I thought it was not necessary and it didn't have any activity.

@Djiit Djiit reopened this Sep 6, 2019
@Wizek
Copy link
Contributor

Wizek commented Sep 7, 2019

Thanks @Djiit for reopening!

So, in the interest of moving forward with this issue getting fixed, I tried out this patch. However, the mouse-freezing is still present when I ran this test:

const {exec} = require('child_process');
const iohook = require('iohook');

iohook.start();

if (process.argv.length === 2) {
	console.log('Launched main');
	iohook.on('keydown', (e) => {
		console.log('Main', e.rawcode);
	});
	exec([`"${process.argv[0]}"`, process.argv[1], '-t'].join(' ')).stdout.pipe(process.stdout);
} else {
	console.log('Launched child');
	iohook.on('keydown', (e) => {
		console.log('Child', e.rawcode);
	});
}

Even when I set

{
  "devDependencies": {
    "iohook": "github:Luke265/iohook#patch-1"
  }
}

You can find my repro-repo over here: https://github.com/Wizek/iohook-test. Just

git clone https://github.com/Wizek/iohook-test
cd iohook-test
npm i
node .

Could you @Luke265 do the above test and tell me if your mouse lags after that code runs on Windows, preferably Windows 10?

Also, @Djiit, could you also do this just so you can see how bad this bug is?

@Wizek
Copy link
Contributor

Wizek commented Jan 30, 2020

Did you manage to try the repro steps @Luke265 and @Djiit? It's really as simple as:

git clone https://github.com/Wizek/iohook-test
cd iohook-test
npm i
node .

At least I could get some confirmation that others are also experiencing the same issue on Windows 10 as I.

@Wizek
Copy link
Contributor

Wizek commented May 9, 2020

As this is still not fixed, I'm switching over to something that seems to work better:

https://www.npmjs.com/package/gkm

@zxc23
Copy link

zxc23 commented Jul 25, 2020

I also get the freezing when running multiple iohook apps at the same time. I haven't been able to try the PR but I support the effort.

@WilixLead
Copy link
Member

Hello guys. @Luke265 @Wizek if any one have time to check this PR #294 - will be cool. Looks like it exactly the same issue for windows systems

@WilixLead
Copy link
Member

Closing it regarding #294

@WilixLead WilixLead closed this Apr 15, 2021
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

Successfully merging this pull request may close these issues.

6 participants