Attach (recommended) or Link to PDF file here:
[compressed.tracemonkey-pldi-09.pdf](https://github.com/mozilla/pdf.js/files/7846269/compressed.tracemonkey-pldi-09.pdf)


Configuration:
- Web browser and its version: chrome v97.0.4692.7
- Operating system and its version: macOS 10.15.7
- PDF.js version: 2.12.313
- Is a browser extension: no

Steps to reproduce the problem:
1. https://github.com/mozilla/pdf.js/blob/236c8d47864e8ebf593bae21576670b59a7d4988/src/display/base_factory.js#L146-L149
2. https://github.com/mozilla/pdf.js/blob/236c8d47864e8ebf593bae21576670b59a7d4988/src/display/annotation_layer.js#L2073-L2081
3. As in the code above, sometimes 'data.rect' is '[0,0,0,0]', which causes 'this.svgFactory.create' to throw an error, which makes the following for loop stop working. https://github.com/mozilla/pdf.js/blob/236c8d47864e8ebf593bae21576670b59a7d4988/src/display/annotation_layer.js#L2352-L2371


element.textContent = textContent;
      } else {
        element = document.createElement("input");
        element.type = "text";
        element.setAttribute("value", textContent);
      }
      GetElementsByNameSet.add(element);
      element.disabled = this.data.readOnly;
      element.name = this.data.fieldName;
      element.tabIndex = DEFAULT_TAB_INDEX;
      elementData.userValue = textContent;
      element.setAttribute("id", id);
      element.addEventListener("input", event => {
        storage.setValue(id, { value: event.target.value });
        this.setPropertyOnSiblings(
          element,
          "value",
          event.target.value,
          "value"
        );
      });
      element.addEventListener("resetform", event => {
        const defaultValue = this.data.defaultFieldValue || "";
        element.value = elementData.userValue = defaultValue;
        delete elementData.formattedValue;
      });
      let blurListener = event => {
        if (elementData.formattedValue) {
          event.target.value = elementData.formattedValue;
        }