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

When changing settings the camera hangs in Async mode on Android (Samsung S22 Ultra and other Galaxy models) #844

Open
gb2111 opened this issue Feb 8, 2023 · 7 comments
Assignees
Labels
platform:android Issue that occurs when the target platform is Android type:bug Something isn't working

Comments

@gb2111
Copy link

gb2111 commented Feb 8, 2023

Description

I am running pose tracking from MediaPipeUnityPlugin-all.zip on Android in Async mode for pose tracking.
When I am starting demo first time, it immediately show camera feed but start showing landmarks only after 10-15 seconds when mediapipe initializes (or something). When I am in Sync mode app freezes during that time. But I use Async, I wait and that is not a problem.
When I change camera or something in settings, the app freezes until mediapipe is initializes again, but I'd like to see at least camera feed working like during startup and only wait for mediapipe to initialize.

I was debugging and noted that it hangs here. It doesn't return from that function.

I compared it to PC and noted that on PC _glSyncToken is null but on Android it isn't.
So I finally commented out below line and I now I can change settings on Android without any extra blocking on the ui/camera. Still need wait for Mediapipe to initialize but that is fine.

I can't see where I can go any further, also don't like idea of commenting that out so perhaps you can find solution for this.
Regards

@gb2111 gb2111 changed the title Detection get's stuck when changing settings (Samsung S22 Ultra) When changing settings the camera hangs in Async mode on Android (Samsung S22 Ultra and other Galaxy models) Feb 8, 2023
@homuler
Copy link
Owner

homuler commented Feb 8, 2023

Thank you for reporting the issue.

So I finally uncommented out below line and I now I can change settings on Android without any extra blocking on the ui/camera.

I'm not sure, but it looks like a bug to me.

@homuler homuler added type:bug Something isn't working platform:android Issue that occurs when the target platform is Android labels Feb 8, 2023
@gb2111
Copy link
Author

gb2111 commented Feb 8, 2023

I'm not sure, but it looks like a bug to me.

Sorry. I meant that I commented out the line cause there was no comment before. Not removed the comment from already commented code.

@homuler
Copy link
Owner

homuler commented Feb 9, 2023

I meant that I commented out the line cause there was no comment before.

Never mind. I know that.

@gb2111
Copy link
Author

gb2111 commented Feb 15, 2023

Never mind. I know that.

Can u give a tip on how to fix that?

@homuler
Copy link
Owner

homuler commented Feb 15, 2023

If I knew that, I would have fixed it already.
In the first place, I think I don't understand exactly what the problem is.

@homuler
Copy link
Owner

homuler commented Feb 18, 2023

related to #768 (comment)

@homuler
Copy link
Owner

homuler commented Feb 18, 2023

@homuler homuler self-assigned this Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:android Issue that occurs when the target platform is Android type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants