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

[Meta] Left menu button not triggering exit action from WebXR #1631

Open
svillar opened this issue Nov 19, 2024 · 2 comments
Open

[Meta] Left menu button not triggering exit action from WebXR #1631

svillar opened this issue Nov 19, 2024 · 2 comments
Assignees

Comments

@svillar
Copy link
Member

svillar commented Nov 19, 2024

I can only reproduce it with v72 Meta OS. The event is received as it can be seen in the logs, however the exit action is not triggered. When that happens the exit action executed with the left hand does not work either.

EDIT: note that it works the first time you exit. Subsequent actions do not exit immersive mode. I've just verified that the back action is properly detected but it is not received on Java side. Apparently there is no JNI error and the JNI invocation succeeds.

@svillar svillar self-assigned this Nov 19, 2024
@svillar
Copy link
Member Author

svillar commented Nov 21, 2024

It looks like somehow the main UI thread stops handling events. We have verified it by setting message logging in the main looper. That's why the code in runOnUiThread() is not executed and thus, Wolvic don't exit WebXR session.

It works fine if we call dispatchKeyEvent() outside the UI thread, somehow after that the main thread resumes the loop. At this point maybe it's better to wait for following beta releases (as this does not happen on any other device). In case it isn't fixed on the OS side, we would have to implement that workaround.

@svillar
Copy link
Member Author

svillar commented Nov 21, 2024

So I did some more research using some perfetto tracing. What I found is that when the button stops working it's basically because the UI thread is blocked as mentioned above. The reason why it's blocked is because it's waiting in a dequeueBuffer call. This usually means that we run out of buffers and the process is waiting until there are new ones available. Still not sure why this happens.
Captura de pantalla de 2024-11-21 14-12-55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant