Of course there is a solution. There are several.
Here's one:
everyone has a gun. you can't kill everyone in a room someone shoots back and kills you first.
Here's another:
Use magic to get rid of all guns, and the knowledge of how to make guns. Then no one can be shot, ever.
and one more:
Advance science to the point we can predict the outcomes and behaviors of people in utero. Then fix or abort the ones who will shoot up the place. Of course, some of you out there may know the only flaw in that plan, send me a PM if you know how to survive that ship
Here's one:
everyone has a gun. you can't kill everyone in a room someone shoots back and kills you first.
Here's another:
Use magic to get rid of all guns, and the knowledge of how to make guns. Then no one can be shot, ever.
and one more:
Advance science to the point we can predict the outcomes and behaviors of people in utero. Then fix or abort the ones who will shoot up the place. Of course, some of you out there may know the only flaw in that plan, send me a PM if you know how to survive that ship