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

"Failed to link vertex and fragment shaders" while using Posenet on ios (Mobile Safari 18.1.1) #8457

Open
Pensarfeo opened this issue Nov 25, 2024 · 3 comments
Assignees
Labels
type:bug Something isn't working

Comments

@Pensarfeo
Copy link

Pensarfeo commented Nov 25, 2024

Hi, I saw from my analytics this following error in production.

"Failed to link vertex and fragment shaders" while initializing posenet.

This is my initialization.

    const initTensor = zeros([256, 256, 3])
    await this.poseDetector.estimatePoses(initTensor)

It has only happened twice in the last couple of years but I would like to know what to do and how to try recovering the system.

I am quite sure the error happened on ios Mobile Safari 18.1.1.

these are the tfjs versions I use

@tensorflow-models/pose-detection": "^2.1.3
@tensorflow/tfjs-backend-webgl": "^4.21.0
@tensorflow/tfjs-backend-webgpu": "^4.21.0
@tensorflow/tfjs-converter": "^4.21.0
@tensorflow/tfjs-core": "^4.21.0

Any advice would be welcomed!

@Pensarfeo Pensarfeo added the type:bug Something isn't working label Nov 25, 2024
@shmishra99 shmishra99 self-assigned this Nov 26, 2024
@shmishra99
Copy link
Contributor

Hi @Pensarfeo ,

I wasn't able to replicate the issue on my end, but based on my understading, it seems that the problem is related to your device running GPU out of memory. I believe images with a resolution of 256x256 should work fine with the poseDetector models, but larger images may cause memory issues.

I came across this discussion that might be helpful: Thread.

Thank You!!

Copy link

github-actions bot commented Dec 5, 2024

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label Dec 5, 2024
@Pensarfeo
Copy link
Author

Hi @shmishra99, thanks for giving it a try :) I also never saw this issue, it seems rare, i have seen it only a few times on thousands of devices that used my app. My questions is more about how to handle the failure rather than how to fix it.

Shall I just try to run the model again? Shall I force reload the page? Is there a way to check how much memory is available?

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

No branches or pull requests

2 participants