Thanks a lot

ב-יום שישי, 21 ביולי 2023 בשעה 18:13:07 UTC+3, tli...@google.com כתב/ה:

> > Do I even need the -pthread flag to use CPP threads, or is it only 
> necessary for some JS threads I am yet to undestand?
>
> Yes you do.
>
> > Refused to execute script from '
> http://localhost:8000/blink_landmark_detector_sample.js' because its MIME 
> type ('text/plain') is not executable.
>
> This is probably also a server configuration problem. The MIME type for JS 
> should be text/javascript.
>
> On Fri, Jul 21, 2023 at 1:05 AM Shlomi Fish <shl...@shlomifish.org> wrote:
>
>> hi,
>>
>> On Thu, 20 Jul 2023 00:47:07 -0700 (PDT)
>> Ronny Nissengold <ronn...@gmail.com> wrote:
>>
>> > Using malloc didn't work.
>>
>> did using cwrap() work? see:
>>
>>
>> https://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html
>>
>> > 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
>>
>>
>>
>> -- 
>>
>> Shlomi Fish       https://www.shlomifish.org/
>> https://www.shlomifish.org/humour/bits/New-versions-of-the-GPL/
>>
>> Yawn! Too TL;DR! Dude, do you even tweet?
>>     — https://twitter.com/shlomif/status/504931822757638144
>>
>> 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-disc...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/emscripten-discuss/20230721085722.232c69e3%40telaviv1.shlomifish.org
>> .
>>
>

-- 
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/879759e3-f372-47da-b426-47dc107649a7n%40googlegroups.com.

Reply via email to