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

Access violation, try/catch? #8

Open
george-kar opened this issue Aug 3, 2018 · 0 comments
Open

Access violation, try/catch? #8

george-kar opened this issue Aug 3, 2018 · 0 comments

Comments

@george-kar
Copy link

george-kar commented Aug 3, 2018

Mouse hook (all) doesn't work on my end creating access violation and silently exit the program.
It looks like that when I move the mouse quickly to the top edge it exits with access violation. I found the bug is on the line

win_name_decoded = PyUnicode_DecodeFSDefault(win_name);

and later on

Py_DECREF(win_name_decoded);

A temporary solution was to completely disable decode
win_name_decoded = win_name; //PyUnicode_DecodeFSDefault(win_name);

and it works fine on python but when I create exe out of it

pyinstall.exe myfile.py

the bug is still there and access violation appears.

And my question is why there is no try/catch on the cpyHook.i ?
Can anyone help me how to include the entire code in a try/catch so it will not silently exit the program upon error? I find very bad design from the original developer having an entire project without any try/catch.

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