Closed Bobo100 closed 9 months ago
to show if there is memory leak or not, you need to enable debug in configuration and collect browser logs, without that its just a speculation which is not actionable.
and yes, webworkers require offscreencanvas - there is no way around it.
Thank you for your response.
I have enabled debug mode and added some console.log statements for debugging.
Regarding the console results, there haven't been any error messages. In the screenshot I provided (obtained through Mac's Web Inspector), the last console.log message before a forced page refresh is always "human.detect." This has led me to suspect that it might be an out-of-memory (OOM) issue.
Sometimes, when performance is worse, it will display a message saying "A Problem Repeatedly Occurred on…" before a forced refresh.
I'm not entirely sure if the screenshots I have are what you were referring to. However, I have genuinely conducted numerous tests.
At times, the issue arises with just 5 images, while on other occasions, it can handle up to 18 images without any problems. My biggest challenge is the lack of additional console information, which led me to this speculation.
However, as I mentioned earlier, when I disable the use of worker mode, the issue doesn't occur on an iPhone SE 2 (iOS 17.2.1).
I have also conducted similar tests on other phones without using worker mode: iPhone 15 Plus, iOS 17.1 => OK iPhone SE 3, iOS 16.6 => NG (This might be expected as it doesn't support OffscreenCanvas) iPhone 11, iOS 17.2.1 => NG I haven't yet tested it in worker mode, but I will do so.
In any case, thank you for your response.
Additional supplement
iPhone SE 2 (17.2.1) still automatically refreshes in non-worker mode. Previously, I only uploaded around 20 images, and there were no issues. However, today, when I uploaded more than 20, around 23 or 24, the problem started to occur.”
Thanks.
some devices/platforms are just not good enough for web-worker mode.
but if it works for 10 image and and break on 20 - there is no reason for that unless you're either submitting them in parallel or not doing cleanups in your code. i'm sorry i cant say more, but i really cannot spend time analyzing your code.
I think I will double-check my syntax on this end to see if there are any missing cleanups.
Thank you once again for your assistance.
Issue Description I'm encountering what I suspect to be an Out of Memory (OOM) issue on my iPhone SE 2 with iOS 17.2.1, in a basic web application that inputs images and processes them using the Human library for facial detection. My setup only utilizes the face model with all other models disabled.
While using a worker on the iPhone SE 2 (iOS 17.2.1), the webpage automatically refreshes when detecting images, suggesting a potential OOM situation. Interestingly, this issue does not occur when workers are not used, and the application functions normally. Both scenarios have also been tested on a Windows 10 platform with smooth operations.
Human Library Configuration:
Environment
Questions:
Testing URL: Home (human-next-js-worker.vercel.app)
Code Repository: Bobo100/human-next.js-worker (github.com)
Thank you for your assistance and time in addressing this issue.