1) Set up a ship with missiles as a weapon with beam module effects to make it lock on (may work with other weapons but this way works to replicate it)
2) Add a docking module and dock it to a shop (spawn shop works).
3) Try to shoot the weapon and it crashes.