Skip to content
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

infinite loop #140

Open
wibed opened this issue Nov 14, 2024 · 0 comments
Open

infinite loop #140

wibed opened this issue Nov 14, 2024 · 0 comments

Comments

@wibed
Copy link

wibed commented Nov 14, 2024

stuck in a infinite loop given the following component.

      const decodeCallback = (result: any, error: any) => {
        if (result) {
          console.log('Barcode found:', result.getText());
          captureImage();
          return;
        }
    
        if (error && !error.message?.includes('No MultiFormat Readers were able to detect')) {
          console.log("another error");
          console.debug('Scan attempt failed:', error);
        }
      };

      decodeRef.current = await codeReaderRef.current.decodeFromVideoElement(
          videoRef.current,
          decodeCallback
      );

even though i get a successfull return. sometimes it work. most of the times the result wont return and is stuck in an infinite loop
locking resources.

what do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant