Page Crashing

I am trying to make a median blur filter for an image, but when I try to run the script, the page gives me an 'out of memory' error:


It also kills this forum page, but not any other tabs.
Am I doing something wrong (if so tell me!), or is this to memory intensive for the browser. Personally, I think it's my mistake, but you never know.
Here is the project.

I made a test "bug hunt" project here with smaller costume and small stage size, and the ringed "median of list" blocks themselves are being reported by the "safely report"' block, instead of results of the "median of list" block. See image below.

Also, the SWITCH TO COSTUME block needs a list of RGBA values for each pixel, not only one ("median brightness") value for each pixel (as the project currently does).

Thanks for the help. I will test it out when I have time.

It was my pleasure to remix it : -) Can you please rename the topic, for example, "Median Blur Filter project discussion" because the current title "Page Crashing" is too general.