These seem to be separate issues: > Uncaught (in promise) TypeError: o[r[((r[(w2 >> 2)] + 8) >> 2)]] is not a function
That looks like a wasm2js error perhaps, assuming that is using wasm2js (non-WASM output on 1.39.0, by default). Does using latest-fastcomp fix that for you? And does it work in wasm mode? It would be good to get a testcase of this. Even a large one might be enough to debug it (I'd just build with wasm and without, and compare the diff in the behavior). (In general, this "not a function" issue is likely a bad function pointer call, which may be due to memory corruption or something else bad.) > Compiled code throwing an exception That is a C++ language exception being thrown, like maybe an assertion failed in cvRegisterType. It would be interesting to know if using fastcomp and/or wasm affects that too. - Alon On Sun, Oct 27, 2019 at 3:30 AM Shachar Langbeheim <[email protected]> wrote: > I'm sorry, I don't have any experience with CMake, so I'm having trouble > injecting the relevant flags to OpenCV's compilation. > ATM, these are the logs I get. First a warning is logged: > > Compiled code throwing an exception, 5801480,547192,4749 > > ___cxa_throw @ appWASM.js:2010 > cv::error(cv::Exception const&) @ wasm-01c3004a-12026:1 > cv::error(int, cv::String const&, char const*, char const*, int) @ > wasm-01c3004a-12023:1 > cvRegisterType @ wasm-01c3004a-11970:1 > _GLOBAL__sub_I_persistence_types.cpp @ wasm-01c3004a-12009:1 > __wasm_call_ctors @ wasm-01c3004a-402:1 > Module.___wasm_call_ctors @ appWASM.js:13159 > func @ appWASM.js:1799 > callRuntimeCallbacks @ appWASM.js:1375 > initRuntime @ appWASM.js:1408 > doRun @ appWASM.js:14543 > run @ appWASM.js:14564 > runCaller @ appWASM.js:14465 > removeRunDependency @ appWASM.js:1583 > receiveInstance @ appWASM.js:1693 > receiveInstantiatedSource @ appWASM.js:1710 > Promise.then (async) > (anonymous) @ appWASM.js:1731 > Promise.then (async) > instantiateAsync @ appWASM.js:1729 > createWasm @ appWASM.js:1756 > (anonymous) @ appWASM.js:12314 > And then an error: > Uncaught (in promise) 5801480 > > I don't know how to get more info from the exception. > > > On Thu, 24 Oct 2019 at 20:00, Alon Zakai <[email protected]> wrote: > >> What exactly is thrown, a C assertion, a wasm exception, or something >> else? Pasting the full output (preferably in a build with --profiling -s >> ASSERTIONS) might help understand what you're seeing. >> >> On Tue, Oct 22, 2019 at 3:02 AM Shachar Langbeheim <[email protected]> >> wrote: >> >>> Hi, >>> I'm seeing a crash when running an app linked with opencv. openCV is >>> built using the command below, and an exception is thrown in >>> cvRegisterType. I've tried to print the exception using make install >>> -s EXCEPTION_DEBUG=1 -s DISABLE_EXCEPTION_CATCHING=0, but I still can't >>> get the exception printed. Did anyone else try to compile OpenCV with the >>> new backend and see this? Or any tips on how can I try to flesh out the >>> issue? >>> >>> emcmake cmake ../$1 \ >>> -DCMAKE_BUILD_TYPE=Release \ >>> -DCMAKE_INSTALL_PREFIX='./' \ >>> -DCPU_BASELINE=''\ >>> -DCPU_DISPATCH='' \ >>> -DCV_TRACE=OFF \ >>> -DBUILD_SHARED_LIBS=OFF \ >>> -DWITH_1394=OFF \ >>> -DWITH_ADE=OFF \ >>> -DWITH_VTK=OFF \ >>> -DWITH_EIGEN=OFF \ >>> -DWITH_FFMPEG=OFF \ >>> -DWITH_GSTREAMER=OFF \ >>> -DWITH_GTK=OFF \ >>> -DWITH_GTK_2_X=OFF \ >>> -DWITH_IPP=OFF \ >>> -DWITH_JASPER=OFF \ >>> -DWITH_JPEG=ON \ >>> -DWITH_WEBP=OFF \ >>> -DWITH_OPENEXR=OFF \ >>> -DWITH_OPENGL=OFF \ >>> -DWITH_OPENVX=OFF \ >>> -DWITH_OPENNI=OFF \ >>> -DWITH_OPENNI2=OFF \ >>> -DWITH_PNG=ON \ >>> -DWITH_TBB=OFF \ >>> -DWITH_PTHREADS_PF=OFF \ >>> -DWITH_TIFF=OFF \ >>> -DWITH_V4L=OFF \ >>> -DWITH_OPENCL=OFF \ >>> -DWITH_OPENCL_SVM=OFF \ >>> -DWITH_OPENCLAMDFFT=OFF \ >>> -DWITH_OPENCLAMDBLAS=OFF \ >>> -DWITH_GPHOTO2=OFF \ >>> -DWITH_LAPACK=OFF \ >>> -DWITH_ITT=OFF \ >>> -DWITH_QUIRC=OFF \ >>> -DBUILD_ZLIB=ON \ >>> -DBUILD_opencv_apps=OFF \ >>> -DBUILD_opencv_calib3d=ON \ >>> -DBUILD_opencv_dnn=ON \ >>> -DBUILD_opencv_features2d=ON \ >>> -DBUILD_opencv_flann=ON \ >>> -DBUILD_opencv_gapi=OFF \ >>> -DBUILD_opencv_ml=OFF \ >>> -DBUILD_opencv_photo=ON \ >>> -DBUILD_opencv_imgcodecs=OFF \ >>> -DBUILD_opencv_shape=OFF \ >>> -DBUILD_opencv_videoio=OFF \ >>> -DBUILD_opencv_videostab=OFF \ >>> -DBUILD_opencv_highgui=OFF \ >>> -DBUILD_opencv_superres=OFF \ >>> -DBUILD_opencv_stitching=OFF \ >>> -DBUILD_opencv_java=OFF \ >>> -DBUILD_opencv_java_bindings_generator=OFF \ >>> -DBUILD_opencv_js=OFF \ >>> -DBUILD_opencv_python2=OFF \ >>> -DBUILD_opencv_python3=OFF \ >>> -DBUILD_EXAMPLES=OFF \ >>> -DBUILD_PACKAGE=OFF \ >>> -DBUILD_opencv_python_bindings_generator=OFF \ >>> -DBUILD_TESTS=OFF \ >>> -DBUILD_PERF_TESTS=OFF && >>> make install >>> >>> -- >>> 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 [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/emscripten-discuss/CA%2B_KjGY3dNhQ4rZmmmaGLyChG7qTKPaO6i2-Au0Xqd15D5Jr0g%40mail.gmail.com >>> <https://groups.google.com/d/msgid/emscripten-discuss/CA%2B_KjGY3dNhQ4rZmmmaGLyChG7qTKPaO6i2-Au0Xqd15D5Jr0g%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> 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 [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpQiJxYXY-ZtZUQ7ucwXooYxthUmZbw%3Dw8eVJH%2BGCYWeCw%40mail.gmail.com >> <https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpQiJxYXY-ZtZUQ7ucwXooYxthUmZbw%3Dw8eVJH%2BGCYWeCw%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/CA%2B_KjGZ6_ALMYGdpKFJN4Cps6g59%2By0a038xz-gkD6cBjwxe0w%40mail.gmail.com > <https://groups.google.com/d/msgid/emscripten-discuss/CA%2B_KjGZ6_ALMYGdpKFJN4Cps6g59%2By0a038xz-gkD6cBjwxe0w%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpSSCO7iDCoiDxjM%2BkxWik54cr%3DwGpkhge60_8q5-BWxOQ%40mail.gmail.com.
