Skip to content

infinite loop #140

@wibed

Description

@wibed

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions