-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Problem when loading opencv.js #7562
Comments
I'm ready to answer any question and even to post some sample code to get this started. @kripken |
@alinpopescu you can refer this: https://docs.opencv.org/3.3.1/d0/d84/tutorial_js_usage.html |
Thanks much for the answer @yjjnls. I'm doing the loading exactly like that, yet I receive the above error. It must be something wrong with the shared memory between main thread and worker threads. |
I had this issue with emsdk and ffmpeg on emsdk 1.XX, the updating stayed on an old version. What version emsdk are you using? |
@AlexVestin Thank you very much for the reply. |
That was poor phrasing, I had 1.37ish ( I can't remember the exact version), but it stayed the same version when I tried to update). So I removed the old version and pulled the repo and now it's 1.38.2 . You can check your version by opening a new terminal and setting the environment variables ie. Also, |
I just updated to 1.38.20 from 1.38.11, removed the -s ALLOW_MEMORY_GROWTH=1 flag and started a build. Will get you updated. |
New day, new error. :) The following happens on 1.38.20 when loading opencv.js multithreading. |
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant. |
For anyone facing the same issue. Problem: Minimal action from emscripten: Maximum action from emscripten: Possible Workaround: |
Hello,
I am trying to load opencv.js compiled with these flags:
-s WASM=1 -s USE_PTHREADS=1 -s ALLOW_MEMORY_GROWTH=1 -s WASM_MEM_MAX=1610612736 -s PTHREAD_POOL_SIZE=8.
I have added some multithreading module to it which I cannot make public.
First when I simply try to load opencv.js, I get these errors:
Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided.
I did some investigation and found the problem is in pthread-main.js:101 because e.data.urlOrBlob is undefined. For some reason this line evaluates to undefined:
urlOrBlob: Module["mainScriptUrlOrBlob"] || currentScriptUrl
If I compile the code without -s PTHREAD_POOL_SIZE=8 then the code loads fine, but it blocks when I run it (when the browser tries to load first thread).
Can you please help me fix this problem as I'm facing it for some time and I cannot sort it out?
Why is there a opencv_js.js and opencv.js and how to load them?
Thank you very much for your help,
Alin
The text was updated successfully, but these errors were encountered: