Using malloc didn't work.
By setting the coop policy, using requestly, I now get new errors:
Refused to execute script from 
'http://localhost:8000/blink_landmark_detector_sample.js' because its MIME 
type ('text/plain') is not executable.
At least now SharedArrayBuffer is recognised.
Looks like I am close but still no cigar.
Any ideas?
Thanks.

ב-יום חמישי, 20 ביולי 2023 בשעה 09:55:27 UTC+3, Shlomi Fish כתב/ה:

> hi Ronny!
>
> On Wed, 19 Jul 2023 02:45:53 -0700 (PDT)
> Ronny Nissengold <ronn...@gmail.com> wrote:
>
> > Thank you all for your support.
> > I was able to successfully compile my project with pthread enabled.
> > Now I face a new problem, I used Module._malloc to pass an image from a 
> > webcam into my cpp function
> > For that I used the following linker 
> > flags: add_link_options(-sINITIAL_MEMORY=800MB -sTOTAL_STACK=80MB -O3 -s 
> > -sEXPORTED_FUNCTIONS=['_malloc','_free'] -sASSERTIONS -pthread)
> > 
> > Now I get the following error in my console:
> > 
> > Uncaught ReferenceError: SharedArrayBuffer is not defined
> > at blink_landmark_detector_sample.js:1:9999
> > 
> > (index):11 Uncaught TypeError: Module._malloc is not a function
> > at _arrayToHeap ((index):11:24)
> > at HTMLVideoElement.computeFrame ((index):40:22)
> > 
> > Any idea what happened?
>
> try using 'Module.malloc' [without the underscore] or 'cwrap'.
>
> HTH
>
> > Thanks!
> > Ronny
>
>
>
> -- 
>
> Shlomi Fish https://www.shlomifish.org/
> https://github.com/shlomif/validate-your-html - Validate Your HTML
>
> Chuck Norris knows what the gender of Great A’Tuin, the Discworld world 
> turtle,
> is.
> — https://www.shlomifish.org/humour/bits/facts/Chuck-Norris/
>
> Please reply to list if it's a mailing list post - https://shlom.in/reply 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/135ef493-698b-4b51-8f5b-c86cfcf568ben%40googlegroups.com.

Reply via email to