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

Lg input hook turns off tv #12

Open
bkbartk opened this issue Aug 25, 2023 · 3 comments
Open

Lg input hook turns off tv #12

bkbartk opened this issue Aug 25, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@bkbartk
Copy link

bkbartk commented Aug 25, 2023

All is working well.
but since I have installed this app. Sometimes (few times a week)while using the remote the tv gets turned off(or crashes). Also while using buttons which aren’t overwritten.
Anyone familiar with this issue?
Or is there some log I can see?

@Stoppschildgruen
Copy link

I can confirm it. The same thing happens to me.

@smx-smx
Copy link

smx-smx commented Nov 27, 2023

It's caused by multiple threads hitting the PHP code at the same time.
PHP-FFI callbacks aren't thread safe, so a hook invoked from multiple threads can bring down the process (simultaneous manipulation of the PHP internal state).
This issue is tracked by PHP here php/php-src#9214

The only workaround i can think of is wrapping the native callback in a C trampoline that maintains a lock/mutex before calling the PHP function

@Simon34545 Simon34545 added the bug Something isn't working label Jan 24, 2025
@Simon34545
Copy link
Owner

I'm guessing this issue (described above) is related to #23 as well.
A fix for this seems to be underway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants