Well, the test is if it's directed to and likely to cause a panic (in the US). So if you avoid causing a panic by sheer luck - like something counteracts your yelling and everybody settles down again, and that's the only reason nobody was crushed - you're still in trouble.

Though moral luck is certainly a thing in general, where negligence and risk-taking is not a crime until it goes wrong.

Aware of the US distinction, and it's mostly sensible. I believe in the US you actually can yell "fire" in a crowded theatre and if nothing happens, you'll be given the benefit of the doubt. As it should be.

Anything else a genuinely slippery slope.