Bug 211619

Summary: Regression: Array size is not a small enough positive integer
Product: WebKit Reporter: zac spitzer <zac.spitzer>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: knuts763, webkit-bug-importer, ychris2010-1
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: Unspecified   
OS: Unspecified   

Description zac spitzer 2020-05-08 03:05:37 PDT
This QR code scanning library previously worked with Safari on iOS

https://nimiq.github.io/qr-scanner/demo/

it's now throwing this error in one of the third party libraries

name: RangeError
message: Array size is not a small enough positive integer.
mode: onerror
stack: qr-scanner-worker.min.js (24,158)

https://github.com/cozmo/jsQR/blob/master/src/locator/index.ts#L451
Comment 2 Radar WebKit Bug Importer 2020-05-08 15:44:16 PDT
<rdar://problem/63039492>
Comment 3 knuts763 2020-11-30 12:16:29 PST
We also ran into this issue doing .map() on an array. Our issue was not very reproducible, only occurring a handful of times a day out of many users. Replacing the .map() call with a basic for loop seemed to avoid the bug (or it's failing in a way that doesn't show up in our logs anymore). I couldn't find any common threads outside of the users all being in a webkit browser (safari on mac or any browser on iOS/iPad). The arrays that caused this error were sourced from multiple different code paths. Thanks!