WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

OpenCV.js runtime error #758

@automan-bot

Description

@automan-bot

Acknowledgements

  • I read the documentation and searched existing issues to avoid duplicates
  • I understand this is a bug tracker and anything other than a proven bug will be closed
  • I understand this is a free project and relies on community contributions
  • I read and understood the Contribution guide

Minimal reproduction URL

https://www.google.com

Problem & expected behavior (under 200 words)

Skip this section and let your reproduction do the talking...

  • test.ts
import cvModule, { CV } from "@techstark/opencv-js";

async function getOpenCv():Promise<{ cv: CV }> {
  let cv;
  if (cvModule instanceof Promise) {
    cv = await cvModule;
  } else {
    await new Promise((resolve) => {
      cvModule.onRuntimeInitialized = () => resolve(1);
    });
    cv = cvModule;
  }
  return { cv };
}

async function main() {
  const { cv } = await getOpenCv();
  console.log("OpenCV.js is ready!");
  // You can now use OpenCV functions here
  console.log(cv.getBuildInformation());
  let mat=new cv.Mat(100,100,cv.CV_8UC3,new cv.Scalar(255,0,0))
  cv.imshow("mat:",mat)
}

main();

Run command:

tsx ./test.ts

But if you really need to explain, keep it under 200 words:

  • What happened
    • The program frantically outputs commands to the command line, causing it to freeze and crash.
  • What I expected
    • Normal operation
  • Error stack trace
    • Unable to track, the program outputs incessantly, causing the editor to freeze.
  • Documentation links
  • Screenshots

Bugs are expected to be fixed by those affected by it

  • I'm interested in working on this issue

Compensating engineering work will speed up resolution and support the project

  • I'm willing to offer $10 for financial support

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions