Created attachment 466113 [details] Source code of the demo page Steps to produce: 1. Create a web page: 1.1. Create an AudioContext and an AudioWorklet. 1.2. Create a 256MB (to be precise, 268435456 bytes) WebAssembly.Memory in the AudioWorkletProcessor. 2. Open the page in iOS Safari or iOS Chrome. 3. Reload the page many (7) times. -> On the 7th reload (8th opening), the WebAssembly.Memory cannot be created due to an "Out of memory" error. Notes: - Opening the page in another tab does not cause the issue. - Just referring to the buffer of the WebAssembly.Memory also prevents the issue, but I do not know why. - Closing the AudioContext and assigning null to the WebAssembly.Memory did not solve the issue. Demo page: https://wasm-memory-in-audioworklet-test.netlify.app/ By selecting "OK" of the confirmation dialog, the buffer of the WebAssembly.Memory will be referred to, resulting in no error. By selecting "Cancel" of the confirmation dialog, the buffer of the WebAssembly.Memory will not be referred to, resulting in the error on the 7th reload. The source code is attached. I tested on iPadOS 16.4.1, iPad Air 5th gen.
<rdar://problem/108873396>
Just a few reloads of our audio editing app (https://goldwave.com/editor) fails on Safari version 17.2 with a memory range error, but Firefox and Chrome work fine (on non-iOS devices). The error continues for every reload until Safari is terminated.
Seems related to: https://bugs.webkit.org/show_bug.cgi?id=222097
This is the same issue as https://bugs.webkit.org/show_bug.cgi?id=222097 and should be marked as duplicate. This bug is causing problems in production for customers of our barcode scanning library STRICH (https://strich.io). It is especially annoying as reloading the page will not fix the issue, and this is definitely not something users are accustomed to.