Crash Snap! blocks

These are blocks that can crash Snap! editor and causes a lot of lag. Some of there are not mine.

:warning: This blocks could crash your editor. It is recommended to save your project before doing anything else.


Recursion method:

<blocks app="Snap! 7, https://snap.berkeley.edu" version="2"><block-definition s="crash Snap!" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doWarp"><script><custom-block s="crash Snap!"></custom-block></script></block></script></block-definition></blocks>

Launch method:

<blocks app="Snap! 7, https://snap.berkeley.edu" version="2"><block-definition s="crash Snap!" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doWarp"><script><block s="doForever"><script><block s="fork"><block s="reifyScript"><script><block s="doWarp"><script><block s="doForever"><script><custom-block s="crash Snap!"></custom-block></script></block></script></block></script><list></list></block><list></list></block></script></block></script></block></script></block-definition></blocks>

Large list method:

<blocks app="Snap! 7, https://snap.berkeley.edu" version="2"><block-definition s="crash Snap!" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doRun"><block s="reifyReporter"><autolambda><block s="reportNumbers"><l>1</l><block s="reportMonadic"><l><option>10^</option></l><l>8</l></block></block></autolambda><list></list></block><list></list></block></script></block-definition></blocks>

Circular list method:

<blocks app="Snap! 7, https://snap.berkeley.edu" version="2"><block-definition s="crash Snap!" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportNewList"><list></list></block></block><block s="doWarp"><script><block s="doForever"><script><block s="doAddToList"><block var="a"/><block var="a"/></block></script></block></script></block></script></block-definition></blocks>

Infinite wait method:

<blocks app="Snap! 7, https://snap.berkeley.edu" version="2"><block-definition s="crash Snap!" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doWarp"><script><block s="doWait"><block s="reportQuotient"><l>1</l><l>0</l></block></block></script></block></script></block-definition></blocks>

Infinite sprites method:

<blocks app="Snap! 7, https://snap.berkeley.edu" version="2"><block-definition s="crash Snap!" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doWarp"><script><block s="doForever"><script><block s="doTellTo"><block s="newClone"><l><option>myself</option></l></block><block s="reifyScript"><script><block s="doSetVar"><l><option>my temporary?</option></l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doSetVar"><l><option>my parent</option></l><l></l></block><custom-block s="crash Snap!"></custom-block></script><list></list></block><list></list></block></script></block></script></block></script></block-definition></blocks>

Call/Run method:

<blocks app="Snap! 7, https://snap.berkeley.edu" version="2"><block-definition s="crash Snap!" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doRun"><block s="reifyScript"><script><block s="doRun"><block var="#1"/><list><block var="#1"/></list></block></script><list><l>#1</l></list></block><list><block s="reifyScript"><script><block s="doRun"><block var="#1"/><list><block var="#1"/></list></block></script><list><l>#1</l></list></block></list></block></script></block-definition></blocks>

Say/Think large strings method:

<blocks app="Snap! 7, https://snap.berkeley.edu" version="2"><block-definition s="crash Snap!" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doForever"><script><block s="bubble"><block s="reportListAttribute"><l><option>json</option></l><block s="reportNumbers"><l>1</l><block s="reportMonadic"><l><option>10^</option></l><l>7</l></block></block></block></block></script></block></script></block-definition></blocks>

Invalid sprite method:

<blocks app="Snap! 7, https://snap.berkeley.edu" version="2"><block-definition s="crash Snap!" type="command" category="other"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doShowVar"><l>a</l></block><block s="doSwitchToCostume"><block s="reportNewCostume"><block s="reportNewList"><list></list></block><l>0</l><l>0</l></block></block><block s="doSetVar"><l>a</l><block s="reportGet"><l><option>self</option></l></block></block></script></block-definition></blocks>

Please put the blocks in a project and share the project

There's no project. Just copy and import it...

Yeah, you can eventually max out your system/browser resources. But, seriously, you can just press STOP once you hit an infinite loop or recursion without a base case.

Yes, you can.

But I think the most difficult to stop is invalid sprite method

That's really annoying and hard to figure out. Also, it's much harder for Chromebook users and impossible for mobile users.
Just make a big project and put all the blocks you make into it. Then link that project every time you've made an addition (or is it edition?).

There are some pages mobile/Chromebook users could use to import the blocks.

fixed in dev (although I'm not sure it's a good idea to take that feature away, but I'd rather limit what you can do with Snap! than have you complain about what you can do with Snap).

How do I close this window?

BTW the block seems to still crash Snap!...

Not really. You just make your way to the variables tab and click the "hide variable _" block.
Or, even easier, drag the temporary variable into the palette to delete it.

You don't. I just drag it down where it can't be seen.

What do you mean?

the only way I know of is going into dev mode and deleting the DialogBoxMorph.

if you're talking about with the "Invalid sprite method", then that one is fixed. You may have to clear the cache.

Still crashes for me...

are you in the dev version?

Yes...? And I cleared my cache, yes...?

welp, I've got no ideas. Sorry.

Wait... Now it worked! Ty!

Snap! doesn't crash when you do that. It just only renders changes while you're dragging the variable watcher. Try it: Trigger the invalid sprite "crash", click on a different category than the one you're on, then drag the watcher.

OK.

Anyway, @jens fixed it