-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
Picture misplaced #217
Comments
Same issue here. try disable wasm and ww features for you Pica instance;like new Pica({features:['js']}) |
Let me know if problem is still actual. |
@puzrin why reducing tile size may be helpful? |
@chebum, in theory, that reduces memory consumption 4x (in all concurrent workers), if device has low limits and crashes or abnormal behaviour happens. But i have no conditions to investigate behaviour of all possible hardware. 1024*1024 => 4mb per tile + ~4mb for intermetiate buffer (in v9). With 4 workers => 32mb. Not too much. The similar effect may be reached with restriction of peak workers or disabling those at all. |
@puzrin Disabling web workers also solves accidental STATUS_ACCESS_VIOLATION in Edge 96.0.1054.53. I'm able to reproduce the problem in 100% cases using specific set of images. Chrome 96.0.4664.93 is working fine, but Chrome 96.0.4664.110 crashes. Disabling WebWorkers does NOT solve the crash in Chrome 96.0.4664.110. |
@chebum i guess, that's another bug, from wasm. Try do disable it. It that helps - try to review source, may be i missed some zero division or byte/word overflow. Anyway, please report that separate, with example how to reproduce. |
That's the hardest part. I was able to reproduce it in the bigger application, but wasn't yet able to reproduce the problem separately :( I found a fix for Chrome as well - I have to clone source canvas before passing it to pica.resize. This way it worked even with web workers. Cloning source canvas solved the problem both in Edge and Chrome. I tested with 7.0.0 as well. It behaves the same way as 9.0.0, so I doubt it's the latest change. Will report in a separate issue if I find more information about it. |
Thank you for info, that's important to know for me. In our app, uploader has 2 stage resizer - client-side & server-side. If client-side code fails, image is sent "as is". |
Your library is great, but I have some problems
I don't know what I did wrong, and occasionally some pictures will be misplaced. I framed them with a red frame.
The probability of error is about 5%, and our testers and developers cannot reproduce it. But users can always have this situation. It should be related to the type of phone, but I don't have definite evidence. I want to know why.
The following code is my compression method. Accept a File type and return the compressed File.
The text was updated successfully, but these errors were encountered: